From e4de1e34a27740eb9f116fe49bed05aba1702e74 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Sun, 4 Nov 2012 22:05:03 +0800 Subject: [PATCH] add announcement plugin --- .../announcement/plugin/_profile.html.erb | 50 ++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/plugin/_profile.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/plugin/_profile.html.erb index 54b2428e..1be8e9b7 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/plugin/_profile.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/plugin/_profile.html.erb @@ -1 +1,49 @@ -Hello~ I am your plugin profile \ No newline at end of file +<% + if @user + @bulletins = Bulletin.where(:create_user_id => @user.id).page(params[:page]).per(10) + else + @bulletins = Bulletin.all.page(params[:page]).per(10) + end + +%> + + + + + + + + + + <% if not @user%> + + <% end %> + + + + <% @bulletins.each do |bulletin| %> + + + + + <% if not bulletin.deadline.nil?%> + + <%else%> + + <% end %> + + <% if not @user%> + + <% end %> + + <% end %> + +
<%= t('bulletin.category') %><%= t('bulletin.title') %><%= t('bulletin.start_date') %><%= t('bulletin.end_date') %><%= t('bulletin.tags') %><%= t('bulletin.last_modified') %>
<%= bulletin.bulletin_category.title%> + <%= bulletin.title%> + <%= display_date_time(bulletin.postdate) %><%= display_date_time(bulletin.deadline) %><%= t('bulletin.no_deadline') %> +
+ <% bulletin.sorted_tags.each do |tag| %> + <%= tag[I18n.locale] %> + <% end %> +
+
<%= User.find(bulletin.create_user_id).name %>