From 7f0821ea84810a61e63973faf041e28dd3c1076a Mon Sep 17 00:00:00 2001 From: saurabhbhatia Date: Fri, 30 Aug 2013 09:56:34 +0800 Subject: [PATCH] Updated Site info page to new ui --- app/views/admin/items/_site_bar.html.erb | 2 +- app/views/admin/sites/_side_bar.html.erb | 2 +- app/views/admin/sites/site_info.html.erb | 221 +++++++++++++++++++++++ 3 files changed, 223 insertions(+), 2 deletions(-) diff --git a/app/views/admin/items/_site_bar.html.erb b/app/views/admin/items/_site_bar.html.erb index 7c415a786..c9de06cc5 100644 --- a/app/views/admin/items/_site_bar.html.erb +++ b/app/views/admin/items/_site_bar.html.erb @@ -23,7 +23,7 @@
  • <%= link_to admin_template_store_path, :class => active_for_action('template_store', 'index') do %><%end%>
  • -
  • <%= link_to admin_site_site_info_path(@site), active_for_action('sites', 'site_info') do %><%end%>
  • +
  • <%= link_to admin_site_site_info_path(@site), :class => active_for_action('sites', 'site_info') do %><%end%>
  • diff --git a/app/views/admin/sites/_side_bar.html.erb b/app/views/admin/sites/_side_bar.html.erb index 7c415a786..c9de06cc5 100644 --- a/app/views/admin/sites/_side_bar.html.erb +++ b/app/views/admin/sites/_side_bar.html.erb @@ -23,7 +23,7 @@
  • <%= link_to admin_template_store_path, :class => active_for_action('template_store', 'index') do %><%end%>
  • -
  • <%= link_to admin_site_site_info_path(@site), active_for_action('sites', 'site_info') do %><%end%>
  • +
  • <%= link_to admin_site_site_info_path(@site), :class => active_for_action('sites', 'site_info') do %><%end%>
  • diff --git a/app/views/admin/sites/site_info.html.erb b/app/views/admin/sites/site_info.html.erb index f8bd7efb9..c0704cb9d 100644 --- a/app/views/admin/sites/site_info.html.erb +++ b/app/views/admin/sites/site_info.html.erb @@ -4,6 +4,227 @@ <%= 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'} %> <% end %> + + <%= stylesheet_link_tag "lib/wrap-nav"%> + <%= stylesheet_link_tag "lib/main-forms"%> + <%= stylesheet_link_tag "lib/togglebox"%> + + <%= javascript_include_tag 'lib/ckeditor/ckeditor' %> + <%= javascript_include_tag 'lib/ckeditor/replace/site_info' %> + <%= javascript_include_tag 'lib/site_set' %> + + +
    +
    + + <%= form_for @site, :url => admin_site_path(@site), :html => {:class => "form-horizontal main-forms"} do |f| %> + +
    + +
    + + + + + + +
    + + <% @site_valid_locales.each do |locale|%> + <%= content_tag :div, :class => "tab-pane fade #{active_when_current_locale_eq locale} #{locale}" do %> +
    + +
    + <%= f.fields_for :title_translations do |f| %> + <%= f.text_field locale, :class => "input-xxlarge", :value => (@site.title_translations[locale] rescue nil) %> + <% end %> +
    +
    + <% end %> + <% end %> + + +
    + +
    + <%= f.check_box :title_always_on, :class => "toggle-check" %> +
    +
    + +
    + + +
    + +
    +
    + +
    +
    +
    + + +
    + +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    +
    +
    + + +
    + +
    + +
    +
    + +
    + + +
    + +
    + +
    +
    + + +
    + +
    +
    + +
    +
    +
    + +
    + + +
    + + +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    + +
    + + +
    + +
    +
    + <%= f.fields_for :sub_menu_translations do |f| %> + <%= f.text_area locale, :class => "ckeditor input-block-level", :value => (@site.sub_menu_translations[locale] rescue nil) %> + <% end %> +
    +
    +
    + + +
    + +
    + +
    +
    + +
    + + +
    + +
    +
    + +
    +
    +
    + + +
    + +
    + +
    +
    + +
    + + +
    + +
    + +
    +
    + + +
    + +
    +
    + +
    +
    +
    + +
    + +
    + +
    + +
    + <%= f.submit t("submit"), :class => "btn btn-primary" %> + <%= f.submit t("cancel"), :class => "btn ", :type => 'reset' %> +
    + + + <% end %> + + +
    + +
    <%= form_for @site, :url => admin_site_path(@site), :html => {:class => "clear"} do |f| %>