Added Mobile Site Icon for the website
This commit is contained in:
parent
050f2dedff
commit
e15cf5cfca
|
@ -34,6 +34,7 @@ class Site
|
|||
|
||||
mount_uploader :default_image, ImageUploader
|
||||
mount_uploader :favicon, ImageUploader
|
||||
mount_uploader :mobile_icon, ImageUploader
|
||||
|
||||
field :search,:type => Hash
|
||||
field :resque_namespace,:type => String, :default=>APP_CONFIG['orbit']
|
||||
|
|
|
@ -26,6 +26,35 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Mobile Site Icon</label>
|
||||
<div class="controls">
|
||||
<!-- if this page editing please add class "fileupload-edit" -->
|
||||
<div class="fileupload fileupload-new clearfix" data-provides="fileupload">
|
||||
<div class="fileupload-new thumbnail pull-left" style="background:black;">
|
||||
<% if @site.mobile_icon.file.present? %>
|
||||
<%= image_tag( @site.mobile_icon, :size=>"120x120") rescue ''%>
|
||||
<% else %>
|
||||
<%= image_tag "orbit-logo.png",:class => "pull-left upload-picture"%>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
|
||||
<% if @site.mobile_icon.present?%>
|
||||
<span class="btn btn-file">
|
||||
<%= f.file_field :mobile_icon, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>Change
|
||||
</span>
|
||||
<%= f.check_box :remove_mobile_icon %>
|
||||
Remove Icon
|
||||
<%else%>
|
||||
<span class="btn btn-file">
|
||||
<%= f.file_field :mobile_icon, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>Select Image
|
||||
</span>
|
||||
<%end%>
|
||||
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Cancel</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="control-group">
|
||||
<label class="control-label muted">Select Announcement Categories</label>
|
||||
<div class="controls">
|
||||
|
@ -62,7 +91,7 @@
|
|||
<%= f.check_box :mobile_api_openness_on , :class=>"toggle-check", :data=> { disabled: true } %>
|
||||
<span class="help-block">Make API available for Mobile Apps</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- Form Actions -->
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<header class="header" data-role="header">
|
||||
<h1 class="openmenu">
|
||||
<%= image_tag asset_path('mobile/logo.png') %>
|
||||
<%= image_tag( @site.mobile_icon, :size=>"120x120") rescue '' %>
|
||||
</h1>
|
||||
<i class="openmenu icons-arrow-down-5"></i>
|
||||
<%= link_to mobile_dialog_language_path(:app => params[:app]), {:class => "ui-btn-right language", "data-iconpos" => "notext", "data-icon" => "search", "data-rel" => "dialog"} do %>
|
||||
|
|
Reference in New Issue