demo_site widget edit

This commit is contained in:
unknown 2012-08-10 15:33:28 +08:00
parent d5c55c9697
commit 9333503545
4 changed files with 21 additions and 21 deletions

View File

@ -37,4 +37,4 @@ widget_field_type:
- status
- tag
- viewcount
- host
- poster

View File

@ -8,9 +8,9 @@
"create_date": "11-11-2011",
"app_pages": ["bulletins"],
"widgets": {
"index":["1","2"],
"index":["1","2","3","4","5"],
"bulletins_and_web_links":[]
},
"widget_fields":["title","subtitle","date","image","status"],
"widget_fields":["title","category","postdate"],
"enable_frontend": true
}

View File

@ -33,7 +33,7 @@
<% elsif ff[1] == 'category' %>
<%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").i18n_variable[I18n.locale] rescue nil %>
<% elsif ff[1] == 'img' %>
<div class="newsimg app-pic"><%= image_tag(post.image.url) %></div>
<div class="img app-pic"><%= image_tag(post.send(wf[0]).url) %></div>
<% elsif ff[1] == 'text' %>
<%#= post.send("#{ff[0]}[#{I18n.locale}]").html_safe %>
<%= post.send("#{ff[0]}")[I18n.locale].html_safe %>
@ -49,7 +49,7 @@
<% elsif ff[1] == 'tag' %>
<% elsif ff[1] == 'viewcount' %>
<%= dislpay_view_count(post) %>
<% elsif ff[1] == 'host' %>
<% elsif ff[1] == 'poster' %>
<%= User.from_id(post.update_user_id).name rescue ''%>
<% end %>
</span>
@ -66,7 +66,7 @@
<ul class="newslist">
<% @bulletins.each do |post| %>
<li class="<%= cycle('odd', '')%>">
<div class="newsimg app-pic"><%= image_tag(post.image.url) %></div>
<div class="img app-pic"><%= image_tag(post.image.url) %></div>
<% @item.frontend_field.each do |ff| %>
<span class="<%= ff[1] %>">
@ -91,7 +91,7 @@
<% elsif ff[1] == 'tag' %>
<% elsif ff[1] == 'viewcount' %>
<%= dislpay_view_count(post) %>
<% elsif ff[1] == 'host' %>
<% elsif ff[1] == 'poster' %>
<%= User.from_id(post.update_user_id).name rescue ''%>
<% end %>
</span>
@ -108,7 +108,7 @@
<% @bulletins.each do |post| %>
<li class="<%= cycle('odd', '')%>">
<div class="newsimg app-pic"><%= image_tag(post.image.url) %></div>
<div class="img app-pic"><%= image_tag(post.image.url) %></div>
<div class="wrap">
<% @item.frontend_field.each do |ff| %>
<span class="<%= ff[1] %>">
@ -133,7 +133,7 @@
<% elsif ff[1] == 'tag' %>
<% elsif ff[1] == 'viewcount' %>
<%= dislpay_view_count(post) %>
<% elsif ff[1] == 'host' %>
<% elsif ff[1] == 'poster' %>
<%= User.from_id(post.update_user_id).name rescue ''%>
<% end %>
</span>
@ -152,7 +152,7 @@
<% @bulletins.each do |post| %>
<li class="<%= cycle('odd', '')%>">
<div class="newsimg app-pic"><%= image_tag(post.image.url) %></div>
<div class="img app-pic"><%= image_tag(post.image.url) %></div>
<div class="wrap">
<% @item.frontend_field.each do |ff| %>
<span class="<%= ff[1] %>">
@ -177,7 +177,7 @@
<% elsif ff[1] == 'tag' %>
<% elsif ff[1] == 'viewcount' %>
<%= dislpay_view_count(post) %>
<% elsif ff[1] == 'host' %>
<% elsif ff[1] == 'poster' %>
<%= User.from_id(post.update_user_id).name rescue ''%>
<% end %>
</span>
@ -219,7 +219,7 @@
<% elsif ff[1] == 'tag' %>
<% elsif ff[1] == 'viewcount' %>
<%= dislpay_view_count(post) %>
<% elsif ff[1] == 'host' %>
<% elsif ff[1] == 'poster' %>
<%= User.from_id(post.update_user_id).name rescue ''%>
<% end %>
</span>

