Merge remote-tracking branch 'origin/szzh' into szzh
This commit is contained in:
commit
012791e44d
|
@ -138,10 +138,10 @@ class Issue < ActiveRecord::Base
|
||||||
nil
|
nil
|
||||||
when 'default'
|
when 'default'
|
||||||
user_ids = [user.id] + user.groups.map(&:id)
|
user_ids = [user.id] + user.groups.map(&:id)
|
||||||
"(#{table_name}.is_private = #{connection.quoted_false}) OR (#{table_name}.author_id = #{user.id} OR #{table_name}.tracker_id IN (#{user_ids.join(',')}) OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))"
|
"(#{table_name}.is_private = #{connection.quoted_false}) OR (#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))"
|
||||||
when 'own'
|
when 'own'
|
||||||
user_ids = [user.id] + user.groups.map(&:id)
|
user_ids = [user.id] + user.groups.map(&:id)
|
||||||
"(#{table_name}.author_id = #{user.id} OR #{table_name}.tracker_id IN (#{user_ids.join(',')}) OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))"
|
"(#{table_name}.author_id = #{user.id} OR #{table_name}.assigned_to_id IN (#{user_ids.join(',')}))"
|
||||||
else
|
else
|
||||||
'1=0'
|
'1=0'
|
||||||
end
|
end
|
||||||
|
@ -159,9 +159,9 @@ class Issue < ActiveRecord::Base
|
||||||
when 'all'
|
when 'all'
|
||||||
true
|
true
|
||||||
when 'default'
|
when 'default'
|
||||||
(!self.is_private? ||self.tracker == user) || (self.author == user || user.is_or_belongs_to?(assigned_to))
|
!self.is_private? || (self.author == user || user.is_or_belongs_to?(assigned_to))
|
||||||
when 'own'
|
when 'own'
|
||||||
self.tracker == user || self.author == user || user.is_or_belongs_to?(assigned_to)
|
self.author == user || user.is_or_belongs_to?(assigned_to)
|
||||||
else
|
else
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
|
@ -37,26 +37,26 @@
|
||||||
<!--
|
<!--
|
||||||
<fieldset class="collapsible collapsed">
|
<fieldset class="collapsible collapsed">
|
||||||
<legend onclick="toggleFieldset(this);">
|
<legend onclick="toggleFieldset(this);">
|
||||||
<%#= l(:label_options) %>
|
<%= l(:label_options) %>
|
||||||
</legend>
|
</legend>
|
||||||
<div style="display: none;">
|
<div style="display: none;">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%#= l(:field_column_names) %></td>
|
<td><%= l(:field_column_names) %></td>
|
||||||
<td><%#= render_query_columns_selection(@query) %></td>
|
<td><%= render_query_columns_selection(@query) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><label for='group_by'><%#= l(:field_group_by) %></label></td>
|
<td><label for='group_by'><%= l(:field_group_by) %></label></td>
|
||||||
<td><%#= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect { |c| [c.caption, c.name.to_s] }, @query.group_by)) %></td>
|
<td><%= select_tag('group_by', options_for_select([[]] + @query.groupable_columns.collect { |c| [c.caption, c.name.to_s] }, @query.group_by)) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%#= l(:button_show) %></td>
|
<td><%= l(:button_show) %></td>
|
||||||
<td><%#= available_block_columns_tags(@query) %></td>
|
<td><%= available_block_columns_tags(@query) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
-->
|
-->
|
||||||
<div class="buttons hide-when-print">
|
<div class="buttons hide-when-print">
|
||||||
<%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
|
<%= link_to_function l(:label_issue_query), 'submit_query_form("query_form")', :class => 'icon icon-checked' %>
|
||||||
<%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %>
|
<%= link_to l(:label_issue_cancel_query), {:set_filter => 1, :project_id => @project}, :class => 'icon icon-reload' %>
|
||||||
|
|
|
@ -13,16 +13,15 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
<div class="activity-content" style="padding:5px 5px 5px 70px;">
|
||||||
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project.id %></strong>
|
<strong> <%= h(e.project) if @project.nil? || @project.id != e.project.id %></strong>
|
||||||
<span class="activity-title font_lighter">
|
<span class="activity-title font_lighter">
|
||||||
<% if @canShowRealName %>
|
<% if @canShowRealName %>
|
||||||
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
|
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
|
||||||
(<%= link_to_user(e.event_author, @canShowRealName) if e.respond_to?(:event_author) %>)
|
(<%= link_to_user(e.event_author, @canShowRealName) if e.respond_to?(:event_author) %>)
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
|
<%= link_to_user(e.event_author) if e.respond_to?(:event_author) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<%= l(:label_new_activity) %>
|
||||||
<%= l(:label_new_activity) %>
|
</span>
|
||||||
</span>
|
|
||||||
<%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %>
|
<%= link_to "#{eventToLanguageCourse(e.event_type, @project)}: "<< format_activity_title(e.event_title), (e.event_type.eql?("attachment")&&e.container.kind_of?(Project)) ? project_files_path(e.container) : e.event_url %>
|
||||||
|
|
||||||
<div class="activity_description info-break" style="font-size: 13px;width: 100%;word-break: break-all;">
|
<div class="activity_description info-break" style="font-size: 13px;width: 100%;word-break: break-all;">
|
||||||
|
|
Loading…
Reference in New Issue