Changes for announcement widget style 1 and categories
This commit is contained in:
parent
455a27437d
commit
e8e7c38221
|
@ -17,8 +17,8 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<% @bulletins.each do |post| %>
|
||||
<% @widget_fields.each do |wf| %>
|
||||
<tr class="<%= cycle('odd', '')%>">
|
||||
<% @widget_fields.each do |wf| %>
|
||||
<td>
|
||||
<span class="<%= wf[1] %>">
|
||||
<% if wf[1] == 'title' %>
|
||||
|
@ -26,7 +26,7 @@
|
|||
<% elsif wf[1] == 'date' %>
|
||||
<%= display_date(post.send(wf[0])) %>
|
||||
<% elsif wf[1] == 'category' %>
|
||||
<%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").i18n_variable[I18n.locale] rescue nil %>
|
||||
<%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").title rescue nil %>
|
||||
<% elsif wf[1] == 'img' %>
|
||||
<div class="img app-pic"><%= image_tag(post.send(wf[0]).url) %></div>
|
||||
<% elsif wf[1] == 'text' %>
|
||||
|
@ -49,8 +49,8 @@
|
|||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
|
@ -76,7 +76,7 @@
|
|||
<% elsif wf[1] == 'date' %>
|
||||
<%= display_date(post.send(wf[0])) %>
|
||||
<% elsif wf[1] == 'category' %>
|
||||
<%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").i18n_variable[I18n.locale] rescue nil %>
|
||||
<%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").title rescue nil %>
|
||||
<% elsif wf[1] == 'text' %>
|
||||
<%#= post.send("#{wf[0]}[#{I18n.locale}]").html_safe %>
|
||||
<%= post.send("#{wf[0]}").html_safe %>
|
||||
|
@ -124,7 +124,7 @@
|
|||
<% elsif wf[1] == 'date' %>
|
||||
<%= display_date(post.send(wf[0])) %>
|
||||
<% elsif wf[1] == 'category' %>
|
||||
<%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").i18n_variable[I18n.locale] rescue nil %>
|
||||
<%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").title rescue nil %>
|
||||
<% elsif wf[1] == 'text' %>
|
||||
<%#= post.send("#{wf[0]}[#{I18n.locale}]").html_safe %>
|
||||
<%= post.send("#{wf[0]}").html_safe %>
|
||||
|
@ -174,7 +174,7 @@
|
|||
<% elsif wf[1] == 'date' %>
|
||||
<%= display_date(post.send(wf[0])) %>
|
||||
<% elsif wf[1] == 'category' %>
|
||||
<%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").i18n_variable[I18n.locale] rescue nil %>
|
||||
<%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").title rescue nil %>
|
||||
<% elsif wf[1] == 'text' %>
|
||||
<%#= post.send("#{wf[0]}[#{I18n.locale}]").html_safe %>
|
||||
<%= post.send("#{wf[0]}").html_safe %>
|
||||
|
@ -222,7 +222,7 @@
|
|||
<% elsif wf[1] == 'date' %>
|
||||
<%= display_date(post.send(wf[0])) %>
|
||||
<% elsif wf[1] == 'category' %>
|
||||
<%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").i18n_variable[I18n.locale] rescue nil %>
|
||||
<%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").title rescue nil %>
|
||||
<% elsif wf[1] == 'text' %>
|
||||
<%#= post.send("#{wf[0]}[#{I18n.locale}]").html_safe %>
|
||||
<%= post.send("#{wf[0]}").html_safe %>
|
||||
|
|
Reference in New Issue