orbit-basic/app/views/default_widget/typeA.html.erb

26 lines
982 B
Plaintext
Raw Normal View History

2013-01-03 11:38:14 +00:00
<%= content_tag :div,:class=>@tag_class do%>
<div class="defulat_widget_type_A">
<table class="defulat_widget_tb" border="0" cellpadding="0" cellspacing="0" >
<thead>
<tr>
<% @fields.each do |field|%>
<th><%= content_tag(:span,field[0],:class=>field[1])%></th>
<% end %>
</tr>
</thead>
<% @data.each do |row_data| %>
<tr>
<% @fields.each do |field|%>
<% if field[0] == "bulletin_category"%>
<td><%= content_tag(:span,row_data.send(field[0]).title,:class=>field[1])%></td>
2013-01-04 04:33:37 +00:00
<% elsif field[0] == "title" %>
<td><%= content_tag(:span, link_to(row_data.send(field[0]), panel_announcement_front_end_bulletin_path(row_data)), :class=>field[1]) %></td>
<% else %>
<td><%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%></td>
<% end %>
2013-01-03 11:38:14 +00:00
<% end %>
</tr>
<% end %>
</table>
<% end %>