diff --git a/app/assets/images/editicon.png b/app/assets/images/editicon.png new file mode 100644 index 00000000..cef3e600 Binary files /dev/null and b/app/assets/images/editicon.png differ diff --git a/app/assets/stylesheets/sidebar.css.erb b/app/assets/stylesheets/sidebar.css.erb index 15922cc0..1e4b4010 100644 --- a/app/assets/stylesheets/sidebar.css.erb +++ b/app/assets/stylesheets/sidebar.css.erb @@ -11,6 +11,7 @@ } .nav-list ol li { padding: 5px 0; + list-style: none; } .nav-list ol li a { font-size: 13px; diff --git a/app/assets/stylesheets/style.css.erb b/app/assets/stylesheets/style.css.erb index c4b2e93c..ba1c3066 100644 --- a/app/assets/stylesheets/style.css.erb +++ b/app/assets/stylesheets/style.css.erb @@ -110,10 +110,8 @@ padding:6px; } #orbit-bar .nav > li.search { - background-image: none; overflow: hidden; width: 28px; - margin-bottom: 0; position: relative; } #orbit-bar .nav > li > a.orbit-bar-home { @@ -686,6 +684,32 @@ z-index: 2 !important; } +#back_main .editable { + position: relative; +} +#back_main .editable:after { + content: ''; + clear: both; + display: block; + visibility: hidden; + height: 0; +} + +#back_main .edit_link a { + position: absolute; + z-index: 10; + width: 100%; + height: 100%; + top: 0; + left: 0; + text-indent: -9999px; + background: url(<%= asset_path 'editicon.png' %>) no-repeat center center rgba(255,255,255,.8); + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 1); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 1); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 1); +} + + [class^="icons-"] { display: inline-block; width: 16px; diff --git a/app/views/admin/pages/_edit.html.erb b/app/views/admin/pages/_edit.html.erb index 61ff8046..d81a533d 100644 --- a/app/views/admin/pages/_edit.html.erb +++ b/app/views/admin/pages/_edit.html.erb @@ -1,10 +1,11 @@ <%= flash_messages %> - -

<%= t('admin.editing_page') %>

- -<%= form_for @item, :url => admin_page_path(@item) do |f| %> - <%= render :partial => "form", :locals => { :f => f } %> -

- <%= f.submit t('update') %> <%= link_back %> -

-<% end %> \ No newline at end of file +
+

<%= t('admin.editing_page') %>

+ <%= form_for @item, :url => admin_page_path(@item), :html => { :class => 'form-horizontal edit_page' } do |f| %> + <%= render :partial => "form", :locals => { :f => f } %> +
+ <%= f.submit t('update'), :class => 'btn btn-primary' %> + <%= link_to t('cancel'), get_go_back, :class=>"btn" %> +
+ <% end %> +
\ No newline at end of file diff --git a/app/views/admin/pages/_form.html.erb b/app/views/admin/pages/_form.html.erb index 7aae7c00..36e6e008 100644 --- a/app/views/admin/pages/_form.html.erb +++ b/app/views/admin/pages/_form.html.erb @@ -1,52 +1,92 @@ <%= f.error_messages %> <%= f.hidden_field :parent, :value => (@item.parent.id rescue nil) %> -

-<%= f.label :name, t('admin.name') %> -<%= f.text_field :name, :class => 'text' %> -

+
+ <%= f.label :name, t('admin.name'), :class => 'control-label' %> +
+ <%= f.text_field :name, :class => 'text input-xlarge' %> + +
+
<%= f.fields_for :i18n_variable, (@item.new_record? ? @item.build_i18n_variable : @item.i18n_variable) do |f| %> - <% @site_valid_locales.each do |locale| %> -

- <%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}" %> - <%= f.text_field locale %> -

- <% end %> + <% @site_valid_locales.each do |locale| %> +
+ <%= f.label :locale, "#{t('admin.title')} #{I18nVariable.from_locale(locale)}", :class => 'control-label' %> +
+ <%= f.text_field locale, :class => 'text input-xlarge' %> + +
+
+ <% end %> <% end %> -

- <%= t('admin.design_name') %> - <%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => admin_pages_path} %> -

-

- <%= t('admin.theme') %> - <%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %> -

-

