fixed #9308 table_name pre/suffix support
git-svn-id: http://redmine.rubyforge.org/svn/trunk@337 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
192b9008bd
commit
e6f58e4dcc
16 files changed
+70
-73
No files matched your search
@@ -4,7 +4,7 @@
|
||||
@date_from = Date.today - (Date.today.cwday-1)
|
||||
@date_to = Date.today + (7-Date.today.cwday)
|
||||
@issues = Issue.find :all,
|
||||
:conditions => ["issues.project_id in (#{@user.projects.collect{|m| m.id}.join(',')}) AND ((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to],
|
||||
:conditions => ["#{Issue.table_name}.project_id in (#{@user.projects.collect{|m| m.id}.join(',')}) AND ((start_date>=? and start_date<=?) or (due_date>=? and due_date<=?))", @date_from, @date_to, @date_from, @date_to],
|
||||
:include => [:project, :tracker] unless @user.projects.empty?
|
||||
@issues ||= []
|
||||
%>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<%= render(:partial => 'documents/document',
|
||||
:collection => Document.find(:all,
|
||||
:limit => 10,
|
||||
:order => 'documents.created_on DESC',
|
||||
:conditions => "documents.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})",
|
||||
:order => "#{Document.table_name}.created_on DESC",
|
||||
:conditions => "#{Document.table_name}.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})",
|
||||
:include => [:project])) unless @user.projects.empty? %>
|
||||
@@ -3,7 +3,7 @@
|
||||
:conditions => ["assigned_to_id=?", user.id],
|
||||
:limit => 10,
|
||||
:include => [ :status, :project, :tracker ],
|
||||
:order => 'issues.updated_on DESC') %>
|
||||
:order => "#{Issue.table_name}.updated_on DESC") %>
|
||||
<%= render :partial => 'issues/list_simple', :locals => { :issues => assigned_issues } %>
|
||||
<% if assigned_issues.length > 0 %>
|
||||
<p><%=lwr(:label_last_updates, assigned_issues.length)%></p>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
:conditions => ["author_id=?", user.id],
|
||||
:limit => 10,
|
||||
:include => [ :status, :project, :tracker ],
|
||||
:order => 'issues.updated_on DESC') %>
|
||||
:order => "#{Issue.table_name}.updated_on DESC") %>
|
||||
<%= render :partial => 'issues/list_simple', :locals => { :issues => reported_issues } %>
|
||||
<% if reported_issues.length > 0 %>
|
||||
<p><%=lwr(:label_last_updates, reported_issues.length)%></p>
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
<%= render (:partial => 'news/news',
|
||||
:collection => News.find(:all,
|
||||
:limit => 10,
|
||||
:order => 'news.created_on DESC',
|
||||
:conditions => "news.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})",
|
||||
:order => "#{News.table_name}.created_on DESC",
|
||||
:conditions => "#{News.table_name}.project_id in (#{@user.projects.collect{|m| m.id}.join(',')})",
|
||||
:include => [:project, :author])) unless @user.projects.empty? %>
|
||||
@@ -46,13 +46,13 @@
|
||||
<table class="list">
|
||||
<thead><tr>
|
||||
<th></th>
|
||||
<%= sort_header_tag('issues.id', :caption => '#') %>
|
||||
<%= sort_header_tag('issues.tracker_id', :caption => l(:field_tracker)) %>
|
||||
<%= sort_header_tag('issue_statuses.name', :caption => l(:field_status)) %>
|
||||
<%= sort_header_tag('issues.priority_id', :caption => l(:field_priority)) %>
|
||||
<%= sort_header_tag("#{Issue.table_name}.id", :caption => '#') %>
|
||||
<%= sort_header_tag("#{Issue.table_name}.tracker_id", :caption => l(:field_tracker)) %>
|
||||
<%= sort_header_tag("#{IssueStatus.table_name}.name", :caption => l(:field_status)) %>
|
||||
<%= sort_header_tag("#{Issue.table_name}.priority_id", :caption => l(:field_priority)) %>
|
||||
<th><%=l(:field_subject)%></th>
|
||||
<%= sort_header_tag('users.lastname', :caption => l(:field_author)) %>
|
||||
<%= sort_header_tag('issues.updated_on', :caption => l(:field_updated_on)) %>
|
||||
<%= sort_header_tag("#{User.table_name}.lastname", :caption => l(:field_author)) %>
|
||||
<%= sort_header_tag("#{Issue.table_name}.updated_on", :caption => l(:field_updated_on)) %>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<% for issue in @issues %>
|
||||
|
||||
Reference in new issue
Block a user