Updated Preferences in Site Info

This commit is contained in:
saurabhbhatia 2013-09-05 18:05:32 +08:00
parent e9d6fa8787
commit a3f1b8d54a
3 changed files with 47 additions and 33 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@ -13,8 +13,8 @@
</head> </head>
<!-- Forms --> <%= form_for @site, :url => admin_site_path(@site), :html => {:class => "form-horizontal main-forms"} do |f| %>
<form class="form-horizontal main-forms">
<fieldset> <fieldset>
@ -36,7 +36,7 @@
<a href="#language-set" data-toggle="tab">Language</a> <a href="#language-set" data-toggle="tab">Language</a>
</li> </li>
<li> <li>
<a href="#orbitBar-them" data-toggle="tab">OrbitBar Them</a> <a href="#orbitBar-them" data-toggle="tab">OrbitBar Theme</a>
</li> </li>
</ul> </ul>
@ -54,72 +54,76 @@
<!-- System Email --> <!-- System Email -->
<%= f.fields_for :site_settings, @site['site_settings'] do |f| %>
<div id="system-email" class="tab-pane fade"> <div id="system-email" class="tab-pane fade">
<div class="control-group"> <div class="control-group">
<label class="control-label muted">Email Address</label> <label class="control-label muted"><%= t 'mail.address' %></label>
<div class="controls"> <div class="controls">
<input type="text" placeholder="Email Address" class="input-large"> <%= f.text_field :address, :value => (@site['site_settings']['address'] rescue nil), :class=>"input-large", :placeholder=>"Email Address" %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label muted">Domain</label> <label class="control-label muted"><%= t 'mail.domain' %></label>
<div class="controls"> <div class="controls">
<input type="text" placeholder="Domain" class="input-large"> <%= f.text_field :port, :value => (@site['site_settings']['port'] rescue nil), :class=>"input-large", :placeholder=>"Domain" %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label muted">Authentication</label> <label class="control-label muted"><%= t 'mail.authentication' %></label>
<div class="controls"> <div class="controls">
<input type="text" placeholder="Authentication" class="input-large"> <%= f.text_field :authentication, :value => (@site['site_settings']['authentication'] rescue nil), :class=>"input-large", :placeholder =>"Authentication" %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label muted">User Name</label> <label class="control-label muted"><%= t 'mail.user_name' %></label>
<div class="controls"> <div class="controls">
<input type="text" placeholder="User Name" class="input-large"> <%= f.text_field :user_name, :value => (@site['site_settings']['user_name'] rescue nil), :class=>"input-large", :placeholder=>"User Name" %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label muted">Password</label> <label class="control-label muted"><%= t 'mail.password' %></label>
<div class="controls"> <div class="controls">
<input type="text" placeholder="Password" class="input-large"> <%= f.text_field :password, :value => (@site['site_settings']['password'] rescue nil), :class=>"input-large", :placeholder=>"Password" %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label muted">Port</label> <label class="control-label muted"><%= t 'mail.port' %></label>
<div class="controls"> <div class="controls">
<input type="text" placeholder="Port" class="input-mini"> <%= f.text_field :port, :value => (@site['site_settings']['port'] rescue nil),:placeholder=>"Port", :class=>"input-mini" %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label muted">TLS</label> <label class="control-label muted"><%= t 'mail.tls' %></label>
<div class="controls"> <div class="controls">
<input type="checkbox" class="toggle-check" data-disabled="true"> <%= f.check_box :tls, :checked => (@site['site_settings']['tls'].eql?('1') rescue false),:class=>"toggle-check" %>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label muted">Enable Start TLS Auto</label> <label class="control-label muted"><%= t 'mail.enable_starttls_auto' %></label>
<div class="controls"> <div class="controls">
<input type="checkbox" class="toggle-check" data-disabled="true"> <%= f.check_box 'enable_starttls_auto', :checked => (@site['site_settings']['enable_starttls_auto'].eql?('1') rescue false), :class=>"toggle-check" %>
</div> </div>
</div> </div>
</div> </div>
<% end %>
<!-- Openness --> <!-- Openness -->
<div id="openness" class="tab-pane fade"> <div id="openness" class="tab-pane fade">
<div class="control-group"> <div class="control-group">
<label class="control-label muted">Close frontend pages</label> <label class="control-label muted"><%= I18n.t('site.frontend_closed')%></label>
<div class="controls"> <div class="controls">
<input type="checkbox" class="toggle-check" data-disabled="true"> <%= f.check_box :frontend_closed , :class=>"toggle-check"%>
<span class="help-block">Only can be viewed by users logged in</span> <span class="help-block">Only can be viewed by users logged in</span>
</div> </div>
</div> </div>
<div class="control-group"> <div class="control-group">
<label class="control-label muted">Open backend</label> <label class="control-label muted"><%= I18n.t('site.backend_openness_on') %></label>
<div class="controls"> <div class="controls">
<input type="checkbox" class="toggle-check" data-disabled="true"> <%= f.check_box :backend_openness_on , :class=>"toggle-check" %>
<span class="help-block">All users can visit backend pages</span> <span class="help-block">All users can visit backend pages</span>
</div> </div>
</div> </div>
@ -165,18 +169,28 @@
<!-- if this page editing please add class "fileupload-edit" --> <!-- if this page editing please add class "fileupload-edit" -->
<div class="fileupload fileupload-new clearfix" data-provides="fileupload"> <div class="fileupload fileupload-new clearfix" data-provides="fileupload">
<div class="fileupload-new thumbnail pull-left"> <div class="fileupload-new thumbnail pull-left">
<img src=""> <% if @site.default_image %>
<%= image_tag( @site.default_image, :size=>"120x120") rescue ''%>
<% else %>
<img class="pull-left upload-picture" src="/assets/default-img.png" />
<% end %>
</div> </div>
<div class="fileupload-preview fileupload-exists thumbnail pull-left"></div> <div class="fileupload-preview fileupload-exists thumbnail pull-left"></div>
<span class="btn btn-file"> <span class="btn btn-file">
<span class="fileupload-new">Select image</span> <%= f.file_field :default_image, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>Select Image
<span class="fileupload-exists">Change</span> <% if @site.default_image.file.present?%>
<input type="file"> <%= f.file_field :default_image, :id => "input-upload", :class => 'fileupload-new', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>Change
<%end%>
</span> </span>
<a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Cancel</a> <a href="#" class="btn fileupload-exists" data-dismiss="fileupload">Cancel</a>
<div class="controls" data-toggle="buttons-checkbox"> <div class="controls" data-toggle="buttons-checkbox">
<label class="checkbox inline btn btn-danger fileupload-remove"> <label class="checkbox inline btn btn-danger fileupload-remove">
<input type="checkbox" value="true"> Remove <% if @site.default_image.file %>
<label class="checkbox">
<%= check_box_tag 'site[remove_default_image]' %>
<%= t(:delete_) %>
</label>
<% end %>
</label> </label>
</div> </div>
</div> </div>
@ -194,11 +208,11 @@
<ul class="orbitbar-themes"> <ul class="orbitbar-themes">
<li class="active"> <li class="active">
<input type="radio" class="ob-theme" name="ob-theme" checked="checked"> <input type="radio" class="ob-theme" name="ob-theme" checked="checked">
<img src="/orbit_4.0.1/assets/images/orbitbar-theme_A.png" alt=""> <%= image_tag "orbitbar-theme_A.png", :alt =>""%>
</li> </li>
<li> <li>
<input type="radio" class="ob-theme" name="ob-theme"> <input type="radio" class="ob-theme" name="ob-theme">
<img src="/orbit_4.0.1/assets/images/orbitbar-theme_B.png" alt=""> <%= image_tag "orbitbar-theme_B.png", :alt =>""%>
</li> </li>
</ul> </ul>
</div> </div>
@ -210,9 +224,9 @@
</div> </div>
<!-- Form Actions --> <!-- Form Actions -->
<div class="form-actions"> <div class="form-actions">
<button type="submit" class="btn btn-primary">Save</button> <%= f.submit t("submit"), :class => "btn btn-primary" %>
<button type="button" class="btn">Cancel</button> <%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %>
</div> </div>
</fieldset> </fieldset>
</form> <%end%>