From bfe0176b74f4b75d371c9569a543d21bde3c73db Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 15 Apr 2015 11:15:25 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/index.html.erb | 1 + app/views/issues/show.html.erb | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 7ac495c8a..951218f98 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -1,6 +1,7 @@

<%= l(:label_issue_tracking) %>

+
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 273243851..1fcd66a7f 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -32,9 +32,9 @@ <% end %>
- + - <%= link_to_attachments @issue, :thumbnails => true %>
+ <%= link_to_attachment_project @issue, :thumbnails => true %>
<% end -%> <%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
@@ -77,7 +77,7 @@ <% end %>
<% unless @issue.disabled_core_fields.include?('done_ratio') %> -
  •  % 完成  : 

    <%= progress_bar(@issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%") %> +
  •  % 完成  : 

    <%= progress_bar(@issue.done_ratio, :width => '0px', :legend => "#{@issue.done_ratio}%") %>
  • <% end %>
    From c607bd5cbfb7b3f781853a77858b687b4caa7f78 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 15 Apr 2015 12:50:27 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=AE=9A=E4=B9=89=E7=BC=BA=E9=99=B7?= =?UTF-8?q?=E4=B8=AD=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 509 +++++++++++++++--------------- app/views/issues/show.html.erb | 4 +- public/stylesheets/project.css | 2 +- 3 files changed, 262 insertions(+), 253 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ab5f0a308..d87d4f0bf 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -81,7 +81,7 @@ module ApplicationHelper def authorize_for(controller, action) User.current.allowed_to?({:controller => controller, :action => action}, @project) end - + # add by nwb def authorize_for_course(controller, action) User.current.allowed_to?({:controller => controller, :action => action}, @course) @@ -128,6 +128,15 @@ module ApplicationHelper end end + def link_to_isuue_user(user, options={}) + if user.is_a?(User) + name = h(user.name(options[:format])) + link_to name, {:controller=> 'users', :action => 'show', id: user.id, host: Setting.user_domain}, :class => "pro_info_p" + else + h(user.to_s) + end + end + def link_to_settings_user(user, options={}) if user.is_a?(User) name = h(user.name(options[:format])) @@ -201,7 +210,7 @@ module ApplicationHelper route_method = options.delete(:download) ? :download_named_attachment_path : :named_attachment_path html_options = options.slice!(:only_path) url = send(route_method, attachment, attachment.filename, options) - url << "?token=#{token}" unless token.nil? + url << "?token=#{token}" unless token.nil? link_to text, url, html_options end @@ -226,18 +235,18 @@ module ApplicationHelper h(text), {:controller => 'repositories', :action => 'revision', :id => repository.project, :repository_id => repository.identifier_param, :rev => rev}, :title => l(:label_revision_id, format_revision(revision)) - ) + ) end # Generates a link to a message def link_to_message(message, options={}, html_options = nil) link_to( - truncate(message.subject, :length => 60), - board_message_path(message.board_id, message.parent_id || message.id, { - :r => (message.parent_id && message.id), - :anchor => (message.parent_id ? "message-#{message.id}" : nil) - }.merge(options)), - html_options + truncate(message.subject, :length => 60), + board_message_path(message.board_id, message.parent_id || message.id, { + :r => (message.parent_id && message.id), + :anchor => (message.parent_id ? "message-#{message.id}" : nil) + }.merge(options)), + html_options ) end @@ -289,8 +298,8 @@ module ApplicationHelper def thumbnail_tag(attachment) link_to image_tag(thumbnail_path(attachment)), - named_attachment_path(attachment, attachment.filename), - :title => attachment.filename + named_attachment_path(attachment, attachment.filename), + :title => attachment.filename end # 图片缩略图链接 @@ -318,9 +327,9 @@ module ApplicationHelper def image_to_function(name, function, html_options = {}) html_options.symbolize_keys! tag(:input, html_options.merge({ - :type => "image", :src => image_path(name), - :onclick => (html_options[:onclick] ? "#{html_options[:onclick]}; " : "") + "#{function};" - })) + :type => "image", :src => image_path(name), + :onclick => (html_options[:onclick] ? "#{html_options[:onclick]}; " : "") + "#{function};" + })) end def format_activity_title(text) @@ -354,7 +363,7 @@ module ApplicationHelper # The given collection may be a subset of the whole project tree # (eg. some intermediate nodes are private and can not be seen) #Modified by nie. - def render_project_nested_lists(projects) + def render_project_nested_lists(projects) s = '' if projects.any? ancestors = [] @@ -383,9 +392,9 @@ module ApplicationHelper if project.try(:project_type) == Project::ProjectType_project unless User.current.member_of?(@project) - s << "" - s << watcher_link(@project, User.current)#, ['whiteButton']) - s << "" + s << "" + s << watcher_link(@project, User.current)#, ['whiteButton']) + s << "" end s << (render :partial => 'projects/project', :locals => {:project => project}).to_s else @@ -398,7 +407,7 @@ module ApplicationHelper @project = original_project end s.html_safe - end + end def render_course_nested_lists(courses) s = '' @@ -433,7 +442,7 @@ module ApplicationHelper end - #added by young + #added by young def render_project_nested_lists_new(projects) s = '' if projects.any? @@ -462,7 +471,7 @@ module ApplicationHelper end s.html_safe end - #end + #end def render_page_hierarchy(pages, node=nil, options={}) content = '' if pages[node] @@ -511,8 +520,8 @@ module ApplicationHelper projects = User.current.memberships.collect(&:project).compact.select(&:active?).uniq if projects.any? options = - ("" + - '').html_safe + ("" + + '').html_safe options << project_tree_options_for_select(projects, :selected => @project) do |p| { :value => project_path(:id => p, :jump => current_menu_item) } @@ -702,15 +711,15 @@ module ApplicationHelper link_to(image_tag('2uparrow.png', :alt => l(:label_sort_highest)), url.merge({"#{name}[move_to]" => 'highest'}), :method => method, :title => l(:label_sort_highest)) + - link_to(image_tag('1uparrow.png', :alt => l(:label_sort_higher)), - url.merge({"#{name}[move_to]" => 'higher'}), - :method => method, :title => l(:label_sort_higher)) + - link_to(image_tag('1downarrow.png', :alt => l(:label_sort_lower)), - url.merge({"#{name}[move_to]" => 'lower'}), - :method => method, :title => l(:label_sort_lower)) + - link_to(image_tag('2downarrow.png', :alt => l(:label_sort_lowest)), - url.merge({"#{name}[move_to]" => 'lowest'}), - :method => method, :title => l(:label_sort_lowest)) + link_to(image_tag('1uparrow.png', :alt => l(:label_sort_higher)), + url.merge({"#{name}[move_to]" => 'higher'}), + :method => method, :title => l(:label_sort_higher)) + + link_to(image_tag('1downarrow.png', :alt => l(:label_sort_lower)), + url.merge({"#{name}[move_to]" => 'lower'}), + :method => method, :title => l(:label_sort_lower)) + + link_to(image_tag('2downarrow.png', :alt => l(:label_sort_lowest)), + url.merge({"#{name}[move_to]" => 'lowest'}), + :method => method, :title => l(:label_sort_lowest)) end def breadcrumb(*args) @@ -794,15 +803,15 @@ module ApplicationHelper def textilizable(*args) options = args.last.is_a?(Hash) ? args.pop : {} case args.size - when 1 - obj = options[:object] - text = args.shift - when 2 - obj = args.shift - attr = args.shift - text = obj.send(attr).to_s - else - raise ArgumentError, 'invalid arguments to textilizable' + when 1 + obj = options[:object] + text = args.shift + when 2 + obj = args.shift + attr = args.shift + text = obj.send(attr).to_s + else + raise ArgumentError, 'invalid arguments to textilizable' end return '' if text.blank? project = options[:project] || @project || (obj && obj.respond_to?(:project) ? obj.project : nil) @@ -958,18 +967,18 @@ module ApplicationHelper # check if page exists wiki_page = link_project.wiki.find_page(page) url = if anchor.present? && wiki_page.present? && (obj.is_a?(WikiContent) || obj.is_a?(WikiContent::Version)) && obj.page == wiki_page - "##{anchor}" - else - case options[:wiki_links] - when :local; "#{page.present? ? Wiki.titleize(page) : ''}.html" + (anchor.present? ? "##{anchor}" : '') - when :anchor; "##{page.present? ? Wiki.titleize(page) : title}" + (anchor.present? ? "_#{anchor}" : '') # used for single-file wiki export - else - wiki_page_id = page.present? ? Wiki.titleize(page) : nil - parent = wiki_page.nil? && obj.is_a?(WikiContent) && obj.page && project == link_project ? obj.page.title : nil - url_for(:only_path => only_path, :controller => 'wiki', :action => 'show', :project_id => link_project, - :id => wiki_page_id, :version => nil, :anchor => anchor, :parent => parent) - end - end + "##{anchor}" + else + case options[:wiki_links] + when :local; "#{page.present? ? Wiki.titleize(page) : ''}.html" + (anchor.present? ? "##{anchor}" : '') + when :anchor; "##{page.present? ? Wiki.titleize(page) : title}" + (anchor.present? ? "_#{anchor}" : '') # used for single-file wiki export + else + wiki_page_id = page.present? ? Wiki.titleize(page) : nil + parent = wiki_page.nil? && obj.is_a?(WikiContent) && obj.page && project == link_project ? obj.page.title : nil + url_for(:only_path => only_path, :controller => 'wiki', :action => 'show', :project_id => link_project, + :id => wiki_page_id, :version => nil, :anchor => anchor, :parent => parent) + end + end link_to(title.present? ? title.html_safe : h(page), url, :class => ('wiki-page' + (wiki_page ? '' : ' new'))) else # project or wiki doesn't exist @@ -1044,110 +1053,110 @@ module ApplicationHelper # project.changesets.visible raises an SQL error because of a double join on repositories if repository && (changeset = Changeset.visible.find_by_repository_id_and_revision(repository.id, identifier)) link = link_to(h("#{project_prefix}#{repo_prefix}r#{identifier}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :repository_id => repository.identifier_param, :rev => changeset.revision}, - :class => 'changeset', - :title => truncate_single_line(changeset.comments, :length => 100)) + :class => 'changeset', + :title => truncate_single_line(changeset.comments, :length => 100)) end end elsif sep == '#' oid = identifier.to_i case prefix - when nil - if oid.to_s == identifier && issue = Issue.visible.find_by_id(oid, :include => :status) - anchor = comment_id ? "note-#{comment_id}" : nil - link = link_to("##{oid}", {:only_path => only_path, :controller => 'issues', :action => 'show', :id => oid, :anchor => anchor}, - :class => issue.css_classes, - :title => "#{truncate(issue.subject, :length => 100)} (#{issue.status.name})") - end - when 'document' - if document = Document.visible.find_by_id(oid) - link = link_to h(document.title), {:only_path => only_path, :controller => 'documents', :action => 'show', :id => document}, - :class => 'document' - end - when 'version' - if version = Version.visible.find_by_id(oid) - link = link_to h(version.name), {:only_path => only_path, :controller => 'versions', :action => 'show', :id => version}, - :class => 'version' - end - when 'message' - if message = Message.visible.find_by_id(oid, :include => :parent) - link = link_to_message(message, {:only_path => only_path}, :class => 'message') - end - when 'forum' - if board = Board.visible.find_by_id(oid) - link = link_to h(board.name), {:only_path => only_path, :controller => 'boards', :action => 'show', :id => board, :project_id => board.project}, - :class => 'board' - end - when 'news' - if news = News.visible.find_by_id(oid) - link = link_to h(news.title), {:only_path => only_path, :controller => 'news', :action => 'show', :id => news}, - :class => 'news' - end - when 'project' - if p = Project.visible.find_by_id(oid) - link = link_to_project(p, {:only_path => only_path}, :class => 'project') - end + when nil + if oid.to_s == identifier && issue = Issue.visible.find_by_id(oid, :include => :status) + anchor = comment_id ? "note-#{comment_id}" : nil + link = link_to("##{oid}", {:only_path => only_path, :controller => 'issues', :action => 'show', :id => oid, :anchor => anchor}, + :class => issue.css_classes, + :title => "#{truncate(issue.subject, :length => 100)} (#{issue.status.name})") + end + when 'document' + if document = Document.visible.find_by_id(oid) + link = link_to h(document.title), {:only_path => only_path, :controller => 'documents', :action => 'show', :id => document}, + :class => 'document' + end + when 'version' + if version = Version.visible.find_by_id(oid) + link = link_to h(version.name), {:only_path => only_path, :controller => 'versions', :action => 'show', :id => version}, + :class => 'version' + end + when 'message' + if message = Message.visible.find_by_id(oid, :include => :parent) + link = link_to_message(message, {:only_path => only_path}, :class => 'message') + end + when 'forum' + if board = Board.visible.find_by_id(oid) + link = link_to h(board.name), {:only_path => only_path, :controller => 'boards', :action => 'show', :id => board, :project_id => board.project}, + :class => 'board' + end + when 'news' + if news = News.visible.find_by_id(oid) + link = link_to h(news.title), {:only_path => only_path, :controller => 'news', :action => 'show', :id => news}, + :class => 'news' + end + when 'project' + if p = Project.visible.find_by_id(oid) + link = link_to_project(p, {:only_path => only_path}, :class => 'project') + end end elsif sep == ':' # removes the double quotes if any name = identifier.gsub(%r{^"(.*)"$}, "\\1") case prefix - when 'document' - if project && document = project.documents.visible.find_by_title(name) - link = link_to h(document.title), {:only_path => only_path, :controller => 'documents', :action => 'show', :id => document}, - :class => 'document' - end - when 'version' - if project && version = project.versions.visible.find_by_name(name) - link = link_to h(version.name), {:only_path => only_path, :controller => 'versions', :action => 'show', :id => version}, - :class => 'version' - end - when 'forum' - if project && board = project.boards.visible.find_by_name(name) - link = link_to h(board.name), {:only_path => only_path, :controller => 'boards', :action => 'show', :id => board, :project_id => board.project}, - :class => 'board' - end - when 'news' - if project && news = project.news.visible.find_by_title(name) - link = link_to h(news.title), {:only_path => only_path, :controller => 'news', :action => 'show', :id => news}, - :class => 'news' - end - when 'commit', 'source', 'export' - if project - repository = nil - if name =~ %r{^(([a-z0-9\-_]+)\|)(.+)$} - repo_prefix, repo_identifier, name = $1, $2, $3 - repository = project.repositories.detect {|repo| repo.identifier == repo_identifier} - else - repository = project.repository + when 'document' + if project && document = project.documents.visible.find_by_title(name) + link = link_to h(document.title), {:only_path => only_path, :controller => 'documents', :action => 'show', :id => document}, + :class => 'document' end - if prefix == 'commit' - if repository && (changeset = Changeset.visible.where("repository_id = ? AND scmid LIKE ?", repository.id, "#{name}%").first) - link = link_to h("#{project_prefix}#{repo_prefix}#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :repository_id => repository.identifier_param, :rev => changeset.identifier}, - :class => 'changeset', - :title => truncate_single_line(changeset.comments, :length => 100) + when 'version' + if project && version = project.versions.visible.find_by_name(name) + link = link_to h(version.name), {:only_path => only_path, :controller => 'versions', :action => 'show', :id => version}, + :class => 'version' + end + when 'forum' + if project && board = project.boards.visible.find_by_name(name) + link = link_to h(board.name), {:only_path => only_path, :controller => 'boards', :action => 'show', :id => board, :project_id => board.project}, + :class => 'board' + end + when 'news' + if project && news = project.news.visible.find_by_title(name) + link = link_to h(news.title), {:only_path => only_path, :controller => 'news', :action => 'show', :id => news}, + :class => 'news' + end + when 'commit', 'source', 'export' + if project + repository = nil + if name =~ %r{^(([a-z0-9\-_]+)\|)(.+)$} + repo_prefix, repo_identifier, name = $1, $2, $3 + repository = project.repositories.detect {|repo| repo.identifier == repo_identifier} + else + repository = project.repository end - else - if repository && User.current.allowed_to?(:browse_repository, project) - name =~ %r{^[/\\]*(.*?)(@([^/\\@]+?))?(#(L\d+))?$} - path, rev, anchor = $1, $3, $5 - link = link_to h("#{project_prefix}#{prefix}:#{repo_prefix}#{name}"), {:controller => 'repositories', :action => (prefix == 'export' ? 'raw' : 'entry'), :id => project, :repository_id => repository.identifier_param, - :path => to_path_param(path), - :rev => rev, - :anchor => anchor}, - :class => (prefix == 'export' ? 'source download' : 'source') + if prefix == 'commit' + if repository && (changeset = Changeset.visible.where("repository_id = ? AND scmid LIKE ?", repository.id, "#{name}%").first) + link = link_to h("#{project_prefix}#{repo_prefix}#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :repository_id => repository.identifier_param, :rev => changeset.identifier}, + :class => 'changeset', + :title => truncate_single_line(changeset.comments, :length => 100) + end + else + if repository && User.current.allowed_to?(:browse_repository, project) + name =~ %r{^[/\\]*(.*?)(@([^/\\@]+?))?(#(L\d+))?$} + path, rev, anchor = $1, $3, $5 + link = link_to h("#{project_prefix}#{prefix}:#{repo_prefix}#{name}"), {:controller => 'repositories', :action => (prefix == 'export' ? 'raw' : 'entry'), :id => project, :repository_id => repository.identifier_param, + :path => to_path_param(path), + :rev => rev, + :anchor => anchor}, + :class => (prefix == 'export' ? 'source download' : 'source') + end end + repo_prefix = nil + end + when 'attachment' + attachments = options[:attachments] || (obj && obj.respond_to?(:attachments) ? obj.attachments : nil) + if attachments && attachment = Attachment.latest_attach(attachments, name) + link = link_to_attachment(attachment, :only_path => only_path, :download => true, :class => 'attachment') + end + when 'project' + if p = Project.visible.where("identifier = :s OR LOWER(name) = :s", :s => name.downcase).first + link = link_to_project(p, {:only_path => only_path}, :class => 'project') end - repo_prefix = nil - end - when 'attachment' - attachments = options[:attachments] || (obj && obj.respond_to?(:attachments) ? obj.attachments : nil) - if attachments && attachment = Attachment.latest_attach(attachments, name) - link = link_to_attachment(attachment, :only_path => only_path, :download => true, :class => 'attachment') - end - when 'project' - if p = Project.visible.where("identifier = :s OR LOWER(name) = :s", :s => name.downcase).first - link = link_to_project(p, {:only_path => only_path}, :class => 'project') - end end end end @@ -1164,9 +1173,9 @@ module ApplicationHelper @current_section += 1 if @current_section > 1 content_tag('div', - link_to(image_tag('edit.png'), options[:edit_section_links].merge(:section => @current_section)), - :class => 'contextual', - :title => l(:button_edit_section)) + heading.html_safe + link_to(image_tag('edit.png'), options[:edit_section_links].merge(:section => @current_section)), + :class => 'contextual', + :title => l(:button_edit_section)) + heading.html_safe else heading end @@ -1285,10 +1294,10 @@ module ApplicationHelper # Same as Rails' simple_format helper without using paragraphs def simple_format_without_paragraph(text) text.to_s. - gsub(/\r\n?/, "\n"). # \r\n and \r -> \n - gsub(/\n\n+/, "

    "). # 2+ newline -> 2 br - gsub(/([^\n]\n)(?=[^\n])/, '\1
    '). # 1 newline -> br - html_safe + gsub(/\r\n?/, "\n"). # \r\n and \r -> \n + gsub(/\n\n+/, "

    "). # 2+ newline -> 2 br + gsub(/([^\n]\n)(?=[^\n])/, '\1
    '). # 1 newline -> br + html_safe end def wiki_simple_format_without_paragraph(text) @@ -1303,7 +1312,7 @@ module ApplicationHelper end def lang_options_for_select(blank=true) - { 'Chinese简体中文 '=> 'zh', :English => :en} + { 'Chinese简体中文 '=> 'zh', :English => :en} end def label_tag_for(name, option_tags = nil, options = {}) @@ -1395,7 +1404,7 @@ module ApplicationHelper :href => "#", :onclick => %|submitPreview("#{escape_javascript url_for(url)}", "#{escape_javascript form}", "#{escape_javascript target}"); return false;|, :accesskey => accesskey(:preview) - }.merge(options) + }.merge(options) end def link_to_function(name, function, html_options={}) @@ -1422,7 +1431,7 @@ module ApplicationHelper def check_all_links(form_name) link_to_function(l(:button_check_all), "checkAll('#{form_name}', true)") + "  ".html_safe + " | "+ "  ".html_safe + - link_to_function(l(:button_uncheck_all), "checkAll('#{form_name}', false)") + link_to_function(l(:button_uncheck_all), "checkAll('#{form_name}', false)") end def progress_bar(pcts, options={}) @@ -1433,12 +1442,12 @@ module ApplicationHelper width = options[:width] || '100px;' legend = options[:legend] || '' content_tag('table', - content_tag('tr', - (pcts[0] > 0 ? content_tag('td', '', :style => "width: #{pcts[0]}%;", :class => 'closed') : ''.html_safe) + - (pcts[1] > 0 ? content_tag('td', '', :style => "width: #{pcts[1]}%;", :class => 'done') : ''.html_safe) + - (pcts[2] > 0 ? content_tag('td', '', :style => "width: #{pcts[2]}%;", :class => 'todo') : ''.html_safe) - ), :class => 'progress', :style => "width: #{width};").html_safe + - content_tag('p', legend, :class => 'percent').html_safe + content_tag('tr', + (pcts[0] > 0 ? content_tag('td', '', :style => "width: #{pcts[0]}%;", :class => 'closed') : ''.html_safe) + + (pcts[1] > 0 ? content_tag('td', '', :style => "width: #{pcts[1]}%;", :class => 'done') : ''.html_safe) + + (pcts[2] > 0 ? content_tag('td', '', :style => "width: #{pcts[2]}%;", :class => 'todo') : ''.html_safe) + ), :class => 'progress', :style => "width: #{width};").html_safe + + content_tag('p', legend, :class => 'percent').html_safe end def checked_image(checked=true) @@ -1451,7 +1460,7 @@ module ApplicationHelper unless @context_menu_included content_for :header_tags do javascript_include_tag('context_menu') + - stylesheet_link_tag('context_menu') + stylesheet_link_tag('context_menu') end if l(:direction) == 'rtl' content_for :header_tags do @@ -1710,7 +1719,7 @@ module ApplicationHelper end s end - + def get_memo @new_memo = Memo.new #@new_memo.subject = "有什么想说的,尽管来咆哮吧~~" @@ -1797,11 +1806,11 @@ module ApplicationHelper html << (content_tag "span", l(:label_no_current_watchers)) end for user in User.watched_by(obj.id) - html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => "#{user.name}") - count = count + 1 - if count >= 12 - break - end + html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => "#{user.name}") + count = count + 1 + if count >= 12 + break + end end html.html_safe end @@ -1827,13 +1836,13 @@ module ApplicationHelper html.html_safe end - def show_bid_fans_picture(obj) + def show_bid_fans_picture(obj) html = '' if obj.watcher_users.count == 0 html << (content_tag "span", l(:label_project_no_follow)) else obj.watcher_users.take(12).each do |user| - html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => user.name) + html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => user.name) end end html.html_safe @@ -1868,7 +1877,7 @@ module ApplicationHelper html.html_safe end - def show_contest_project(contest) + def show_contest_project(contest) html = '' if contest.projects.where('is_public = 1').count == 0 html << (content_tag "p", l(:label_no_bid_project), :class => "font_lighter") @@ -1880,7 +1889,7 @@ module ApplicationHelper html.html_safe end - def show_contest_softapplication(contest) + def show_contest_softapplication(contest) html = '' if contest.softapplications.where('is_public = 1').count == 0 html << (content_tag "p", l(:label_no_contest_softapplication), :class => "font_lighter") @@ -1892,17 +1901,17 @@ module ApplicationHelper html.html_safe end - def show_contest_fans_picture(obj) + def show_contest_fans_picture(obj) html = '' if obj.watcher_users.count == 0 html << (content_tag "span", l(:label_project_no_follow)) else obj.watcher_users.take(12).each do |user| - html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => user.name) + html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => user.name) end end html.html_safe - end + end #display fans picture def show_more_fans?(obj) @@ -1919,13 +1928,13 @@ module ApplicationHelper html << (content_tag "span", l(:label_no_current_fans)) else obj.watcher_users.take(12).each do |user| - html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => user.name) + html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => user.name) end end html.html_safe end - # added by bai + # added by bai def show_more_participate?(obj) if obj.join_in_contests.count > 12 return true @@ -1934,18 +1943,18 @@ module ApplicationHelper end end - def show_participate_picture(obj) + def show_participate_picture(obj) html = '' count = 0 if obj.join_in_contests.count == 0 html << (content_tag "span", l(:label_no_current_participate)) end for temp in obj.join_in_contests - html << (link_to image_tag(url_to_avatar(temp.user), :class => "avatar"), user_path(temp.user), :class => "avatar", :title => "#{temp.user.name}") - count = count + 1 - if count >= 12 - break - end + html << (link_to image_tag(url_to_avatar(temp.user), :class => "avatar"), user_path(temp.user), :class => "avatar", :title => "#{temp.user.name}") + count = count + 1 + if count >= 12 + break + end end html.html_safe end @@ -1954,14 +1963,14 @@ module ApplicationHelper # add by huang def show_watcher_list(user) - html = '' - count = 0 + html = '' + count = 0 for user in User.watched_by(user.id) - html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => "#{user.name}") - count = count + 1 - if count >= 12 - break - end + html << (link_to image_tag(url_to_avatar(user), :class => "avatar"), user_path(user), :class => "avatar", :title => "#{user.name}") + count = count + 1 + if count >= 12 + break + end end html.html_safe end @@ -1979,14 +1988,14 @@ module ApplicationHelper return true if bid.nil? case bid.homework_type - when Bid::HomeworkFile - attaches = HomeworkAttach.where(bid_id: curb) - attaches.map(&:user_id).include? cur - when Bid::HomeworkProject - attaches = BidingProject.where(user_id: User.current, bid_id: bid) - attaches.count > 0 # > 0 则有提交记录 - else - true + when Bid::HomeworkFile + attaches = HomeworkAttach.where(bid_id: curb) + attaches.map(&:user_id).include? cur + when Bid::HomeworkProject + attaches = BidingProject.where(user_id: User.current, bid_id: bid) + attaches.count > 0 # > 0 则有提交记录 + else + true end end @@ -2048,12 +2057,12 @@ module ApplicationHelper end # def hadcommittedforcontest(curu) - # message = JournalsForMessage.find_by_sql("select * from journals_for_messages where jour_type = 'Softapplication' ") - # message.each do |createmessage| - # if createmessage.user_id == curu - # return true - # end - # end + # message = JournalsForMessage.find_by_sql("select * from journals_for_messages where jour_type = 'Softapplication' ") + # message.each do |createmessage| + # if createmessage.user_id == curu + # return true + # end + # end # end def footer_logo(ul_class=nil, li_class=nil) @@ -2073,63 +2082,63 @@ module ApplicationHelper def sort_homework_path(bid, sort, direction) case self.action_name - when 'show_courseEx' - get_not_batch_homework_homework_attach_index_path(bid_id: bid.id, sort: sort, direction: 'asc') - when 'get_not_batch_homework' - get_not_batch_homework_homework_attach_index_path(bid_id: bid.id, sort: sort, direction: direction) - when 'get_batch_homeworks' - get_batch_homeworks_homework_attach_index_path(bid_id: bid.id, sort: sort, direction: direction) - when 'get_homeworks' - get_homeworks_homework_attach_index_path(bid_id: bid.id, sort: sort, direction: direction) - else - '#' + when 'show_courseEx' + get_not_batch_homework_homework_attach_index_path(bid_id: bid.id, sort: sort, direction: 'asc') + when 'get_not_batch_homework' + get_not_batch_homework_homework_attach_index_path(bid_id: bid.id, sort: sort, direction: direction) + when 'get_batch_homeworks' + get_batch_homeworks_homework_attach_index_path(bid_id: bid.id, sort: sort, direction: direction) + when 'get_homeworks' + get_homeworks_homework_attach_index_path(bid_id: bid.id, sort: sort, direction: direction) + else + '#' end end def anonymous_comment_link(bid, course) link = case bid.comment_status - when 0 - confirm_info = "开启匿评后学生将不能对作业进行提交、修改、删除等操作\n" - confirm_info += anonymous_comment_notice(bid,course) - confirm_info += '是否确定开启匿评?' - link_to '启动匿评', start_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true, :confirm => confirm_info, disable_with: '加载中...' - when 1 - confirm_info = "关闭匿评后所有同学将不能继续进行匿评,且将公开已提交作业列表\n" - confirm_info += anonymous_comment_notice(bid,course) - confirm_info += '是否确定关闭匿评?' - link_to '关闭匿评', stop_anonymous_comment_bid_path(bid), id: "#{bid.id}_stop_anonymous_comment", remote: true, :confirm => confirm_info - when 2 - '匿评结束' - end + when 0 + confirm_info = "开启匿评后学生将不能对作业进行提交、修改、删除等操作\n" + confirm_info += anonymous_comment_notice(bid,course) + confirm_info += '是否确定开启匿评?' + link_to '启动匿评', start_anonymous_comment_bid_path(bid), id: "#{bid.id}_start_anonymous_comment", remote: true, :confirm => confirm_info, disable_with: '加载中...' + when 1 + confirm_info = "关闭匿评后所有同学将不能继续进行匿评,且将公开已提交作业列表\n" + confirm_info += anonymous_comment_notice(bid,course) + confirm_info += '是否确定关闭匿评?' + link_to '关闭匿评', stop_anonymous_comment_bid_path(bid), id: "#{bid.id}_stop_anonymous_comment", remote: true, :confirm => confirm_info + when 2 + '匿评结束' + end content_tag('span', link, id: "#{bid.id}_anonymous_comment") end def anonymous_comment_notice(bid, course) - case bid.comment_status - when 0 - @student_size ||= searchStudent(course).size - @homework_size = bid.homeworks.size - percent = @homework_size.to_f / (@student_size == 0 ? 1 : @student_size) - confirm_info = "目前#{@student_size}个学生,总共提交了#{@homework_size}份作业,占#{number_to_percentage(percent * 100, precision: 1)}\n" - when 1 - @homework_evaluations = 0 - bid.homeworks.map { |homework| @homework_evaluations += homework.homework_evaluations.count} - teachers = "(" - teacher_members = searchTeacherAndAssistant(course) - teacher_members.each do |member| - if member == teacher_members.last - teachers += member.user_id.to_s + ")" - else - teachers += member.user_id.to_s + "," - end - end - @has_evaluations = 0 - bid.homeworks.map { |homework| @has_evaluations += homework.rates(:quality).where("seems_rateable_rates.rater_id not in #{teachers}").count} - - percent = @has_evaluations.to_f / (@homework_evaluations == 0 ? 1 : @homework_evaluations) - confirm_info = "目前总共分配了#{@homework_evaluations}份匿评作业,已评价#{@has_evaluations}份作业,占#{number_to_percentage(percent * 100, precision: 1)}\n" - end - confirm_info + case bid.comment_status + when 0 + @student_size ||= searchStudent(course).size + @homework_size = bid.homeworks.size + percent = @homework_size.to_f / (@student_size == 0 ? 1 : @student_size) + confirm_info = "目前#{@student_size}个学生,总共提交了#{@homework_size}份作业,占#{number_to_percentage(percent * 100, precision: 1)}\n" + when 1 + @homework_evaluations = 0 + bid.homeworks.map { |homework| @homework_evaluations += homework.homework_evaluations.count} + teachers = "(" + teacher_members = searchTeacherAndAssistant(course) + teacher_members.each do |member| + if member == teacher_members.last + teachers += member.user_id.to_s + ")" + else + teachers += member.user_id.to_s + "," + end + end + @has_evaluations = 0 + bid.homeworks.map { |homework| @has_evaluations += homework.rates(:quality).where("seems_rateable_rates.rater_id not in #{teachers}").count} + + percent = @has_evaluations.to_f / (@homework_evaluations == 0 ? 1 : @homework_evaluations) + confirm_info = "目前总共分配了#{@homework_evaluations}份匿评作业,已评价#{@has_evaluations}份作业,占#{number_to_percentage(percent * 100, precision: 1)}\n" + end + confirm_info end def get_technical_title user diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 1fcd66a7f..349f8ebc7 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -51,7 +51,7 @@
    <% unless @issue.disabled_core_fields.include?('assigned_to_id') %> -
  •  指派给  : 

    <%= @issue.assigned_to ? link_to_user(@issue.assigned_to, :class => "pro_info_p") : "-" %>
  • +
  •  指派给  : 

    <%= @issue.assigned_to ? link_to_isuue_user(@issue.assigned_to) : "-" %>
  • <% end %>
    <% unless @issue.disabled_core_fields.include?('fixed_version_id') %> @@ -77,7 +77,7 @@ <% end %>
    <% unless @issue.disabled_core_fields.include?('done_ratio') %> -
  •  % 完成  : 

    <%= progress_bar(@issue.done_ratio, :width => '0px', :legend => "#{@issue.done_ratio}%") %> +
  •  % 完成  : 

    <%= @issue.done_ratio %>%
  • <% end %>
    diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index e2859c9ae..8fda5db48 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -85,7 +85,7 @@ a.pro_mes_w{ height:20px; float:left;display:block; color:#999999;} .pro_info_box{ margin-left:60px; background:#f0fbff; height:80px; padding:10px 0;} .pro_info_box ul{} .pro_info_box ul li{ margin-bottom:10px;} -.pro_info_p{ color:#0781b4; float:left; width:160px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; } +.pro_info_p{ color:#0781b4 !important; float:left; width:160px; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;padding-top:2.5px;} .edit_pro_box{overflow:hidden;display:none; margin-bottom:30px; border-bottom:1px dashed #CCC; padding-bottom:10px;} /****翻页***/ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; } From 0023d0610b2b09a947c472d32ae7077a3b98d048 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 15 Apr 2015 15:15:51 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E7=BC=BA=E9=99=B7=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E3=80=81=E6=8F=8F=E8=BF=B0=E5=BC=BA=E5=88=B6=E6=8D=A2=E8=A1=8C?= =?UTF-8?q?=20=E8=B7=9F=E8=B8=AA=E6=8C=89=E9=92=AE=E6=A0=B7=E5=BC=8F=20?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/journals_helper.rb | 29 ++++++++++ app/helpers/watchers_helper.rb | 23 +++++++- app/views/issues/_action_menu.html.erb | 2 +- app/views/issues/_history.html.erb | 15 ++--- app/views/issues/show.html.erb | 77 +++----------------------- 5 files changed, 65 insertions(+), 81 deletions(-) diff --git a/app/helpers/journals_helper.rb b/app/helpers/journals_helper.rb index cfebb4d30..6e3155f48 100644 --- a/app/helpers/journals_helper.rb +++ b/app/helpers/journals_helper.rb @@ -73,6 +73,35 @@ module JournalsHelper content_tag('div', content.html_safe, :id => "journal-#{journal.id}-notes", :class => css_classes ,:style => "width:580px") end + # 缺陷回复内容、引用内容 + # Redo:后面需要统一扩展 + def render_notes_issue (issue, journal, options={}) + content = '' + editable = User.current.logged? && (User.current.allowed_to?(:edit_issue_notes, issue.project) || (journal.user == User.current && User.current.allowed_to?(:edit_own_issue_notes, issue.project))) + destroyable = User.current.logged? && ((journal.user == User.current) || (issue.author_id == User.current.id) || (User.current.admin == 1)) + links = [] + if !journal.notes.blank? + links << link_to(l(:button_quote), + {:controller => 'journals', :action => 'new', :id => issue.id, :journal_id => journal}, + :remote => true, + :method => 'post', + :title => l(:button_quote)) if options[:reply_links] + links << link_to_in_place_notes_editor(l(:button_edit), "journal-#{journal.id}-notes", + { :controller => 'journals', :action => 'edit', :id => journal, :format => 'js' }, + :title => l(:button_edit)) if editable + #Added by young + if destroyable + links << link_to(l(:button_delete), { :controller => 'journals', :action => 'destroy', :id => journal, :format => 'js' }, + :title => l(:button_delete)) + end + end + #content << content_tag('div', links.join(' ').html_safe, :class => 'contextual', :style => 'margin-top:-25px;') unless links.empty? + content << textilizable(journal, :notes) + css_classes = "wiki" + css_classes << " editable" if editable + content_tag('div', content.html_safe, :id => "journal-#{journal.id}-notes", :class => css_classes ,:style => "width:510px") + end + def link_to_in_place_notes_editor(text, field_id, url, options={}) onclick = "$.ajax({url: '#{url_for(url)}', type: 'get'}); return false;" link_to text, '#', options.merge(:onclick => onclick) diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index 6edb171c8..c615f59e2 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -42,7 +42,28 @@ module WatchersHelper :object_id => (objects.size == 1 ? objects.first.id : objects.map(&:id).sort) ) method = watched ? 'delete' : 'post' - + + link_to text, url, :remote => true, :method => method, :class => css + end + + def watcher_link_issue(objects, user, options=[]) + return '' unless user && user.logged? + objects = Array.wrap(objects) + + watched = objects.any? {|object| object.watched_by?(user)} + @watch_flag = (objects.first.instance_of?(User) or objects.first.instance_of?(Project) or objects.first.instance_of?(Contest) or (objects.first.instance_of?(Bid))) + css = @watch_flag ? ([watcher_css(objects), watched ? 'talk_edit ' : 'talk_edit '].join(' ') << options[0].to_s) : + ([watcher_css(objects), watched ? 'talk_edit fr ' : 'talk_edit fr '].join(' ') << options[0].to_s) + + text = @watch_flag ? + (watched ? l(:button_unfollow) : l(:button_follow)) : (watched ? l(:button_unwatch) : l(:button_watch)) + + url = watch_path( + :object_type => objects.first.class.to_s.underscore, + :object_id => (objects.size == 1 ? objects.first.id : objects.map(&:id).sort) + ) + method = watched ? 'delete' : 'post' + link_to text, url, :remote => true, :method => method, :class => css end diff --git a/app/views/issues/_action_menu.html.erb b/app/views/issues/_action_menu.html.erb index 231116f2f..959ab52c1 100644 --- a/app/views/issues/_action_menu.html.erb +++ b/app/views/issues/_action_menu.html.erb @@ -1,6 +1,6 @@ -<%#= watcher_link(@issue, User.current) %> +<%= watcher_link_issue(@issue, User.current) %> <%#= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:add_issues, @project) %> <%= link_to l(:button_delete), issue_path(@issue.id), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'talk_edit fr' if User.current.allowed_to?(:delete_issues, @project) %> diff --git a/app/views/issues/_history.html.erb b/app/views/issues/_history.html.erb index e1e2de6a3..d9f9105ac 100644 --- a/app/views/issues/_history.html.erb +++ b/app/views/issues/_history.html.erb @@ -17,24 +17,17 @@ <% end %>

    +
    <%= render_links(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
    + +

    <%= render_notes_issue(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>

    -
    -
    -
    -

    <%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>

    - <%= format_time journal.created_on %> -
    -
    -
    -
    - -<%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %> + <%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %> <% end %> <% heads_for_wiki_formatter if User.current.allowed_to?(:edit_issue_notes, issue.project) || User.current.allowed_to?(:edit_own_issue_notes, issue.project) %> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 349f8ebc7..d905de48c 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -12,7 +12,7 @@ <%= link_to image_tag(url_to_avatar(@issue.author),:width => 46,:height => 46), user_path(@issue.author), :class => "ping_dispic" %>
    -

    +

    <%= @issue.subject %><%= get_issue_typevalue(@issue.tracker_id) %>


    <%= @issue.author %> @@ -24,7 +24,7 @@

    'action_menu' %>
    -
    +
    <% if @issue.description? || @issue.attachments.any? -%> <% if @issue.description? %> <%#= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %> @@ -90,81 +90,22 @@ <%= link_to l(:button_quote), quoted_issue_path(@issue.id), :remote => true, :method => 'post', :class => 'talk_edit fr' if authorize_for('issues', 'edit') %>
    + <% if @journals.present? %>
    -

    <%=l(:label_history)%>

    <%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
    <% end %> -
    -<%# html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %> - - - - - <%#·= link_to_if @prev_issue_id, -# "\xc2\xab #{l(:label_previous)}", -# (@prev_issue_id ? issue_path(Issue.find_by_id(@prev_issue_id)) : nil), - :title => "##{@prev_issue_id}" %> | - - - - <%#= link_to_if @next_issue_id, -# "#{l(:label_next)} \xc2\xbb", -# (@next_issue_id ? issue_path(Issue.find_by_id(@next_issue_id)) : nil), - :title => "##{@next_issue_id}" %> - - - - - - - - - - - <%#= authoring @issue.created_on, @issue.author %>. - - <%#= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>. - - - - - - - - - - - - - - - - - - - - - - - - - - - - + <% if @changesets.present? %> -
    -

    <%=l(:label_associated_revisions)%>

    -<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %> -
    +
    +

    <%=l(:label_associated_revisions)%>

    + <%= render :partial => 'changesets', :locals => { :changesets => @changesets} %> +
    <% end %> - - - + From 4d0a9bd35c87e28472edfb8c5c930556841b3027 Mon Sep 17 00:00:00 2001 From: huang Date: Wed, 15 Apr 2015 15:30:33 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E9=83=A8=E5=88=86=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BC=BA=E5=88=B6=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_list.html.erb | 2 +- app/views/projects/show.html.erb | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 889a37cbd..9a918bb5f 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -11,7 +11,7 @@
    <%= link_to issue.author.name, user_path(issue.author), :class => "problem_name c_orange fl" %> <%= l(:label_post_on_issue) %>(<%= "#{raw column_content[2]}" %>): - <%=link_to "#{column_content[4]}#{get_issue_typevalue(column_content[1])}".html_safe, issue_path(issue.id), :class => "problem_tit02 fl" %> + <%=link_to "#{column_content[4]}#{get_issue_typevalue(column_content[1])}".html_safe, issue_path(issue.id), :class => "problem_tit02 fl break_word" %>

    <% unless issue.assigned_to_id.nil? %> diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 956a725be..b45621850 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -34,7 +34,7 @@ :id => act.id}, :class => "problem_tit fl fb " %>
    -

    <%= textAreailizable act,:description %>
    +

    <%= textAreailizable act,:description %>
    <%= l :label_activity_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>

    @@ -51,7 +51,7 @@ <%= link_to format_activity_title("#{act.issue.tracker} ##{act.issue.project_issues_index}: #{act.issue.subject}"), {:controller => 'issues', :action => 'show', :id => act.issue.id, :anchor => "change-#{act.id}"}, :class => "problem_tit fl fb" %>
    -

    <%= textAreailizable act,:notes %>
    +

    <%= textAreailizable act,:notes %>
    <%= l :label_activity_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>

    @@ -71,7 +71,7 @@ :board_id => act.board_id}.merge(act.parent_id.nil? ? {:id => act.id} : {:id => act.parent_id, :r => act.id, :anchor => "message-#{act.id}"}), :class => "problem_tit fl fb " %>
    -

    <%= textAreailizable act,:content %>
    +

    <%= textAreailizable act,:content %>
    <%= l :label_create_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>

    @@ -89,7 +89,7 @@ <%= link_to format_activity_title("#{l(:label_news)}: #{act.title}"), {:controller => 'news', :action => 'show', :id => act.id}, :class => "problem_tit fl fb " %> <% end %>
    -

    <%= textAreailizable act,:description %>
    +

    <%= textAreailizable act,:description %>
    <%= l :label_create_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>

    @@ -104,7 +104,7 @@ <%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %> <%= l(:label_new_activity) %> : <%= link_to format_activity_title("#{l(:label_document)}: #{act.title}"), {:controller => 'documents', :action => 'show', :id => act.id}, :class => "problem_tit fl fb" %>
    -

    <%= textAreailizable act,:description %>
    +

    <%= textAreailizable act,:description %>
    <%= l :label_create_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>

    @@ -118,7 +118,7 @@ <%= h(e.project) if @project.nil? || @project.id != e.project_id %> <%= link_to h(e.user), user_path(e.user_id), :class => "problem_name c_orange fl" %> <%= l(:label_new_activity) %> : <%= link_to format_activity_title("#{l(:label_attachment)}: #{act.filename}"), {:controller => 'attachments', :action => 'show', :id => act.id}, :class => "problem_tit fl fb" %>
    -

    <%= textAreailizable act,:description %>
    +

    <%= textAreailizable act,:description %>
    <%= l :label_create_time %> :<%= format_activity_day(act.created_on) %> <%= format_time(act.created_on, false) %>