From f61a81ab56bbd32146f1a3396c0336649a7ca437 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Fri, 2 Nov 2012 16:31:41 +0800 Subject: [PATCH 1/4] done journal --- .../views/panel/personal_journal/plugin/_profile.html.erb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/plugin/_profile.html.erb b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/plugin/_profile.html.erb index cc0a2117..806c4030 100644 --- a/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/plugin/_profile.html.erb +++ b/vendor/built_in_modules/personal_journal/app/views/panel/personal_journal/plugin/_profile.html.erb @@ -29,6 +29,9 @@ <%= t('writing_journal.year') %> <%= t('writing_journal.title') %> + <% if not @user%> + <%= t('writing_journal.authors') %> + <% end %> @@ -41,6 +44,9 @@ <%= link_to writing_journal.create_link, panel_personal_journal_front_end_writing_journal_path(writing_journal) %> + <% if not @user%> + <%= writing_journal.authors %> + <% end %> <% end %> From 0e1f3d81d1d77128b1307f1822eac18c4e22ddc9 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Sun, 4 Nov 2012 22:04:13 +0800 Subject: [PATCH 2/4] relpace tab with sapce --- .../announcement/back_end/bulletins_helper.rb | 2 +- .../back_end/bulletins/_bulletin.html.erb | 148 +++++++++--------- 2 files changed, 75 insertions(+), 75 deletions(-) diff --git a/vendor/built_in_modules/announcement/app/helpers/panel/announcement/back_end/bulletins_helper.rb b/vendor/built_in_modules/announcement/app/helpers/panel/announcement/back_end/bulletins_helper.rb index 7e36a22d..31e08fb4 100644 --- a/vendor/built_in_modules/announcement/app/helpers/panel/announcement/back_end/bulletins_helper.rb +++ b/vendor/built_in_modules/announcement/app/helpers/panel/announcement/back_end/bulletins_helper.rb @@ -49,4 +49,4 @@ module Panel::Announcement::BackEnd::BulletinsHelper end -end \ No newline at end of file +end diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb index ab49549d..c7c835f9 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb @@ -1,78 +1,78 @@ - - <% if (bulletin.create_user_id == current_or_guest_user.id) || is_manager? %> - <%= check_box_tag 'to_delete[]', bulletin.id, false, :class => "checkbox_in_list" %> - <% end -%> - - -
-
- <% if bulletin.is_top? %> - <%= t(:top) %> - <% end %> - <% if bulletin.is_hot? %> - <%= t(:hot) %> - <% end %> - <% if bulletin.is_hidden? %> - <%= t(:hidden) %> - <% end %> - <% if bulletin.is_pending? %> - <%= t(:pending) %> - <% end %> - <% if bulletin.is_checked? %> - <%= t(:passed) %> - <% end %> - <% if bulletin.is_rejected? %> - <%= t(:rejected) %> - <% end %> -
-
- - <%= bulletin.bulletin_category.title rescue nil %> - - <%= show_bulletin_title_at_index bulletin%> -
- +
+ +<%= display_date_time(bulletin.postdate) %> +<%= (bulletin.deadline) ? display_date_time(bulletin.deadline ): t('bulletin.no_deadline') %> + +
+
+ <% bulletin.sorted_tags.each do |tag| %> + <%= tag[I18n.locale] %> + <% end %> +
+
+ +<%= User.from_id(bulletin.update_user_id).name rescue ''%> From 3d5274a6f93a49befae0657ee98a6d01f965a402 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Sun, 4 Nov 2012 22:05:03 +0800 Subject: [PATCH 3/4] 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 %>
From 9f3c3f0d7e75c5e2c91e92ae100faf46da1cd176 Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Mon, 5 Nov 2012 10:37:04 +0800 Subject: [PATCH 4/4] add link of title --- .../app/views/panel/announcement/plugin/_profile.html.erb | 6 +++++- 1 file changed, 5 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 1be8e9b7..2cb15a65 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 @@ -25,7 +25,11 @@ <%= bulletin.bulletin_category.title%> - <%= bulletin.title%> + <% if bulletin.is_checked? %> + <%= link_to bulletin.title, panel_announcement_front_end_bulletin_path(bulletin, :category_id => bulletin.bulletin_category.id) rescue ''%> + <% else %> + <%= bulletin.title%> + <% end %> <%= display_date_time(bulletin.postdate) %> <% if not bulletin.deadline.nil?%>