- <%= t('admin.module_app') %> - <%= render :partial => "app_selector", :locals => { :f => f } %> - <%= select('page','app_frontend_url', @app_frontend_urls, :selected => @item.app_frontend_url ) rescue ''%> - <%= select('page','category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}, :selected => @item[:category], :include_blank => true ) rescue ''%> -

-

- <%= f.label :is_published, "#{t('admin.is_published')} ?" %> - <%= f.radio_button :is_published, true %>Yes <%= f.radio_button :is_published, false %> No -

-

- <%= f.label :menu_enabled_for, "#{t('admin.menu_enabled_for')}:" %> - <% @site_valid_locales.each do |valid_locale| %> - <%= check_box_tag 'page[menu_enabled_for][]', valid_locale, (@item.menu_enabled_for.nil? ? true : @item.menu_enabled_for.include?(valid_locale)) %> - <%= I18nVariable.from_locale(valid_locale) %> - <% end %> - <%= hidden_field_tag 'page[menu_enabled_for][]', '' %> -

-

- <%= f.label :enabled_for, "#{t('admin.enabled_for')}:" %> - <% @site_valid_locales.each do |valid_locale| %> - <%= check_box_tag 'page[enabled_for][]', valid_locale, (@item.enabled_for.nil? ? true : @item.enabled_for.include?(valid_locale)) %> - <%= I18nVariable.from_locale(valid_locale) %> - <% end %> - <%= hidden_field_tag 'page[enabled_for][]', '' %> -

+
+ <%= f.label :name, t('admin.design_name'), :class => 'control-label' %> +
+ <%= f.collection_select :design, @designs, :id, :title, {:selected => @design.id}, {:rel => admin_pages_path} %> + +
+
+
+ <%= f.label :name, t('admin.theme'), :class => 'control-label' %> +
+ <%= f.select :theme_id, @design.themes.collect { |t| [t.name.capitalize, t.id] }, :include_blank => true %> + +
+
+
+ <%= f.label :name, t('admin.module_app'), :class => 'control-label' %> +
+ <%= render :partial => "app_selector", :locals => { :f => f } %> + + <%= select('page','app_frontend_url', @app_frontend_urls, :selected => @item.app_frontend_url ) rescue ''%> + + + <%= select('page','category', @categories.collect{|category| [category.i18n_variable[I18n.locale], category.id]}, :selected => @item[:category], :include_blank => true ) rescue ''%> + + +
+
+
+ <%= f.label :is_published, "#{t('admin.is_published')} ?", :class => 'control-label' %> +
+ + + +
+
+
+ <%= f.label :menu_enabled_for, "#{t('admin.menu_enabled_for')}:", :class => 'control-label' %> +
+ <% @site_valid_locales.each do |valid_locale| %> + + <% end %> + <%= hidden_field_tag 'page[menu_enabled_for][]', '' %> + +
+
+ +
+ <%= f.label :enabled_for, "#{t('admin.enabled_for')}:", :class => 'control-label' %> +
+ <% @site_valid_locales.each do |valid_locale| %> + + <% end %> + <%= hidden_field_tag 'page[enabled_for][]', '' %> + +
+
diff --git a/app/views/admin/pages/_new.html.erb b/app/views/admin/pages/_new.html.erb index a2991bec..d3190e0e 100644 --- a/app/views/admin/pages/_new.html.erb +++ b/app/views/admin/pages/_new.html.erb @@ -1,13 +1,11 @@ -

<%= t('admin.new_page') %>

- <%= flash_messages %> - -<%= form_for @item, :url => admin_pages_path, :html => { :class => 'form' } do |f| %> - - <%= render :partial => "form", :locals => { :f => f } %> - -

- <%= f.submit t('create') %> <%= link_back %> -

- -<% end %> \ No newline at end of file +
+

<%= t('admin.new_page') %>

+ <%= form_for @item, :url => admin_page_path, :html => { :class => 'form-horizontal edit_page' } do |f| %> + <%= render :partial => "form", :locals => { :f => f } %> +
+ <%= f.submit t('update'), :class => 'btn btn-primary' %> + <%= link_to t('cancel'), get_go_back, :class=>"btn" %> +
+ <% end %> +
\ No newline at end of file diff --git a/lib/parsers/parser_common.rb b/lib/parsers/parser_common.rb index 180914b3..f9dd868a 100644 --- a/lib/parsers/parser_common.rb +++ b/lib/parsers/parser_common.rb @@ -175,6 +175,7 @@ module ParserCommon ret << "
" if part ret << "' end case part.kind when 'text' @@ -189,7 +190,6 @@ module ParserCommon else '' end if part - ret << '
' if edit end scope = "<#{content.name}" content.attributes.each_pair do |key, value|