View File

@ -28,7 +28,7 @@
<% elsif wf[1] == 'category' %>
<%= post.send("#{post.class.to_s.underscore}_#{wf[0]}").i18n_variable[I18n.locale] rescue nil %>
<% elsif wf[1] == 'img' %>
<div class="newsimg 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' %>
<%#= post.send("#{wf[0]}[#{I18n.locale}]").html_safe %>
<%= post.send("#{wf[0]}")[I18n.locale].html_safe %>
@ -44,7 +44,7 @@
<% elsif wf[1] == 'tag' %>
<% elsif wf[1] == 'viewcount' %>
<%= dislpay_view_count(post) %>
<% elsif wf[1] == 'host' %>
<% elsif wf[1] == 'poster' %>
<%= User.from_id(post.update_user_id).name rescue ''%>
<% end %>
</span>
@ -67,7 +67,7 @@
<ul class="newslist">
<% @bulletins.each do |post| %>
<li class="<%= cycle('odd', '')%>">
<div class="newsimg app-pic"><%= image_tag(post.image.url) %></div>
<div class="img app-pic"><%= image_tag(post.image.url) %></div>
<% @widget_fields.each do |wf| %>
<span class="<%= wf[1] %>">
@ -92,7 +92,7 @@
<% elsif wf[1] == 'tag' %>
<% elsif wf[1] == 'viewcount' %>
<%= dislpay_view_count(post) %>
<% elsif wf[1] == 'host' %>
<% elsif wf[1] == 'poster' %>
<%= User.from_id(post.update_user_id).name rescue ''%>
<% end %>
</span>
@ -115,7 +115,7 @@
<% @bulletins.each do |post| %>
<li class="<%= cycle('odd', '')%>">
<div class="newsimg app-pic"><%= image_tag(post.image.url) %></div>
<div class="img app-pic"><%= image_tag(post.image.url) %></div>
<div class="wrap">
<% @widget_fields.each do |wf| %>
<span class="<%= wf[1] %>">
@ -140,7 +140,7 @@
<% elsif wf[1] == 'tag' %>
<% elsif wf[1] == 'viewcount' %>
<%= dislpay_view_count(post) %>
<% elsif wf[1] == 'host' %>
<% elsif wf[1] == 'poster' %>
<%= User.from_id(post.update_user_id).name rescue ''%>
<% end %>
</span>
@ -165,7 +165,7 @@
<% @bulletins.each do |post| %>
<li class="<%= cycle('odd', '')%>">
<div class="newsimg app-pic"><%= image_tag(post.image.url) %></div>
<div class="img app-pic"><%= image_tag(post.image.url) %></div>
<div class="wrap">
<% @widget_fields.each do |wf| %>
<span class="<%= wf[1] %>">
@ -190,7 +190,7 @@
<% elsif wf[1] == 'tag' %>
<% elsif wf[1] == 'viewcount' %>
<%= dislpay_view_count(post) %>
<% elsif wf[1] == 'host' %>
<% elsif wf[1] == 'poster' %>
<%= User.from_id(post.update_user_id).name rescue ''%>
<% end %>
</span>
@ -238,7 +238,7 @@
<% elsif wf[1] == 'tag' %>
<% elsif wf[1] == 'viewcount' %>
<%= dislpay_view_count(post) %>
<% elsif wf[1] == 'host' %>
<% elsif wf[1] == 'poster' %>
<%= User.from_id(post.update_user_id).name rescue ''%>
<% end %>
</span>