fix archive category

fix page adding failed
This commit is contained in:
Fu Matthew 2013-03-04 14:40:29 +08:00
parent ca946fc881
commit 15b9839b76
4 changed files with 4 additions and 4 deletions

View File

@ -2,5 +2,5 @@
<%= t("default_widget.widget_data_count") %>
</label>
<div class="controls">
<%= select_tag(field_name,options_for_select(@module_app.get_registration.get_data_count,field_value )) %>
<%= select_tag(field_name,options_for_select((@module_app.get_registration.get_data_count rescue []),field_value )) %>
</div>

View File

@ -1,7 +1,7 @@
<% if @module_app %>
$('#app_page_category').html("<%= j render :partial => 'admin/page_parts/widget_data_source_category' ,:locals=>{:object=>@page}%>");
$('#app_page_tag').html("<%= j render :partial => 'admin/page_parts/widget_data_source_tag',:locals=>{:object=>@page} %>");
$("#data_count").html("<%= j render :partial => 'admin/pages/data_count_field',:locals=>{:field_name=>'page[frontend_data_count]',:field_value=>@page.frontend_data_count} %>");
$("#data_count").html("<%= j render :partial => 'admin/pages/data_count_field',:locals=>{:field_name=>'page[frontend_data_count]',:field_value=>(@page.frontend_data_count rescue nil)} %>");
<% if !@module_app.app_pages.blank? %>
$('#app_page_url').html("<%= escape_javascript(select 'page', 'app_frontend_url', options_for_select(@app_frontend_urls, @app_frontend_urls.first)) %>");

View File

@ -35,7 +35,7 @@ module Archive
head_label_i18n 'archive.archive',:icon_class=>"icons-archive"
available_for [:admin,:guest,:manager,:sub_manager]
active_for_controllers ({:private=>['archive_file_categorys','archive_files'],:public=>['panel/archive/back_end/tags']})
active_for_object_auth ['BulletinCategory']
# active_for_object_auth ['BulletinCategory']
head_link_path "panel_archive_back_end_archive_files_path"

View File

@ -44,7 +44,7 @@ module Gallery
head_label_i18n 'gallery.gallery',:icon_class=>"icons-pictures"
available_for [:admin,:guest,:manager,:sub_manager]
active_for_controllers ({:private=>['albums','album_images','gallery_categories','/panel/gallery/back_end/tags']})
active_for_object_auth ['BulletinCategory']
active_for_object_auth ['GalleryCategory']
head_link_path "panel_gallery_back_end_albums_path"