This commit is contained in:
parent
5cae2010c1
commit
59b2c408e7
|
@ -75,14 +75,18 @@ module WelcomeHelper
|
|||
def show_user_content event
|
||||
str = ' '.html_safe
|
||||
case event.event_type
|
||||
when 'news' , 'issue' , 'attachment' , 'message' , 'bid' , 'wiki-page' , 'document'
|
||||
when 'news' , 'issue', 'message' , 'bid' , 'wiki-page' , 'document'
|
||||
str << content_tag("span", "发表了") << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url)
|
||||
when 'reply' ,'Reply','Memo'
|
||||
when 'reply' ,'Reply', 'Memo'
|
||||
str << content_tag("span", "发表了") << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(truncate(strip_tags(event.event_description), length: 30, omission:'...'), event.event_url)
|
||||
when 'attachment'
|
||||
str << content_tag('span', '上传了') << content_tag('span', find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), project_files_path(event.container)) #<< link_to((' '.html_safe+l(:button_download)), event.event_url)
|
||||
else
|
||||
str << content_tag("span", "更新了") << content_tag("span", find_all_event_type(event)) << ': '.html_safe << link_to(truncate(event.event_title, length: 30, omission:'...'), event.event_url)
|
||||
end
|
||||
str
|
||||
rescue Exception => e
|
||||
str << content_tag("span", '未知内容')
|
||||
end
|
||||
|
||||
def show_event_reply event
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<div class="content-title-top">
|
||||
<div style="text-align:right;">
|
||||
<% flag = false %>
|
||||
<div style="">
|
||||
<%= link_to l(:label_issue_new), { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new,
|
||||
:html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }, :class => 'icon icon-add' %>
|
||||
|
||||
<%= link_to l(:label_query), '#', :class => 'icon icon-help',
|
||||
:onclick => '$("#custom_query").toggle(); ' if User.current.logged? %>
|
||||
<%= link_to l(:label_query), '#', :class => 'icon icon-help',
|
||||
:onclick => '$("#custom_query").toggle(); ' if (User.current.logged? && flag) %>
|
||||
</div>
|
||||
</div>
|
||||
</h3>
|
||||
|
@ -19,7 +20,7 @@
|
|||
|
||||
<%= form_tag({ :controller => 'issues', :action => 'index', :project_id => @project }, :method => :get, :id => 'query_form') do %>
|
||||
<%= hidden_field_tag 'set_filter', '1' %>
|
||||
<div id="custom_query", style='display: none;'>
|
||||
<div id="custom_query" style="display: <%= !flag ? 'block' : 'none' %>;">
|
||||
<div id="query_form_content" class="hide-when-print">
|
||||
<fieldset id="filters" style="width:650px;" class="collapsible <%= @query.new_record? ? "" : "collapsed" %>">
|
||||
<legend onclick="toggleFieldset(this);">
|
||||
|
|
Loading…
Reference in New Issue