Patch #239 ยป blocks.diff
| app/models/query.rb (working copy) | ||
|---|---|---|
|
def initialize(attributes = nil)
|
||
|
super attributes
|
||
|
self.filters ||= { 'status_id' => {:operator => "o", :values => [""]} }
|
||
|
@executed_by = User.current.logged? ? User.current : nil
|
||
|
@executed_by = User.current
|
||
|
set_language_if_valid(executed_by.language) if executed_by
|
||
|
end
|
||
|
|
||
| ... | ... | |
|
|
||
|
# "me" value subsitution
|
||
|
if %w(assigned_to_id author_id).include?(field)
|
||
|
v.push(executed_by ? executed_by.id.to_s : "0") if v.delete("me")
|
||
|
v.push(User.current.id.to_s) if v.delete("me")
|
||
|
end
|
||
|
|
||
|
case operator_for field
|
||
| app/controllers/my_controller.rb (working copy) | ||
|---|---|---|
|
BLOCKS = { 'issuesassignedtome' => :label_assigned_to_me_issues,
|
||
|
'issuesreportedbyme' => :label_reported_issues,
|
||
|
'issuesduenextweek' => :label_due_next_week_issues,
|
||
|
'issuespastdue' => :label_past_due_issues,
|
||
|
'issueswatched' => :label_watched_issues,
|
||
|
'news' => :label_news_latest,
|
||
|
'calendar' => :label_calendar,
|
||
| app/views/issues/_list_simple.rhtml (working copy) | ||
|---|---|---|
|
<th>#</th>
|
||
|
<th><%=l(:field_tracker)%></th>
|
||
|
<th><%=l(:field_subject)%></th>
|
||
|
<% if defined?(extra_columns) and !extra_columns.nil? %>
|
||
|
<% extra_columns.each do |col| %>
|
||
|
<th><%=l(("field_"+col).to_sym) %></th>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
</tr></thead>
|
||
|
<tbody>
|
||
|
<% for issue in issues %>
|
||
| ... | ... | |
|
<td class="subject">
|
||
|
<%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %>
|
||
|
</td>
|
||
|
<% if defined?(extra_columns) and !extra_columns.nil? %>
|
||
|
<% extra_columns.each do |col| %>
|
||
|
<td><%= issue.send(col) %></td>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
</tr>
|
||
|
<% end %>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<% else %>
|
||
|
<i><%=l(:label_no_data)%></i>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
| lang/en.yml (working copy) | ||
|---|---|---|
|
label_logout: Sign out
|
||
|
label_help: Help
|
||
|
label_reported_issues: Reported issues
|
||
|
label_due_next_week_issues: Issues due in the next week
|
||
|
label_past_due_issues: Past due issues
|
||
|
label_assigned_to_me_issues: Issues assigned to me
|
||
|
label_last_login: Last connection
|
||
|
label_last_updates: Last updated
|
||