category fix
This commit is contained in:
parent
7f511aee91
commit
4123610d32
|
@ -95,6 +95,8 @@ class AnnouncementsController < ApplicationController
|
||||||
return {}
|
return {}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return {} if announcement.category.disable
|
||||||
|
|
||||||
tags = announcement.tags.map{|tag| {
|
tags = announcement.tags.map{|tag| {
|
||||||
"tag" => tag.name ,
|
"tag" => tag.name ,
|
||||||
"url" => OrbitHelper.page_for_tag(tag)
|
"url" => OrbitHelper.page_for_tag(tag)
|
||||||
|
|
|
@ -16,15 +16,29 @@
|
||||||
<td>
|
<td>
|
||||||
<%= b.status_for_table %>
|
<%= b.status_for_table %>
|
||||||
</td>
|
</td>
|
||||||
<td><%= b.category.title %></td>
|
<td>
|
||||||
|
<%= b.category.title rescue "" %>
|
||||||
|
<% if (b.category.disable rescue false) %>
|
||||||
|
<span class='label'><%= t(:disabled) %></span>
|
||||||
|
<% end %>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<% if b.expired? %>
|
<% if b.expired? %>
|
||||||
<%= b.title %> <span class='label'><%= t(:expired) %></span>
|
<%= b.title %> <span class='label'><%= t(:expired) %></span>
|
||||||
<% elsif !b.approved? %>
|
<% elsif !b.approved? %>
|
||||||
<a href="<%=page_for_bulletin(b)%>" target="_blank"><%= b.title %></a> <span class='label'><%= t(:pending) %></span>
|
<% if (b.category.disable rescue false)%>
|
||||||
|
<%= b.title %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<a href="<%=page_for_bulletin(b)%>" target="_blank"><%= b.title %></a>
|
<a href="<%=page_for_bulletin(b)%>" target="_blank"><%= b.title %></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<span class='label'><%= t(:pending) %></span>
|
||||||
|
<% else %>
|
||||||
|
<% if (b.category.disable rescue false) %>
|
||||||
|
<%= b.title %>
|
||||||
|
<% else %>
|
||||||
|
<a href="<%=page_for_bulletin(b)%>" target="_blank"><%= b.title %></a>
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
<div class="quick-edit">
|
<div class="quick-edit">
|
||||||
<ul class="nav nav-pills">
|
<ul class="nav nav-pills">
|
||||||
<li><a href="#" class="detail-row" onclick="$('#<%= "#{b.id.to_s}-detail" %>').slideToggle(300); return false;"><%= t(:detail) %></a></li>
|
<li><a href="#" class="detail-row" onclick="$('#<%= "#{b.id.to_s}-detail" %>').slideToggle(300); return false;"><%= t(:detail) %></a></li>
|
||||||
|
|
Loading…
Reference in New Issue