default widget link.

make sure to run
rake migrate:make_default_widget_work_config
for changing announcement module app
This commit is contained in:
Fu Matthew authored and chris committed 2013-01-07 17:20:37 +08:00
1 parent a34da20e48
commit 5793f0fe5d
16 files changed
+100 -50

No files matched your search

@@ -4,8 +4,8 @@
<% @module_app.widget_fields.each_with_index do |widget_field, i| %>
<%= i+1 %>
<%= select_tag "page_part[widget_field][]", options_for_select(@module_app.widget_fields.collect{|widget_field| [widget_field.humanize, widget_field]}, (@part[:widget_field][i][0] if (@part && !@part[:widget_field].blank? && !@part[:widget_field][i].blank?)) ), :include_blank => true %>
<%= select_tag "page_part[widget_field_type][]", options_for_select(LIST[:widget_field_type].collect{|widget_field| [widget_field.humanize, widget_field]}, (@part[:widget_field][i][1] if (@part && !@part[:widget_field].blank? && !@part[:widget_field][i].blank?)) ), :include_blank => true %> <br />
<%= select_tag "page_part[widget_field][]", widget_field_options(i), :include_blank => true %>
<%= select_tag "page_part[widget_field_type][]", widget_fiield_type_options(i), :include_blank => true %> <br />
<% end %>
<%= label_tag :widget_data_count %>
+2 -8
View File
@@ -4,20 +4,14 @@
<thead>
<tr>
<% @fields.each do |field|%>
<th><%= content_tag(:span,field[0],:class=>field[1])%></th>
<th><%= content_tag(:span,get_field_header(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>
<% 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 %>
<td><%= content_tag(:span,link_to_field(row_data,field[0]),:class=>field[1])%></td>
<% end %>
</tr>
<% end %>
+1 -7
View File
@@ -7,13 +7,7 @@
</div>
<div class="wrap">
<% @fields.each do |field|%>
<% if field[0] == "bulletin_category"%>
<%= content_tag(:span,row_data.send(field[0]).title,:class=>field[1])%>
<% elsif field[0] == "title" %>
<%= content_tag(:span, link_to(row_data.send(field[0]), panel_announcement_front_end_bulletin_path(row_data)), :class=>field[1]) %>
<% else %>
<%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%>
<% end %>
<%= content_tag(:span,link_to_field(row_data,field[0]),:class=>field[1])%>
<% end %>
</div>
<% end %>
+1 -7
View File
@@ -6,13 +6,7 @@
<% @data.each do |row_data| %>
<%= content_tag(:li) do %>
<% @fields.each do |field|%>
<% if field[0] == "bulletin_category"%>
<%= content_tag(:span,row_data.send(field[0]).title,:class=>field[1])%>
<% elsif field[0] == "title" %>
<%= content_tag(:span, link_to(row_data.send(field[0]), panel_announcement_front_end_bulletin_path(row_data)), :class=>field[1]) %>
<% else %>
<%= content_tag(:span,row_data.send(field[0]),:class=>field[1])%>
<% end %>
<%= content_tag(:span,link_to_field(row_data,field[0]),:class=>field[1])%>
<% end %>
<% end %>
<% end %>