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