From 93335035453a0043b135ab7e79a75a8ffbffd32d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 10 Aug 2012 15:33:28 +0800 Subject: [PATCH] demo_site widget edit --- config/list.yml | 2 +- .../announcement/announcement.json | 4 ++-- .../front_end/bulletins/index.html.erb | 18 +++++++++--------- .../widget/bulletins/_index.html.erb | 18 +++++++++--------- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/config/list.yml b/config/list.yml index 55bebb77..f723c5ff 100644 --- a/config/list.yml +++ b/config/list.yml @@ -37,4 +37,4 @@ widget_field_type: - status - tag - viewcount - - host \ No newline at end of file + - poster \ No newline at end of file diff --git a/vendor/built_in_modules/announcement/announcement.json b/vendor/built_in_modules/announcement/announcement.json index a9f245f2..7d68bc1e 100644 --- a/vendor/built_in_modules/announcement/announcement.json +++ b/vendor/built_in_modules/announcement/announcement.json @@ -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 } diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb index 48d30d1d..8da1b143 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/index.html.erb @@ -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' %> -
<%= image_tag(post.image.url) %>
+
<%= image_tag(post.send(wf[0]).url) %>
<% 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 %> @@ -66,7 +66,7 @@