change order of display menu of categories of news_bulletin and bulletin.

This commit is contained in:
Matthew K. Fu JuYuan 2012-06-26 14:28:21 +08:00
parent 56b1bd9eaa
commit 2b54067ecb
6 changed files with 25 additions and 13 deletions

View File

@ -12,4 +12,12 @@ module Panel::Announcement::BackEnd::BulletinsHelper
by_bulletin or by_user
end
def show_bulletin_title_at_index (bulletin)
if bulletin.is_checked?
link_to bulletin.title[I18n.locale], panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category.id) rescue ''
else
bulletin.title[I18n.locale]
end
end
end

View File

@ -4,14 +4,13 @@
<%= bulletin_category.key %>
<div class="quick-edit">
<ul class="nav nav-pills hide">
<%if is_manager? || is_admin? %>
<li><%= show_anc_cate_permission_link(bulletin_category) %></li>
<% end %>
<% if is_admin?%>
<li><%= link_to t('bulletin_category.edit'), edit_panel_announcement_back_end_bulletin_category_path(bulletin_category), :remote => true %></li>
<li><%= link_to t('bulletin_category.delete'), panel_announcement_back_end_bulletin_category_path(bulletin_category), :confirm => t('announcement.sure?'), :method => :delete, :remote => true %></li>
<% end %>
<%if is_manager? || is_admin? %>
<li><%= show_anc_cate_permission_link(bulletin_category) %></li>
<% end %>
</ul>
</div>
</td>

View File

@ -30,8 +30,7 @@
</td>
<td><%= bulletin.bulletin_category.i18n_variable[I18n.locale] rescue nil %></td>
<td>
<%= link_to bulletin.title[I18n.locale], panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category.id) rescue ''%>
<%= show_bulletin_title_at_index bulletin%>
<div class="quick-edit">
<ul class="nav nav-pills hide">
<% if (bulletin.create_user_id == current_user.id) || is_manager? %>

View File

@ -12,4 +12,13 @@ module Panel::News::BackEnd::NewsBulletinsHelper
by_news_bulletin or by_user
end
def show_news_bulletin_title_at_index (news_bulletin)
if news_bulletin.is_checked?
link_to news_bulletin.title[I18n.locale], panel_news_front_end_news_bulletin_path(news_bulletin, :category_id => news_bulletin.news_bulletin_category.id) rescue ''
else
news_bulletin.title[I18n.locale]
end
end
end

View File

@ -4,14 +4,13 @@
<%= news_bulletin_category.key %>
<div class="quick-edit">
<ul class="nav nav-pills hide">
<%if is_manager? || is_admin? %>
<li><%= show_news_cate_permission_link(news_bulletin_category) %></li>
<% end %>
<% if is_admin?%>
<li><%= link_to t('bulletin_category.edit'), edit_panel_news_back_end_news_bulletin_category_path(news_bulletin_category), :remote => true %></li>
<li><%= link_to t('bulletin_category.delete'), panel_news_back_end_news_bulletin_category_path(news_bulletin_category), :confirm => t('announcement.sure?'), :method => :delete, :remote => true %></li>
<% end %>
<%if is_manager? || is_admin? %>
<li><%= show_news_cate_permission_link(news_bulletin_category) %></li>
<% end %>
</ul>
</div>
</td>

View File

@ -29,9 +29,7 @@
</div>
</td>
<td><%= news_bulletin.news_bulletin_category.i18n_variable[I18n.locale] rescue nil %></td>
<td>
<%= link_to news_bulletin.title[I18n.locale], panel_news_front_end_news_bulletin_path(news_bulletin, :category_id => news_bulletin.news_bulletin_category.id) rescue ''%>
<td> <%= show_news_bulletin_title_at_index news_bulletin%>
<div class="quick-edit">
<ul class="nav nav-pills hide">
<% if (news_bulletin.create_user_id == current_user.id) || is_manager? %>