Changes for default index:

- remove approvable and filterable
 - add display_option
 - change params
Update web link and gallery index
This commit is contained in:
chris committed 2013-07-25 11:32:25 +08:00
1 parent af0ab9f0d3
commit 1dc7884ec0
7 files changed
+129 -102

No files matched your search

@@ -1,7 +1,5 @@
<% set_default_index do
objects @bulletins
filterable
sortable
quick_edit_link type: 'edit',
link: 'edit_panel_announcement_back_end_bulletin_path'
quick_edit_link type: 'detail'
@@ -10,42 +8,42 @@
quick_edit_link type: 'approval',
link: 'panel_announcement_back_end_bulletin_approval_preview_path'
quick_edit_link type: 'reject_reason'
field type: 'image',
db_field: 'image',
translation: 'preview',
hide: 'phone'
field type: 'status',
db_field: @statuses,
translation: 'status',
hide: 'phone',
sort: 'status'
field type: 'associated',
associated_value: 'title',
db_field: 'category',
model_field: 'title',
translation: 'category',
hide: 'phone',
sort: 'category'
field type: 'field',
db_field: 'title',
field db_field: 'title',
translation: 'title',
sort: 'title',
link: 'panel_announcement_front_end_bulletin_path',
display_option: 'link_to value, panel_announcement_front_end_bulletin_path(object)',
quick_edit: true,
header_class: 'span5'
field type: 'date',
db_field: 'postdate',
field db_field: 'postdate',
translation: 'start_date',
hide: 'phone',
sort: 'start_date'
field type: 'date',
db_field: 'deadline',
field db_field: 'deadline',
translation: 'end_date',
hide: 'phone',
sort: 'end_date'
field type: 'tags',
db_field: 'tags',
translation: 'tags',
hide: 'all',
sort: 'tags'
field type: 'id',
id_model: 'User',
db_field: 'update_user_id',
model: User,
model_field: 'name',
translation: 'last_modified',
hide: 'phone',
sort: 'last_modified'
@@ -1,7 +1,5 @@
<% set_default_index do
objects @archive_files
filterable
sortable
quick_edit_link type: 'edit',
link: 'edit_panel_archive_back_end_archive_file_path'
quick_edit_link type: 'detail'
@@ -14,23 +12,27 @@
sort: 'status',
header_class: 'span2'
field type: 'associated',
associated_value: 'title',
db_field: 'category',
model_field: 'title',
translation: 'category',
hide: 'phone',
sort: 'category',
header_class: 'span2'
field type: 'field',
db_field: 'title',
field db_field: 'title',
translation: 'title',
sort: 'title',
link: 'panel_archive_front_end_archive_file_path',
quick_edit: true
display_option: 'link_to value, panel_archive_front_end_archive_file_path(object)',
quick_edit: true,
header_class: 'span5'
field type: 'tags',
db_field: 'tags',
translation: 'tags',
hide: 'all',
sort: 'tags'
field type: 'associated',
db_field: 'archive_file_multiples',
translation: 'file_',
display_option: "content_tag(:span, link_to(content_tag(:i) + object.file_identifier, object.file.url, target: '_blank'), class: 'file-type') unless object.file.blank?",
hide: 'all',
header_class: 'span2'
filter_field type: 'array',
values: @statuses,
translation: 'status'
@@ -46,3 +48,7 @@
end %>
<%= render 'admin/default_index/index' %>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "lib/file-type" %>
<% end %>
@@ -1,29 +1,24 @@
<% set_default_index do
objects @albums
filterable
filter_field type: 'objects',
values: @tags,
translation: 'tags',
object_field: 'name'
footer link: 'new_panel_gallery_back_end_album_path',
paginate: false
end %>
<%= render 'admin/default_index/index' %>
<ul id="orbit_gallery" class="gallery" data-gallery-id="gallery">
<% @albums.each do |album| %>
<%= render :partial => "album", :object => album %>
<% end %>
</ul>
<%= stylesheet_link_tag "gallery" %>
<%#= stylesheet_link_tag "filter" %>
<% content_for :page_specific_css do %>
<%= stylesheet_link_tag "gallery" %>
<% end %>
<!-- Bottom Nav -->
<div class="bottomnav clearfix">
<div class="action pull-right">
<a href="<%= new_panel_gallery_back_end_album_path %>" class="btn btn-primary"><i class="icons-plus"></i> Add New</a>
</div>
</div>
</div>
<ul id="orbit_gallery" class="gallery" data-gallery-id="gallery">
<% @albums.each do |album| %>
<%= render :partial => "album", :object => album %>
<% end %>
</ul>
<% content_for :page_specific_javascript do %>
<%= javascript_include_tag "jquery.masonry.min.js" %>
<%= javascript_include_tag "jquery.mu.image.resize.js" %>
@@ -1,7 +1,5 @@
<% set_default_index do
objects @web_links
filterable
sortable
quick_edit_link type: 'edit',
link: 'edit_panel_web_resource_back_end_web_link_path'
quick_edit_link type: 'detail'
@@ -14,22 +12,19 @@
sort: 'status',
header_class: 'span2'
field type: 'associated',
associated_value: 'title',
db_field: 'category',
model_field: 'title',
translation: 'category',
hide: 'phone',
sort: 'category',
header_class: 'span2'
field type: 'field',
db_field: 'title',
field db_field: 'title',
translation: 'title',
sort: 'title',
link: 'panel_web_resource_front_end_web_link_path',
display_option: 'link_to value, panel_web_resource_front_end_web_link_path(object)',
quick_edit: true,
header_class: 'span5'
field type: 'tags',
db_field: 'tags',
translation: 'tags',
hide: 'all',
sort: 'tags'
filter_field type: 'array',