Orbit/app/views/admin/sites/site_info.html.erb

113 lines
5.0 KiB
Plaintext
Raw Normal View History

2012-07-26 08:39:29 +00:00
<% # encoding: utf-8 %>
2012-05-08 12:06:56 +00:00
<% content_for :side_bar do %>
Merge branch 'various_bugs' into nccu_master Conflicts: Gemfile.lock app/assets/javascripts/ajax_form.js.erb app/assets/stylesheets/style.css.erb app/controllers/application_controller.rb app/controllers/sessions_controller.rb app/helpers/admin/web_link_helper.rb app/views/admin/attributes/_attribute_field.html.erb app/views/admin/designs/_form.html.erb app/views/admin/pages/_form.html.erb app/views/admin/sites/_side_bar.html.erb app/views/layouts/_orbit_bar.html.erb app/views/layouts/_side_bar.html.erb config/locales/en.yml config/locales/zh_tw.yml config/mongoid.yml vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/index.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_status.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_news_bulletin.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/index.html.erb vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/index.html.erb
2012-10-29 08:10:07 +00:00
<%= render :partial => 'layouts/side_bar', :locals => {:link_name => t('site.settings'), :link_url => admin_site_site_info_path(@site), :icon => 'icons-cog', :side_bar_content => 'admin/sites/side_bar'} %>
2012-05-08 12:06:56 +00:00
<% end %>
2012-05-07 07:55:45 +00:00
<div id="poststuff">
<%= form_for @site, :url => admin_site_path(@site), :html => {:class => "clear"} do |f| %>
2012-05-06 16:54:18 +00:00
<div id="post-body">
<div id="post-body-content" class="clear">
<ul class="nav nav-tabs">
<% @site_valid_locales.each do |locale|%>
<%#= raise @site_valid_locales.inspect %>
<%= content_tag :li, link_to(I18nVariable.from_locale(locale), ".#{locale}", :data => {:toggle => "tab"}), :class => (active_when_current_locale_eq locale) %>
2012-05-06 16:54:18 +00:00
<% end %>
</ul>
2012-05-07 07:55:45 +00:00
<div class="tab-content form-horizontal">
2012-05-08 09:21:26 +00:00
<div class="control-group" style="margin-bottom: 0;">
<div class="controls">
2012-05-08 09:21:26 +00:00
<label class="checkbox">
2012-09-12 11:12:50 +00:00
<%= f.check_box :title_always_on %> <%= t :always_display_title %>
2012-05-08 09:21:26 +00:00
</label>
</div>
</div>
2012-05-06 16:54:18 +00:00
<% @site_valid_locales.each do |locale|%>
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
2012-05-07 07:55:45 +00:00
<div class="control-group">
2012-09-12 11:12:50 +00:00
<label class="control-label"><%= t 'site.title' %></label>
2012-05-07 07:55:45 +00:00
<div class="controls">
2012-07-25 21:58:09 +00:00
<%= f.fields_for :title_translations do |f| %>
<%= f.text_field locale, :class => "input-xxlarge", :value => (@site.title_translations[locale] rescue nil) %>
2012-05-07 07:55:45 +00:00
<% end %>
2012-09-12 11:12:50 +00:00
<p class="help-block"><%= (t 'site.title_help').html_safe %></p>
2012-05-07 07:55:45 +00:00
</div>
2012-05-07 03:25:33 +00:00
</div>
<% end %>
<% end %>
2012-07-25 09:20:25 +00:00
<div class="control-group">
2012-09-12 11:12:50 +00:00
<label class="control-label"><%= t 'site.search' %></label>
2012-07-25 09:20:25 +00:00
<div class="controls">
2012-07-25 09:49:16 +00:00
<%= text_field_tag 'site[search][domains]',(@site.search["domains"] rescue nil), {:class => "input-xxlarge" ,:placeholder => t("search.domains") }%>
<%= text_field_tag 'site[search][sitesearch]',(@site.search["sitesearch"] rescue nil),{ :class => "input-xxlarge" ,:placeholder => t("search.sitesearch") }%>
2012-09-12 11:12:50 +00:00
<p class="help-block"><%= (t 'site.search_help').html_safe %></p>
2012-07-25 09:20:25 +00:00
</div>
</div>
<% @site_valid_locales.each do |locale|%>
<%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %>
2012-05-07 07:55:45 +00:00
<div class="control-group">
2012-09-12 11:12:50 +00:00
<label class="control-label"><%= t 'site.keywords' %></label>
2012-05-07 07:55:45 +00:00
<div class="controls">
2012-07-26 05:27:27 +00:00
<%= f.fields_for :keywords do |f| %>
<%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.keywords(locale) rescue nil) %>
2012-05-07 07:55:45 +00:00
<% end %>
2012-09-12 11:12:50 +00:00
<p class="help-block"><%= (t 'site.keywords_help').html_safe %></p>
2012-05-07 07:55:45 +00:00
</div>
2012-05-07 03:25:33 +00:00
</div>
2012-05-07 07:55:45 +00:00
<div class="control-group">
2012-09-12 11:12:50 +00:00
<label class="control-label"><%= t 'site.description' %></label>
2012-05-07 07:55:45 +00:00
<div class="controls">
2012-07-26 05:27:27 +00:00
<%= f.fields_for :description do |f| %>
<%= f.text_area locale, :class => "input-xxlarge textarea-height-s", :value => (@site.description(locale) rescue nil) %>
2012-05-07 07:55:45 +00:00
<% end %>
2012-09-12 11:12:50 +00:00
<p class="help-block"><%= (t 'site.description_help').html_safe %></p>
2012-05-07 07:55:45 +00:00
</div>
2012-05-07 03:25:33 +00:00
</div>
2012-05-07 07:55:45 +00:00
<div class="control-group">
2012-09-12 11:12:50 +00:00
<label class="control-label"><%= t 'site.footer' %></label>
2012-05-07 07:55:45 +00:00
<div class="controls">
2012-07-25 21:58:09 +00:00
<%= f.fields_for :footer_translations do |f| %>
2012-07-26 05:27:27 +00:00
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.footer_translations[locale] rescue nil) %>
2012-05-07 07:55:45 +00:00
<% end %>
2012-09-12 11:12:50 +00:00
<p class="help-block"><%= (t 'site.footer_help').html_safe %></p>
2012-05-07 07:55:45 +00:00
</div>
2012-05-07 03:25:33 +00:00
</div>
2012-05-08 09:27:02 +00:00
<div class="control-group">
2012-09-12 11:12:50 +00:00
<label class="control-label"><%= t 'site.sub_menu' %></label>
2012-05-08 09:27:02 +00:00
<div class="controls">
2012-07-25 21:58:09 +00:00
<%= f.fields_for :sub_menu_translations do |f| %>
2012-07-26 05:27:27 +00:00
<%= f.text_area locale, :class => "tinymce_textarea input-xxlarge", :value => (@site.sub_menu_translations[locale] rescue nil) %>
2012-05-08 09:27:02 +00:00
<% end %>
</div>
</div>
2012-07-26 08:39:29 +00:00
<div class="control-group">
Merge branch 'various_bugs' into nccu_master Conflicts: Gemfile.lock app/assets/javascripts/ajax_form.js.erb app/assets/stylesheets/style.css.erb app/controllers/application_controller.rb app/controllers/sessions_controller.rb app/helpers/admin/web_link_helper.rb app/views/admin/attributes/_attribute_field.html.erb app/views/admin/designs/_form.html.erb app/views/admin/pages/_form.html.erb app/views/admin/sites/_side_bar.html.erb app/views/layouts/_orbit_bar.html.erb app/views/layouts/_side_bar.html.erb config/locales/en.yml config/locales/zh_tw.yml config/mongoid.yml vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb vendor/built_in_modules/announcement/app/controllers/panel/announcement/front_end/bulletins_controller.rb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_filter.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/index.html.erb vendor/built_in_modules/announcement/app/views/panel/announcement/widget/bulletins/_index.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_filter_status.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/_news_bulletin.html.erb vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletins/index.html.erb vendor/built_in_modules/web_resource/app/views/panel/web_resource/back_end/web_links/index.html.erb
2012-10-29 08:10:07 +00:00
<label class="control-label"><%= t 'site.default_image' %></label>
2012-07-26 08:39:29 +00:00
<div class="controls">
<%= f.file_field :default_image, :id => "input-upload", :class => 'upload', :onchange => "document.getElementById('fu').innerHTML = this.form.fu.value = this.value;" %>
<span id='fu' class="file-name"></span>
<!--請程式務必將圖片尺寸加入到行內裡-->
<% 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 %>
<br>
<% if @site.default_image.file %>
<%= f.check_box :remove_default_image %>
<%= t('刪除已上傳檔案') %>
<% end %>
</div>
</div>
2012-05-06 16:54:18 +00:00
<% end %>
<% end %>
</div>
</div>
</div>
2012-05-07 07:55:45 +00:00
<div class="form-actions">
<%= f.submit t("submit"), :class => "btn btn-primary" %>
<%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %>
</div>
<% end %>
</div>