forked from fernandokosh/redmine_time_tracker
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fixed sidebars for loglist, booking list and report
- Loading branch information
Robert Kranz
committed
Nov 30, 2015
1 parent
349d80b
commit 176288d
Showing
8 changed files
with
29 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
module ReportSidebarHelper | ||
def sidebar_queries | ||
unless @sidebar_queries | ||
@sidebar_queries = ReportQuery.visible.all( | ||
:order => "#{Query.table_name}.name ASC", | ||
# Project specific queries and global queries | ||
:conditions => (@project.nil? ? ["project_id IS NULL"] : ["project_id IS NULL OR project_id = ?", @project.id]) | ||
) | ||
end | ||
@sidebar_queries | ||
return @sidebar_queries if @sidebar_queries | ||
@sidebar_queries = ReportQuery.visible | ||
@project.nil? ? @sidebar_queries.where(project_id: nil) : @sidebar_queries.where(project_id: [nil, @project.id]) | ||
@sidebar_queries.order(name: :asc) | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
module TimeBookingsSidebarHelper | ||
def sidebar_queries | ||
unless @sidebar_queries | ||
@sidebar_queries = TimeBookingQuery.visible.all( | ||
:order => "#{Query.table_name}.name ASC", | ||
# Project specific queries and global queries | ||
:conditions => (@project.nil? ? ["project_id IS NULL"] : ["project_id IS NULL OR project_id = ?", @project.id]) | ||
) | ||
end | ||
@sidebar_queries | ||
return @sidebar_queries if @sidebar_queries | ||
@sidebar_queries = TimeBookingQuery.visible | ||
@project.nil? ? @sidebar_queries.where(project_id: nil) : @sidebar_queries.where(project_id: [nil, @project.id]) | ||
@sidebar_queries.order(name: :asc) | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
module TimeLogsSidebarHelper | ||
def sidebar_queries | ||
unless @sidebar_queries | ||
@sidebar_queries = TimeLogQuery.visible.all( | ||
:order => "#{Query.table_name}.name ASC", | ||
# Project specific queries and global queries | ||
:conditions => (@project.nil? ? ["project_id IS NULL"] : ["project_id IS NULL OR project_id = ?", @project.id]) | ||
) | ||
end | ||
@sidebar_queries | ||
return @sidebar_queries if @sidebar_queries | ||
@sidebar_queries = TimeLogQuery.visible | ||
@project.nil? ? @sidebar_queries.where(project_id: nil) : @sidebar_queries.where(project_id: [nil, @project.id]) | ||
@sidebar_queries.order(name: :asc) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters