Project

General

Profile

Patch #239 ยป blocks.diff

Rocco Stanzione, 2008-02-03 11:01

View differences:

app/models/query.rb (working copy)
112 112
  def initialize(attributes = nil)
113 113
    super attributes
114 114
    self.filters ||= { 'status_id' => {:operator => "o", :values => [""]} }
115
    @executed_by = User.current.logged? ? User.current : nil
115
    @executed_by = User.current
116 116
    set_language_if_valid(executed_by.language) if executed_by
117 117
  end
118 118
  
......
292 292
      
293 293
      # "me" value subsitution
294 294
      if %w(assigned_to_id author_id).include?(field)
295
        v.push(executed_by ? executed_by.id.to_s : "0") if v.delete("me")
295
				v.push(User.current.id.to_s) if v.delete("me")
296 296
      end
297 297
      
298 298
      case operator_for field
app/controllers/my_controller.rb (working copy)
23 23

  
24 24
  BLOCKS = { 'issuesassignedtome' => :label_assigned_to_me_issues,
25 25
             'issuesreportedbyme' => :label_reported_issues,
26
						 'issuesduenextweek' => :label_due_next_week_issues,
27
						 'issuespastdue' => :label_past_due_issues,
26 28
             'issueswatched' => :label_watched_issues,
27 29
             'news' => :label_news_latest,
28 30
             'calendar' => :label_calendar,
app/views/issues/_list_simple.rhtml (working copy)
4 4
		<th>#</th>
5 5
		<th><%=l(:field_tracker)%></th>
6 6
		<th><%=l(:field_subject)%></th>
7
		<% if defined?(extra_columns) and !extra_columns.nil? %>
8
			<% extra_columns.each do |col| %>
9
		<th><%=l(("field_"+col).to_sym) %></th>
10
			<% end %>
11
		<% end %>
7 12
		</tr></thead>
8 13
		<tbody>	
9 14
		<% for issue in issues %>
......
16 21
			<td class="subject">
17 22
                <%= link_to h(issue.subject), :controller => 'issues', :action => 'show', :id => issue %>
18 23
            </td>
24
			<% if defined?(extra_columns) and !extra_columns.nil? %>
25
				<% extra_columns.each do |col| %>
26
					<td><%= issue.send(col) %></td>
27
				<% end %>
28
			<% end %>
19 29
		</tr>
20 30
		<% end %>
21 31
		</tbody>
22 32
	</table>
23 33
<% else %>
24 34
	<i><%=l(:label_no_data)%></i>
25
<% end %>
35
<% end %>
lang/en.yml (working copy)
250 250
label_logout: Sign out
251 251
label_help: Help
252 252
label_reported_issues: Reported issues
253
label_due_next_week_issues: Issues due in the next week
254
label_past_due_issues: Past due issues
253 255
label_assigned_to_me_issues: Issues assigned to me
254 256
label_last_login: Last connection
255 257
label_last_updates: Last updated
    (1-1/1)