demo_site widget edit
This commit is contained in:
parent
d5c55c9697
commit
9333503545
|
@ -37,4 +37,4 @@ widget_field_type:
|
||||||
- status
|
- status
|
||||||
- tag
|
- tag
|
||||||
- viewcount
|
- viewcount
|
||||||
- host
|
- poster
|
|
@ -8,9 +8,9 @@
|
||||||
"create_date": "11-11-2011",
|
"create_date": "11-11-2011",
|
||||||
"app_pages": ["bulletins"],
|
"app_pages": ["bulletins"],
|
||||||
"widgets": {
|
"widgets": {
|
||||||
"index":["1","2"],
|
"index":["1","2","3","4","5"],
|
||||||
"bulletins_and_web_links":[]
|
"bulletins_and_web_links":[]
|
||||||
},
|
},
|
||||||
"widget_fields":["title","subtitle","date","image","status"],
|
"widget_fields":["title","category","postdate"],
|
||||||
"enable_frontend": true
|
"enable_frontend": true
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
<% elsif ff[1] == 'category' %>
|
<% elsif ff[1] == 'category' %>
|
||||||
<%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").i18n_variable[I18n.locale] rescue nil %>
|
<%= post.send("#{post.class.to_s.underscore}_#{ff[0]}").i18n_variable[I18n.locale] rescue nil %>
|
||||||
<% elsif ff[1] == 'img' %>
|
<% 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' %>
|
<% elsif ff[1] == 'text' %>
|
||||||
<%#= post.send("#{ff[0]}[#{I18n.locale}]").html_safe %>
|
<%#= post.send("#{ff[0]}[#{I18n.locale}]").html_safe %>
|
||||||
<%= 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] == 'tag' %>
|
||||||
<% elsif ff[1] == 'viewcount' %>
|
<% elsif ff[1] == 'viewcount' %>
|
||||||
<%= dislpay_view_count(post) %>
|
<%= dislpay_view_count(post) %>
|
||||||
<% elsif ff[1] == 'host' %>
|
<% elsif ff[1] == 'poster' %>
|
||||||
<%= User.from_id(post.update_user_id).name rescue ''%>
|
<%= User.from_id(post.update_user_id).name rescue ''%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
<ul class="newslist">
|
<ul class="newslist">
|
||||||
<% @bulletins.each do |post| %>
|
<% @bulletins.each do |post| %>
|
||||||
<li class="<%= cycle('odd', '')%>">
|
<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| %>
|
<% @item.frontend_field.each do |ff| %>
|
||||||
<span class="<%= ff[1] %>">
|
<span class="<%= ff[1] %>">
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
<% elsif ff[1] == 'tag' %>
|
<% elsif ff[1] == 'tag' %>
|
||||||
<% elsif ff[1] == 'viewcount' %>
|
<% elsif ff[1] == 'viewcount' %>
|
||||||
<%= dislpay_view_count(post) %>
|
<%= dislpay_view_count(post) %>
|
||||||
<% elsif ff[1] == 'host' %>
|
<% elsif ff[1] == 'poster' %>
|
||||||
<%= User.from_id(post.update_user_id).name rescue ''%>
|
<%= User.from_id(post.update_user_id).name rescue ''%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
|
|
||||||
<% @bulletins.each do |post| %>
|
<% @bulletins.each do |post| %>
|
||||||
<li class="<%= cycle('odd', '')%>">
|
<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">
|
<div class="wrap">
|
||||||
<% @item.frontend_field.each do |ff| %>
|
<% @item.frontend_field.each do |ff| %>
|
||||||
<span class="<%= ff[1] %>">
|
<span class="<%= ff[1] %>">
|
||||||
|
@ -133,7 +133,7 @@
|
||||||
<% elsif ff[1] == 'tag' %>
|
<% elsif ff[1] == 'tag' %>
|
||||||
<% elsif ff[1] == 'viewcount' %>
|
<% elsif ff[1] == 'viewcount' %>
|
||||||
<%= dislpay_view_count(post) %>
|
<%= dislpay_view_count(post) %>
|
||||||
<% elsif ff[1] == 'host' %>
|
<% elsif ff[1] == 'poster' %>
|
||||||
<%= User.from_id(post.update_user_id).name rescue ''%>
|
<%= User.from_id(post.update_user_id).name rescue ''%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
|
|
||||||
<% @bulletins.each do |post| %>
|
<% @bulletins.each do |post| %>
|
||||||
<li class="<%= cycle('odd', '')%>">
|
<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">
|
<div class="wrap">
|
||||||
<% @item.frontend_field.each do |ff| %>
|
<% @item.frontend_field.each do |ff| %>
|
||||||
<span class="<%= ff[1] %>">
|
<span class="<%= ff[1] %>">
|
||||||
|
@ -177,7 +177,7 @@
|
||||||
<% elsif ff[1] == 'tag' %>
|
<% elsif ff[1] == 'tag' %>
|
||||||
<% elsif ff[1] == 'viewcount' %>
|
<% elsif ff[1] == 'viewcount' %>
|
||||||
<%= dislpay_view_count(post) %>
|
<%= dislpay_view_count(post) %>
|
||||||
<% elsif ff[1] == 'host' %>
|
<% elsif ff[1] == 'poster' %>
|
||||||
<%= User.from_id(post.update_user_id).name rescue ''%>
|
<%= User.from_id(post.update_user_id).name rescue ''%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
@ -219,7 +219,7 @@
|
||||||
<% elsif ff[1] == 'tag' %>
|
<% elsif ff[1] == 'tag' %>
|
||||||
<% elsif ff[1] == 'viewcount' %>
|
<% elsif ff[1] == 'viewcount' %>
|
||||||
<%= dislpay_view_count(post) %>
|
<%= dislpay_view_count(post) %>
|
||||||
<% elsif ff[1] == 'host' %>
|
<% elsif ff[1] == 'poster' %>
|
||||||
<%= User.from_id(post.update_user_id).name rescue ''%>
|
<%= User.from_id(post.update_user_id).name rescue ''%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<% 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]}").i18n_variable[I18n.locale] rescue nil %>
|
||||||
<% elsif wf[1] == 'img' %>
|
<% 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' %>
|
<% elsif wf[1] == 'text' %>
|
||||||
<%#= post.send("#{wf[0]}[#{I18n.locale}]").html_safe %>
|
<%#= post.send("#{wf[0]}[#{I18n.locale}]").html_safe %>
|
||||||
<%= 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] == 'tag' %>
|
||||||
<% elsif wf[1] == 'viewcount' %>
|
<% elsif wf[1] == 'viewcount' %>
|
||||||
<%= dislpay_view_count(post) %>
|
<%= dislpay_view_count(post) %>
|
||||||
<% elsif wf[1] == 'host' %>
|
<% elsif wf[1] == 'poster' %>
|
||||||
<%= User.from_id(post.update_user_id).name rescue ''%>
|
<%= User.from_id(post.update_user_id).name rescue ''%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
<ul class="newslist">
|
<ul class="newslist">
|
||||||
<% @bulletins.each do |post| %>
|
<% @bulletins.each do |post| %>
|
||||||
<li class="<%= cycle('odd', '')%>">
|
<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| %>
|
<% @widget_fields.each do |wf| %>
|
||||||
<span class="<%= wf[1] %>">
|
<span class="<%= wf[1] %>">
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
<% elsif wf[1] == 'tag' %>
|
<% elsif wf[1] == 'tag' %>
|
||||||
<% elsif wf[1] == 'viewcount' %>
|
<% elsif wf[1] == 'viewcount' %>
|
||||||
<%= dislpay_view_count(post) %>
|
<%= dislpay_view_count(post) %>
|
||||||
<% elsif wf[1] == 'host' %>
|
<% elsif wf[1] == 'poster' %>
|
||||||
<%= User.from_id(post.update_user_id).name rescue ''%>
|
<%= User.from_id(post.update_user_id).name rescue ''%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
|
|
||||||
<% @bulletins.each do |post| %>
|
<% @bulletins.each do |post| %>
|
||||||
<li class="<%= cycle('odd', '')%>">
|
<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">
|
<div class="wrap">
|
||||||
<% @widget_fields.each do |wf| %>
|
<% @widget_fields.each do |wf| %>
|
||||||
<span class="<%= wf[1] %>">
|
<span class="<%= wf[1] %>">
|
||||||
|
@ -140,7 +140,7 @@
|
||||||
<% elsif wf[1] == 'tag' %>
|
<% elsif wf[1] == 'tag' %>
|
||||||
<% elsif wf[1] == 'viewcount' %>
|
<% elsif wf[1] == 'viewcount' %>
|
||||||
<%= dislpay_view_count(post) %>
|
<%= dislpay_view_count(post) %>
|
||||||
<% elsif wf[1] == 'host' %>
|
<% elsif wf[1] == 'poster' %>
|
||||||
<%= User.from_id(post.update_user_id).name rescue ''%>
|
<%= User.from_id(post.update_user_id).name rescue ''%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
|
|
||||||
<% @bulletins.each do |post| %>
|
<% @bulletins.each do |post| %>
|
||||||
<li class="<%= cycle('odd', '')%>">
|
<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">
|
<div class="wrap">
|
||||||
<% @widget_fields.each do |wf| %>
|
<% @widget_fields.each do |wf| %>
|
||||||
<span class="<%= wf[1] %>">
|
<span class="<%= wf[1] %>">
|
||||||
|
@ -190,7 +190,7 @@
|
||||||
<% elsif wf[1] == 'tag' %>
|
<% elsif wf[1] == 'tag' %>
|
||||||
<% elsif wf[1] == 'viewcount' %>
|
<% elsif wf[1] == 'viewcount' %>
|
||||||
<%= dislpay_view_count(post) %>
|
<%= dislpay_view_count(post) %>
|
||||||
<% elsif wf[1] == 'host' %>
|
<% elsif wf[1] == 'poster' %>
|
||||||
<%= User.from_id(post.update_user_id).name rescue ''%>
|
<%= User.from_id(post.update_user_id).name rescue ''%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
@ -238,7 +238,7 @@
|
||||||
<% elsif wf[1] == 'tag' %>
|
<% elsif wf[1] == 'tag' %>
|
||||||
<% elsif wf[1] == 'viewcount' %>
|
<% elsif wf[1] == 'viewcount' %>
|
||||||
<%= dislpay_view_count(post) %>
|
<%= dislpay_view_count(post) %>
|
||||||
<% elsif wf[1] == 'host' %>
|
<% elsif wf[1] == 'poster' %>
|
||||||
<%= User.from_id(post.update_user_id).name rescue ''%>
|
<%= User.from_id(post.update_user_id).name rescue ''%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in New Issue