| |   |
| 302 | 302 | end |
| 303 | 303 | end |
| 304 | 304 | |
| 305 | | def render_right_actionbox_default (flags = {}) |
| 305 | def actionbox_default (flags = {}) |
| 306 | 306 | out = %Q{<ul>} |
| 307 | 307 | if logged_in? then |
| 308 | 308 | # |
| … | … | |
| 318 | 318 | out |
| 319 | 319 | end |
| 320 | 320 | |
| 321 | | def render_right_actionbox_basic (flags = {}) |
| 321 | def actionbox_basic (flags = {}) |
| 322 | 322 | out = %Q{<table class='right_default_table'>} |
| 323 | 323 | out << %Q{<tr><th>Actions</th></tr>} |
| 324 | | out << %Q{<tr><td>#{render_right_actionbox_default(flags)}</td></tr>} |
| 324 | out << %Q{<tr><td>#{actionbox_default(flags)}</td></tr>} |
| 325 | 325 | out << %Q{</table>} |
| 326 | 326 | out |
| 327 | 327 | end |
| 328 | 328 | |
| 329 | | def render_right_actionbox_complex (flags = {}) |
| 329 | def actionbox_complex (flags = {}) |
| 330 | 330 | out = %Q{<table class='right_default_table'>} |
| 331 | 331 | out << %Q{<tr><th>Actions</th></tr>} |
| 332 | 332 | # |
| … | … | |
| 342 | 342 | acts << %Q{<li>#{link_to("New Milestone", new_project_milestone_path(@project.slug))}</li>} if flags[:new_milestone] && is_member |
| 343 | 343 | acts << %Q{<li>#{link_to("Clone Mainline", new_project_repository_path(@project.slug, @repository))}</li>} if flags[:clone_mainline] && logged_in? |
| 344 | 344 | out << %Q{<tr><td><ul>#{acts}</ul></td></tr>} if acts != "" |
| 345 | | out << %Q{<tr><td>#{render_right_actionbox_default(flags)}</td></tr>} |
| 345 | out << %Q{<tr><td>#{actionbox_default(flags)}</td></tr>} |
| 346 | 346 | out << %Q{</table>} |
| 347 | 347 | out |
| 348 | 348 | end |
| toggle raw diff |
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -302,7 +302,7 @@ module ApplicationHelper
end
end
- def render_right_actionbox_default (flags = {})
+ def actionbox_default (flags = {})
out = %Q{<ul>}
if logged_in? then
#
@@ -318,15 +318,15 @@ module ApplicationHelper
out
end
- def render_right_actionbox_basic (flags = {})
+ def actionbox_basic (flags = {})
out = %Q{<table class='right_default_table'>}
out << %Q{<tr><th>Actions</th></tr>}
- out << %Q{<tr><td>#{render_right_actionbox_default(flags)}</td></tr>}
+ out << %Q{<tr><td>#{actionbox_default(flags)}</td></tr>}
out << %Q{</table>}
out
end
- def render_right_actionbox_complex (flags = {})
+ def actionbox_complex (flags = {})
out = %Q{<table class='right_default_table'>}
out << %Q{<tr><th>Actions</th></tr>}
#
@@ -342,7 +342,7 @@ module ApplicationHelper
acts << %Q{<li>#{link_to("New Milestone", new_project_milestone_path(@project.slug))}</li>} if flags[:new_milestone] && is_member
acts << %Q{<li>#{link_to("Clone Mainline", new_project_repository_path(@project.slug, @repository))}</li>} if flags[:clone_mainline] && logged_in?
out << %Q{<tr><td><ul>#{acts}</ul></td></tr>} if acts != ""
- out << %Q{<tr><td>#{render_right_actionbox_default(flags)}</td></tr>}
+ out << %Q{<tr><td>#{actionbox_default(flags)}</td></tr>}
out << %Q{</table>}
out
end |
| |   |
| 52 | 52 | out = "" |
| 53 | 53 | out << "<ul id='tabmenu'>" |
| 54 | 54 | out << project_tab(active_tab, PRJ_TAB_WIKI) |
| 55 | out << project_tab(active_tab, PRJ_TAB_ACTIVITY) |
| 55 | 56 | out << project_tab(active_tab, PRJ_TAB_REPOS) |
| 56 | 57 | out << project_tab(active_tab, PRJ_TAB_ROADMAP) |
| 57 | 58 | out << project_tab(active_tab, PRJ_TAB_TICKETS) |
| … | … | |
| 63 | 63 | out << "</ul>" |
| 64 | 64 | out |
| 65 | 65 | end |
| 66 | | |
| 67 | | |
| 66 | |
| 68 | 67 | def breadcrumb_repos_tab(subtab) |
| 69 | 68 | subtab == PRJ_TAB_SUBTAB_NONE ? out = "" : out = breadcrumb_repositories |
| 70 | 69 | case subtab |
| … | … | |
| 92 | 92 | when PRJ_TAB_WIKI |
| 93 | 93 | case subtab |
| 94 | 94 | when PRJ_TAB_WIKI_EDIT, PRJ_TAB_WIKI_NEW |
| 95 | | out << render_right_actionbox_basic(:allow_shortcuts => true) |
| 95 | out << actionbox_basic(:allow_shortcuts => true) |
| 96 | 96 | when PRJ_TAB_WIKI_LIST |
| 97 | | out << render_right_actionbox_complex(:allow_shortcuts => true, :new_project_wiki => true) |
| 97 | out << actionbox_complex(:allow_shortcuts => true, :new_project_wiki => true) |
| 98 | 98 | else |
| 99 | | out << render_right_actionbox_complex(:allow_shortcuts => true, :edit_project_wiki => true, :new_project_wiki => true, :list_project_wikis => true) |
| 99 | out << actionbox_complex(:allow_shortcuts => true, :edit_project_wiki => true, :new_project_wiki => true, :list_project_wikis => true) |
| 100 | 100 | end |
| 101 | 101 | out << render_right_project_extrainfo |
| 102 | 102 | out << render_right_project_contributors |
| 103 | | when PRJ_TAB_DOWNLOADS |
| 104 | | out << render_right_actionbox_basic(:allow_shortcuts => true) |
| 103 | when PRJ_TAB_ACTIVITY |
| 104 | out << actionbox_basic(:allow_shortcuts => true) |
| 105 | 105 | when PRJ_TAB_REPOS |
| 106 | 106 | case subtab |
| 107 | 107 | when PRJ_TAB_SUBTAB_NONE |
| 108 | | out << render_right_actionbox_complex(:allow_shortcuts => true, :clone_mainline => true) |
| 108 | out << actionbox_complex(:allow_shortcuts => true, :clone_mainline => true) |
| 109 | 109 | when PRJ_TAB_REPOS_SUMMARY |
| 110 | 110 | out << render(:partial => "repositories/ac_right_actionbox_repos_summary") |
| 111 | 111 | when PRJ_TAB_REPOS_LOGS |
| 112 | | out << render_right_actionbox_basic(:allow_shortcuts => true) |
| 112 | out << actionbox_basic(:allow_shortcuts => true) |
| 113 | 113 | out << render(:partial => "repositories/ac_right_branches") |
| 114 | 114 | when PRJ_TAB_REPOS_COMMIT |
| 115 | | out << render_right_actionbox_basic(:allow_shortcuts => true) |
| 115 | out << actionbox_basic(:allow_shortcuts => true) |
| 116 | 116 | out << render(:partial => "commits/ac_right_diff_mode_selector") |
| 117 | 117 | when PRJ_TAB_REPOS_TREE |
| 118 | | out << render_right_actionbox_basic(:allow_shortcuts => true) |
| 118 | out << actionbox_basic(:allow_shortcuts => true) |
| 119 | 119 | out << render(:partial => "trees/ac_right_branches") |
| 120 | 120 | when PRJ_TAB_REPOS_MERGEREQUESTS |
| 121 | | out << render_right_actionbox_basic(:allow_shortcuts => true) |
| 121 | out << actionbox_basic(:allow_shortcuts => true) |
| 122 | 122 | end |
| 123 | 123 | when PRJ_TAB_ROADMAP |
| 124 | | out << render_right_actionbox_complex(:allow_shortcuts => true, :new_milestone => true) |
| 124 | out << actionbox_complex(:allow_shortcuts => true, :new_milestone => true) |
| 125 | 125 | when PRJ_TAB_TICKETS |
| 126 | | out << render_right_actionbox_complex(:allow_shortcuts => true, :new_ticket => true) |
| 126 | out << actionbox_complex(:allow_shortcuts => true, :new_ticket => true) |
| 127 | out << actionbox_ticket_filter |
| 127 | 128 | when PRJ_TAB_ARTICLES |
| 128 | | out << render_right_actionbox_complex(:allow_shortcuts => true, :new_article => true) |
| 129 | out << actionbox_complex(:allow_shortcuts => true, :new_article => true) |
| 129 | 130 | when PRJ_TAB_FORUM |
| 130 | | out << render_right_actionbox_basic(:allow_shortcuts => true) |
| 131 | out << actionbox_basic(:allow_shortcuts => true) |
| 131 | 132 | when PRJ_TAB_EVENTS |
| 132 | | out << render_right_actionbox_basic(:allow_shortcuts => true) |
| 133 | out << actionbox_basic(:allow_shortcuts => true) |
| 133 | 134 | when PRJ_TAB_CONFIG |
| 134 | | out << render_right_actionbox_basic(:allow_shortcuts => true) |
| 135 | out << actionbox_basic(:allow_shortcuts => true) |
| 135 | 136 | end |
| 136 | 137 | out |
| 137 | | end |
| 138 | end |
| 139 | |
| 140 | #TODO need to find a better place for these (partial?) |
| 141 | def actionbox_ticket_filter |
| 142 | out = "" |
| 143 | out << %Q{<table class='right_default_table' cellspacing=0px>} |
| 144 | out << %Q{<tr><th>Ticket Filter</th></tr>} |
| 145 | |
| 146 | out << %Q{<tr><td>Type:</td></tr>} |
| 147 | out << %Q{<tr><td> <input type=checkbox>Defect</td></tr>} |
| 148 | out << %Q{<tr><td> <input type=checkbox>Enhancement</td></tr>} |
| 149 | out << %Q{<tr><td> <input type=checkbox>Task</td></tr>} |
| 150 | |
| 151 | out << %Q{<tr><td>Status:</td></tr>} |
| 152 | out << %Q{<tr><td> <input type=checkbox>Proposed</td></tr>} |
| 153 | out << %Q{<tr><td> <input type=checkbox>Open</td></tr>} |
| 154 | out << %Q{<tr><td> <input type=checkbox>Closed</td></tr>} |
| 155 | |
| 156 | out << %Q{<tr><td>Impact:</td></tr>} |
| 157 | out << %Q{<tr><td> <input type=checkbox>Low</td></tr>} |
| 158 | out << %Q{<tr><td> <input type=checkbox>High</td></tr>} |
| 159 | out << %Q{<tr><td> <input type=checkbox>Security</td></tr>} |
| 160 | |
| 161 | out << %Q{<tr><td>Priority:</td></tr>} |
| 162 | out << %Q{<tr><td> <input type=checkbox>None</td></tr>} |
| 163 | out << %Q{<tr><td> <input type=checkbox>Low</td></tr>} |
| 164 | out << %Q{<tr><td> <input type=checkbox>High</td></tr>} |
| 165 | out << %Q{<tr><td> <input type=checkbox>Critical</td></tr>} |
| 166 | |
| 167 | out << %Q{</table>} |
| 168 | out |
| 169 | end |
| 138 | 170 | |
| 139 | 171 | def format_life_cycle (ls) |
| 140 | 172 | case ls |
| toggle raw diff |
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -52,6 +52,7 @@ module ProjectsHelper
out = ""
out << "<ul id='tabmenu'>"
out << project_tab(active_tab, PRJ_TAB_WIKI)
+ out << project_tab(active_tab, PRJ_TAB_ACTIVITY)
out << project_tab(active_tab, PRJ_TAB_REPOS)
out << project_tab(active_tab, PRJ_TAB_ROADMAP)
out << project_tab(active_tab, PRJ_TAB_TICKETS)
@@ -62,8 +63,7 @@ module ProjectsHelper
out << "</ul>"
out
end
-
-
+
def breadcrumb_repos_tab(subtab)
subtab == PRJ_TAB_SUBTAB_NONE ? out = "" : out = breadcrumb_repositories
case subtab
@@ -92,49 +92,81 @@ module ProjectsHelper
when PRJ_TAB_WIKI
case subtab
when PRJ_TAB_WIKI_EDIT, PRJ_TAB_WIKI_NEW
- out << render_right_actionbox_basic(:allow_shortcuts => true)
+ out << actionbox_basic(:allow_shortcuts => true)
when PRJ_TAB_WIKI_LIST
- out << render_right_actionbox_complex(:allow_shortcuts => true, :new_project_wiki => true)
+ out << actionbox_complex(:allow_shortcuts => true, :new_project_wiki => true)
else
- out << render_right_actionbox_complex(:allow_shortcuts => true, :edit_project_wiki => true, :new_project_wiki => true, :list_project_wikis => true)
+ out << actionbox_complex(:allow_shortcuts => true, :edit_project_wiki => true, :new_project_wiki => true, :list_project_wikis => true)
end
out << render_right_project_extrainfo
out << render_right_project_contributors
- when PRJ_TAB_DOWNLOADS
- out << render_right_actionbox_basic(:allow_shortcuts => true)
+ when PRJ_TAB_ACTIVITY
+ out << actionbox_basic(:allow_shortcuts => true)
when PRJ_TAB_REPOS
case subtab
when PRJ_TAB_SUBTAB_NONE
- out << render_right_actionbox_complex(:allow_shortcuts => true, :clone_mainline => true)
+ out << actionbox_complex(:allow_shortcuts => true, :clone_mainline => true)
when PRJ_TAB_REPOS_SUMMARY
out << render(:partial => "repositories/ac_right_actionbox_repos_summary")
when PRJ_TAB_REPOS_LOGS
- out << render_right_actionbox_basic(:allow_shortcuts => true)
+ out << actionbox_basic(:allow_shortcuts => true)
out << render(:partial => "repositories/ac_right_branches")
when PRJ_TAB_REPOS_COMMIT
- out << render_right_actionbox_basic(:allow_shortcuts => true)
+ out << actionbox_basic(:allow_shortcuts => true)
out << render(:partial => "commits/ac_right_diff_mode_selector")
when PRJ_TAB_REPOS_TREE
- out << render_right_actionbox_basic(:allow_shortcuts => true)
+ out << actionbox_basic(:allow_shortcuts => true)
out << render(:partial => "trees/ac_right_branches")
when PRJ_TAB_REPOS_MERGEREQUESTS
- out << render_right_actionbox_basic(:allow_shortcuts => true)
+ out << actionbox_basic(:allow_shortcuts => true)
end
when PRJ_TAB_ROADMAP
- out << render_right_actionbox_complex(:allow_shortcuts => true, :new_milestone => true)
+ out << actionbox_complex(:allow_shortcuts => true, :new_milestone => true)
when PRJ_TAB_TICKETS
- out << render_right_actionbox_complex(:allow_shortcuts => true, :new_ticket => true)
+ out << actionbox_complex(:allow_shortcuts => true, :new_ticket => true)
+ out << actionbox_ticket_filter
when PRJ_TAB_ARTICLES
- out << render_right_actionbox_complex(:allow_shortcuts => true, :new_article => true)
+ out << actionbox_complex(:allow_shortcuts => true, :new_article => true)
when PRJ_TAB_FORUM
- out << render_right_actionbox_basic(:allow_shortcuts => true)
+ out << actionbox_basic(:allow_shortcuts => true)
when PRJ_TAB_EVENTS
- out << render_right_actionbox_basic(:allow_shortcuts => true)
+ out << actionbox_basic(:allow_shortcuts => true)
when PRJ_TAB_CONFIG
- out << render_right_actionbox_basic(:allow_shortcuts => true)
+ out << actionbox_basic(:allow_shortcuts => true)
end
out
- end
+ end
+
+ #TODO need to find a better place for these (partial?)
+ def actionbox_ticket_filter
+ out = ""
+ out << %Q{<table class='right_default_table' cellspacing=0px>}
+ out << %Q{<tr><th>Ticket Filter</th></tr>}
+
+ out << %Q{<tr><td>Type:</td></tr>}
+ out << %Q{<tr><td> <input type=checkbox>Defect</td></tr>}
+ out << %Q{<tr><td> <input type=checkbox>Enhancement</td></tr>}
+ out << %Q{<tr><td> <input type=checkbox>Task</td></tr>}
+
+ out << %Q{<tr><td>Status:</td></tr>}
+ out << %Q{<tr><td> <input type=checkbox>Proposed</td></tr>}
+ out << %Q{<tr><td> <input type=checkbox>Open</td></tr>}
+ out << %Q{<tr><td> <input type=checkbox>Closed</td></tr>}
+
+ out << %Q{<tr><td>Impact:</td></tr>}
+ out << %Q{<tr><td> <input type=checkbox>Low</td></tr>}
+ out << %Q{<tr><td> <input type=checkbox>High</td></tr>}
+ out << %Q{<tr><td> <input type=checkbox>Security</td></tr>}
+
+ out << %Q{<tr><td>Priority:</td></tr>}
+ out << %Q{<tr><td> <input type=checkbox>None</td></tr>}
+ out << %Q{<tr><td> <input type=checkbox>Low</td></tr>}
+ out << %Q{<tr><td> <input type=checkbox>High</td></tr>}
+ out << %Q{<tr><td> <input type=checkbox>Critical</td></tr>}
+
+ out << %Q{</table>}
+ out
+ end
def format_life_cycle (ls)
case ls |
| |   |
| 34 | 34 | project_cat.formatted_projects_category "projects/category/:id.:format" |
| 35 | 35 | end |
| 36 | 36 | #TODO Note the extra members :repository for Appcast tabs (should these be added to a function that checks $application_mode?) |
| 37 | | map.resources :projects, :member => {:confirm_delete => :get, :forum => :get, :roadmap => :get, :config => :get} do |projects| |
| 37 | map.resources :projects, :member => {:confirm_delete => :get, :forum => :get, :activity => :get, :roadmap => :get, :config => :get} do |projects| |
| 38 | 38 | projects.resources(:repositories, :member => { |
| 39 | 39 | :new => :get, :create => :post, |
| 40 | 40 | :writable_by => :get, |
| toggle raw diff |
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -34,7 +34,7 @@ ActionController::Routing::Routes.draw do |map|
project_cat.formatted_projects_category "projects/category/:id.:format"
end
#TODO Note the extra members :repository for Appcast tabs (should these be added to a function that checks $application_mode?)
- map.resources :projects, :member => {:confirm_delete => :get, :forum => :get, :roadmap => :get, :config => :get} do |projects|
+ map.resources :projects, :member => {:confirm_delete => :get, :forum => :get, :activity => :get, :roadmap => :get, :config => :get} do |projects|
projects.resources(:repositories, :member => {
:new => :get, :create => :post,
:writable_by => :get, |
| |   |
| 68 | 68 | t.column :impact, :enum, :limit => [:low, :high, :security], :default => :low |
| 69 | 69 | t.integer :impact_jid |
| 70 | 70 | # |
| 71 | | t.column :priority, :enum, :limit => [:none, :low, :medium, :high, :critical], :default => :none |
| 71 | t.column :priority, :enum, :limit => [:none, :low, :high, :critical], :default => :none |
| 72 | 72 | t.integer :priority_jid |
| 73 | 73 | # |
| 74 | 74 | t.column :audience, :enum, :limit => [:public, :members], :default => :public |
| toggle raw diff |
--- a/db/migrate/407_create_tickets.rb
+++ b/db/migrate/407_create_tickets.rb
@@ -68,7 +68,7 @@ class CreateTickets < ActiveRecord::Migration
t.column :impact, :enum, :limit => [:low, :high, :security], :default => :low
t.integer :impact_jid
#
- t.column :priority, :enum, :limit => [:none, :low, :medium, :high, :critical], :default => :none
+ t.column :priority, :enum, :limit => [:none, :low, :high, :critical], :default => :none
t.integer :priority_jid
#
t.column :audience, :enum, :limit => [:public, :members], :default => :public |