diff --git a/app/controllers/admin/links_controller.rb b/app/controllers/admin/links_controller.rb index 7c7b4030..5eece0ca 100644 --- a/app/controllers/admin/links_controller.rb +++ b/app/controllers/admin/links_controller.rb @@ -1,10 +1,4 @@ -class Admin::LinksController < ApplicationController - - layout "site_editor" - - before_filter :authenticate_user! - before_filter :find_parent_item - before_filter :is_admin? +class Admin::LinksController < Admin::ItemsController def show @item ||= Link.find(params[:id]) diff --git a/app/controllers/admin/pages_controller.rb b/app/controllers/admin/pages_controller.rb index cf935a09..0e58a00f 100644 --- a/app/controllers/admin/pages_controller.rb +++ b/app/controllers/admin/pages_controller.rb @@ -1,11 +1,4 @@ -class Admin::PagesController < ApplicationController - - layout "site_editor" - - before_filter :authenticate_user! - before_filter :find_parent_item - before_filter :is_admin? - before_filter :set_current_item +class Admin::PagesController < Admin::ItemsController def show @item = Page.find(params[:id]) @@ -40,7 +33,7 @@ class Admin::PagesController < ApplicationController @frontend_path = @item.app_frontend_url ? @item.app_frontend_url : @module_app.widgets.keys[0] - if @module_app.widgets.any?{|b| b.class == Array} + if @module_app && @module_app.widgets && @module_app.widgets.any?{|b| b.class == Array} @frontend_style = @module_app.widgets[@frontend_path] if !@frontend_path.blank? && !@module_app.widgets.blank? end diff --git a/app/views/admin/pages/_edit.html.erb b/app/views/admin/pages/_edit.html.erb index 8fd63c12..c94786bb 100644 --- a/app/views/admin/pages/_edit.html.erb +++ b/app/views/admin/pages/_edit.html.erb @@ -1,4 +1,4 @@ -<%= flash_messages %> +<%#= flash_messages %>

<%= t('editing.page') %>

<%= form_for @item, :url => admin_page_path(@item), :html => { :class => 'form-horizontal edit_page' } do |f| %> diff --git a/app/views/admin/pages/_new.html.erb b/app/views/admin/pages/_new.html.erb index c62d530b..3f725e0b 100644 --- a/app/views/admin/pages/_new.html.erb +++ b/app/views/admin/pages/_new.html.erb @@ -1,4 +1,4 @@ -<%= flash_messages %> +<%#= flash_messages %>

<%= t('new.page') %>

<%= form_for @item, :url => admin_pages_path, :html => { :class => 'form-horizontal edit_page' } do |f| %> diff --git a/app/views/admin/pages/_show.html.erb b/app/views/admin/pages/_show.html.erb index 29d532fb..d33d08bd 100644 --- a/app/views/admin/pages/_show.html.erb +++ b/app/views/admin/pages/_show.html.erb @@ -1,4 +1,4 @@ -<%= flash_messages %> +<%#= flash_messages %> <%= page_stylesheets(@item, true).html_safe %> diff --git a/app/views/admin/pages/create.js.erb b/app/views/admin/pages/create.js.erb index efeb27a1..7ce5b016 100644 --- a/app/views/admin/pages/create.js.erb +++ b/app/views/admin/pages/create.js.erb @@ -1,3 +1,3 @@ -$('#back_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>"); $('#back_main').html("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>"); +$('#back_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>"); history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>"); \ No newline at end of file diff --git a/app/views/admin/pages/update.js.erb b/app/views/admin/pages/update.js.erb index 26561d07..7ce5b016 100644 --- a/app/views/admin/pages/update.js.erb +++ b/app/views/admin/pages/update.js.erb @@ -1,2 +1,3 @@ $('#back_main').html("<%= escape_javascript(render(:partial => 'admin/pages/show')) %>"); +$('#back_sidebar').html("<%= escape_javascript(render(:partial => 'admin/items/site_map_left_bar')) %>"); history.pushState(null, document.title, "<%= escape_javascript(admin_page_url(@item)) %>"); \ No newline at end of file diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_form.html.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_form.html.erb index 345390df..03609336 100644 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_form.html.erb +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/_form.html.erb @@ -15,7 +15,7 @@
<%= label_tag "name-#{locale}", "Name-#{I18nVariable.from_locale(locale)}", :class => 'control-label' %>
- <%= f.text_field locale, :class =>' input-xxlarge', :value => (@archive_file_category.title[locale] rescue nil) %> + <%= f.text_field locale, :class =>' input-xxlarge', :value => (@archive_file_category.title_translations[locale] rescue nil) %>
<% end %> diff --git a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/update.js.erb b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/update.js.erb index 9a6f431e..2c5cf21e 100644 --- a/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/update.js.erb +++ b/vendor/built_in_modules/archive/app/views/panel/archive/back_end/archive_file_categorys/update.js.erb @@ -1,4 +1,4 @@ -$("#<%= dom_id @archive_file_category %>").replaceWith("<%= j render :partial => 'link_category', :collection => [@archive_file_category] %>"); -<% @archive_file_category = WebLinkCategory.new(:display => 'List') # reset for new form %> +$("#<%= dom_id @archive_file_category %>").replaceWith("<%= j render :partial => 'archive_file_category', :collection => [@archive_file_category] %>"); +<% @archive_file_category = ArchiveFileCategory.new(:display => 'List') # reset for new form %> $(".edit_archive_file_category").replaceWith("<%= j render "form" %>") $(".new_archive_file_category")[0].reset(); \ No newline at end of file