| |   |
| 0 | | class ActivitiesController < ApplicationController |
| 1 | | |
| 2 | | before_filter :find_project |
| 3 | | |
| 4 | | def index |
| 5 | | @title, @url_suffix = Project.tab_settings(PRJ_TAB_ACTIVITIES) |
| 6 | | @members = Member.find_by_project_alpha(@project.id) |
| 7 | | if @is_member |
| 8 | | @messages = Message.find_by_project_user(@project.id, current_user.id, 40) |
| 9 | | else |
| 10 | | @messages = Message.find_by_project(@project.id, 40) |
| 11 | | end |
| 12 | | render :action => "ac_project_index" |
| 13 | | end |
| 14 | | |
| 15 | | def create |
| 16 | | @message = Message.new(params[:message]) |
| 17 | | @message.user_id = current_user.id |
| 18 | | @message.project_id = @project.id |
| 19 | | if @message.save |
| 20 | | Journal.create(@message, request.env["REMOTE_ADDR"], @project.id, current_user.id).to_s |
| 21 | | redirect_to project_activities_path(@project.slug) |
| 22 | | else |
| 23 | | #FIXME this is wrong I think |
| 24 | | flash[:error] = 'Error.' |
| 25 | | render :action => 'ac_project_new' |
| 26 | | end |
| 27 | | end |
| 28 | | |
| 29 | | end |
| toggle raw diff |
--- a/app/controllers/activities_controller.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-class ActivitiesController < ApplicationController
-
- before_filter :find_project
-
- def index
- @title, @url_suffix = Project.tab_settings(PRJ_TAB_ACTIVITIES)
- @members = Member.find_by_project_alpha(@project.id)
- if @is_member
- @messages = Message.find_by_project_user(@project.id, current_user.id, 40)
- else
- @messages = Message.find_by_project(@project.id, 40)
- end
- render :action => "ac_project_index"
- end
-
- def create
- @message = Message.new(params[:message])
- @message.user_id = current_user.id
- @message.project_id = @project.id
- if @message.save
- Journal.create(@message, request.env["REMOTE_ADDR"], @project.id, current_user.id).to_s
- redirect_to project_activities_path(@project.slug)
- else
- #FIXME this is wrong I think
- flash[:error] = 'Error.'
- render :action => 'ac_project_new'
- end
- end
-
-end |
| |   |
| 59 | 59 | original_article = @article.deep_clone |
| 60 | 60 | if @article.update_attributes(params[:article]) |
| 61 | 61 | @article.save |
| 62 | | Journal.update(original_article, @article, request.env["REMOTE_ADDR"], @project.id, current_user.id) |
| 62 | Journal.update(original_article, @article, request.env["REMOTE_ADDR"], @project.id, current_user.id, "Edited article: \'" + @article.title + "\'.") |
| 63 | 63 | flash[:notice] = "Article was successfully updated." |
| 64 | 64 | redirect_to project_articles_path(@project) |
| 65 | 65 | else |
| … | … | |
| 77 | 77 | |
| 78 | 78 | def destroy |
| 79 | 79 | if @is_member |
| 80 | | flash[:notice] = 'Article deleted.' |
| 81 | 80 | @article = Article.find(params[:id]) |
| 82 | | @article.status = :deleted |
| 83 | | @article.save |
| 84 | | redirect_to project_articles_path(@project) |
| 81 | if @article |
| 82 | original_article = Article.new |
| 83 | original_article = @article.deep_clone |
| 84 | @article.status = :deleted |
| 85 | if @article.save |
| 86 | Journal.update(original_article, @article, request.env["REMOTE_ADDR"], @project.id, current_user.id, "Deleted article: \'" + @article.title + "\'.") |
| 87 | flash[:notice] = 'Article deleted.' |
| 88 | else |
| 89 | #TODO add error report |
| 90 | flash[:error] = 'An error occurred.' |
| 91 | end |
| 92 | redirect_to project_articles_path(@project) |
| 93 | else |
| 94 | flash[:error] = 'Article ' + params[:id] + ' does not exist.' |
| 95 | redirect_to project_articles_path(@project) |
| 96 | end |
| 85 | 97 | end |
| 86 | | rescue ActiveRecord::RecordNotFound |
| 87 | | flash[:error] = 'Article ' + params[:id] + ' does not exist.' |
| 88 | | redirect_to project_articles_path(@project) |
| 89 | 98 | end |
| 90 | 99 | |
| 91 | 100 | # Show all articles /2008 or /2008/11 or /2008/11/1 and render grouped by date |
| toggle raw diff |
--- a/app/controllers/articles_controller.rb
+++ b/app/controllers/articles_controller.rb
@@ -59,7 +59,7 @@ class ArticlesController < ApplicationController
original_article = @article.deep_clone
if @article.update_attributes(params[:article])
@article.save
- Journal.update(original_article, @article, request.env["REMOTE_ADDR"], @project.id, current_user.id)
+ Journal.update(original_article, @article, request.env["REMOTE_ADDR"], @project.id, current_user.id, "Edited article: \'" + @article.title + "\'.")
flash[:notice] = "Article was successfully updated."
redirect_to project_articles_path(@project)
else
@@ -77,15 +77,24 @@ class ArticlesController < ApplicationController
def destroy
if @is_member
- flash[:notice] = 'Article deleted.'
@article = Article.find(params[:id])
- @article.status = :deleted
- @article.save
- redirect_to project_articles_path(@project)
+ if @article
+ original_article = Article.new
+ original_article = @article.deep_clone
+ @article.status = :deleted
+ if @article.save
+ Journal.update(original_article, @article, request.env["REMOTE_ADDR"], @project.id, current_user.id, "Deleted article: \'" + @article.title + "\'.")
+ flash[:notice] = 'Article deleted.'
+ else
+ #TODO add error report
+ flash[:error] = 'An error occurred.'
+ end
+ redirect_to project_articles_path(@project)
+ else
+ flash[:error] = 'Article ' + params[:id] + ' does not exist.'
+ redirect_to project_articles_path(@project)
+ end
end
- rescue ActiveRecord::RecordNotFound
- flash[:error] = 'Article ' + params[:id] + ' does not exist.'
- redirect_to project_articles_path(@project)
end
# Show all articles /2008 or /2008/11 or /2008/11/1 and render grouped by date |
| |   |
| 9 | 9 | # Project Wiki index page, shows list of all wikis for that project |
| 10 | 10 | @wikis = Wiki.find_by_project(@project.id) |
| 11 | 11 | if @wikis.size > 0 |
| 12 | | @title = "List Wikis" |
| 12 | @title = "Wiki" |
| 13 | 13 | @url_suffix = "" |
| 14 | 14 | render :action => "ac_project_index" |
| 15 | 15 | else |
| … | … | |
| 117 | 117 | original_wiki = @wiki.deep_clone |
| 118 | 118 | if @wiki.update_attributes(params[:wiki]) |
| 119 | 119 | @wiki.save |
| 120 | | Journal.update(original_wiki, @wiki, request.env["REMOTE_ADDR"], @project.id, current_user.id) |
| 120 | Journal.update(original_wiki, @wiki, request.env["REMOTE_ADDR"], @project.id, current_user.id, "Edited wiki: \'" + @wiki.title + "\'.") |
| 121 | 121 | flash[:notice] = "Wiki was successfully updated." |
| 122 | 122 | @title = @wiki.title |
| 123 | 123 | render :action => "ac_project_show" |
| … | … | |
| 143 | 143 | |
| 144 | 144 | def destroy |
| 145 | 145 | if @is_member |
| 146 | | flash[:notice] = 'Wiki deleted.' |
| 147 | 146 | @wiki = Wiki.find(params[:id]) |
| 148 | | @wiki.status = :deleted |
| 149 | | @wiki.save |
| 150 | | redirect_to project_wikis_path(@project) |
| 147 | if @wiki |
| 148 | original_wiki = Wiki.new |
| 149 | original_wiki = @wiki.deep_clone |
| 150 | @wiki.status = :deleted |
| 151 | if @wiki.save |
| 152 | Journal.update(original_wiki, @wiki, request.env["REMOTE_ADDR"], @project.id, current_user.id, "Deleted wiki: \'" + @wiki.title + "\'.") |
| 153 | flash[:notice] = 'Wiki deleted.' |
| 154 | else |
| 155 | #TODO add error report |
| 156 | flash[:error] = 'An error occurred.' |
| 157 | end |
| 158 | redirect_to project_wikis_path(@project) |
| 159 | else |
| 160 | flash[:error] = 'Wiki ' + params[:id] + ' does not exist.' |
| 161 | redirect_to project_wikis_path(@project) |
| 162 | end |
| 163 | |
| 164 | # else |
| 165 | # flash[:error] = 'xxxxxxxxxx' |
| 166 | # redirect_to root_path |
| 151 | 167 | end |
| 152 | | rescue ActiveRecord::RecordNotFound |
| 153 | | flash[:error] = 'Wiki ' + params[:id] + ' does not exist.' |
| 154 | | redirect_to project_wikis_path(@project) |
| 155 | 168 | end |
| 156 | 169 | |
| 157 | | |
| 158 | 170 | #FIXME |
| 159 | 171 | def to_slug(s) |
| 160 | 172 | s.gsub(/\W+/, ' ').strip.downcase.gsub(/\ +/, '-') |
| 161 | 173 | end |
| 162 | 174 | |
| 163 | | |
| 164 | 175 | protected |
| 165 | 176 | |
| 166 | 177 | # Increase view count for a wiki page |
| toggle raw diff |
--- a/app/controllers/wikis_controller.rb
+++ b/app/controllers/wikis_controller.rb
@@ -9,7 +9,7 @@ class WikisController < ApplicationController
# Project Wiki index page, shows list of all wikis for that project
@wikis = Wiki.find_by_project(@project.id)
if @wikis.size > 0
- @title = "List Wikis"
+ @title = "Wiki"
@url_suffix = ""
render :action => "ac_project_index"
else
@@ -117,7 +117,7 @@ class WikisController < ApplicationController
original_wiki = @wiki.deep_clone
if @wiki.update_attributes(params[:wiki])
@wiki.save
- Journal.update(original_wiki, @wiki, request.env["REMOTE_ADDR"], @project.id, current_user.id)
+ Journal.update(original_wiki, @wiki, request.env["REMOTE_ADDR"], @project.id, current_user.id, "Edited wiki: \'" + @wiki.title + "\'.")
flash[:notice] = "Wiki was successfully updated."
@title = @wiki.title
render :action => "ac_project_show"
@@ -143,24 +143,35 @@ class WikisController < ApplicationController
def destroy
if @is_member
- flash[:notice] = 'Wiki deleted.'
@wiki = Wiki.find(params[:id])
- @wiki.status = :deleted
- @wiki.save
- redirect_to project_wikis_path(@project)
+ if @wiki
+ original_wiki = Wiki.new
+ original_wiki = @wiki.deep_clone
+ @wiki.status = :deleted
+ if @wiki.save
+ Journal.update(original_wiki, @wiki, request.env["REMOTE_ADDR"], @project.id, current_user.id, "Deleted wiki: \'" + @wiki.title + "\'.")
+ flash[:notice] = 'Wiki deleted.'
+ else
+ #TODO add error report
+ flash[:error] = 'An error occurred.'
+ end
+ redirect_to project_wikis_path(@project)
+ else
+ flash[:error] = 'Wiki ' + params[:id] + ' does not exist.'
+ redirect_to project_wikis_path(@project)
+ end
+
+# else
+# flash[:error] = 'xxxxxxxxxx'
+# redirect_to root_path
end
- rescue ActiveRecord::RecordNotFound
- flash[:error] = 'Wiki ' + params[:id] + ' does not exist.'
- redirect_to project_wikis_path(@project)
end
-
#FIXME
def to_slug(s)
s.gsub(/\W+/, ' ').strip.downcase.gsub(/\ +/, '-')
end
-
protected
# Increase view count for a wiki page |
| |   |
| 150 | 150 | end |
| 151 | 151 | |
| 152 | 152 | def breadcrumb_repositories |
| 153 | | %Q{<li>#{link_to("Repos", project_repositories_path(@project))}<span> / </span></li>} |
| 153 | %Q{<li>#{link_to("Git", project_repositories_path(@project))}<span> / </span></li>} |
| 154 | 154 | end |
| 155 | 155 | |
| 156 | 156 | def breadcrumb_repository |
| … | … | |
| 334 | 334 | acts << %Q{<li>#{link_to("New Article", new_project_article_path(@project.slug))}</li>} if flags[:new_article] && is_member |
| 335 | 335 | acts << %Q{<li>#{link_to("New Ticket", new_project_ticket_path(@project.slug))}</li>} if flags[:new_ticket] |
| 336 | 336 | acts << %Q{<li>#{link_to("New Milestone", new_project_milestone_path(@project.slug))}</li>} if flags[:new_milestone] && is_member |
| 337 | acts << %Q{<li>#{link_to("Current Milestones", root_path)}</li>} if flags[:current_milestones] |
| 337 | 338 | acts << %Q{<li>#{link_to("Completed Milestones", root_path)}</li>} if flags[:completed_milestones] |
| 338 | 339 | acts << %Q{<li>#{link_to("Clone Mainline", new_project_repository_path(@project.slug, @repository))}</li>} if flags[:clone_mainline] && logged_in? |
| 339 | 340 | out << %Q{<tr><td><ul>#{acts}</ul></td></tr>} if acts != "" |
| toggle raw diff |
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -150,7 +150,7 @@ module ApplicationHelper
end
def breadcrumb_repositories
- %Q{<li>#{link_to("Repos", project_repositories_path(@project))}<span> / </span></li>}
+ %Q{<li>#{link_to("Git", project_repositories_path(@project))}<span> / </span></li>}
end
def breadcrumb_repository
@@ -334,6 +334,7 @@ module ApplicationHelper
acts << %Q{<li>#{link_to("New Article", new_project_article_path(@project.slug))}</li>} if flags[:new_article] && is_member
acts << %Q{<li>#{link_to("New Ticket", new_project_ticket_path(@project.slug))}</li>} if flags[:new_ticket]
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("Current Milestones", root_path)}</li>} if flags[:current_milestones]
acts << %Q{<li>#{link_to("Completed Milestones", root_path)}</li>} if flags[:completed_milestones]
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 != "" |
| |   |
| 23 | 23 | out |
| 24 | 24 | end |
| 25 | 25 | |
| 26 | | def render_right_project_contributors |
| 26 | def render_right_project_members |
| 27 | 27 | out = "" |
| 28 | 28 | members = Member.find_by_project(@project.id) |
| 29 | 29 | if members.size > 0 then |
| 30 | 30 | out << "<table class='right_default_table'>" |
| 31 | | out << "<tr><th>Contributors</th></tr>" |
| 31 | out << "<tr><th>Members</th></tr>" |
| 32 | 32 | for member in members |
| 33 | 33 | #TODO only display admin/modify members |
| 34 | 34 | out << %Q{<tr><td>#{link_to_profile(member.user)} <small><span style='color: #888'>(#{format_member_accesslevel(member.accesslevel)})</span></small></td></tr>} if member.accesslevel != :user |
| … | … | |
| 62 | 62 | def render_project_tabs (active_tab) |
| 63 | 63 | out = "" |
| 64 | 64 | out << "<ul id='tabmenu'>" |
| 65 | | out << project_tab(active_tab, PRJ_TAB_WIKI) |
| 66 | | out << project_tab(active_tab, PRJ_TAB_REPOS) |
| 67 | | out << project_tab(active_tab, PRJ_TAB_ACTIVITIES) |
| 68 | | out << project_tab(active_tab, PRJ_TAB_ROADMAP) |
| 65 | out << project_tab(active_tab, PRJ_TAB_SUMMARY) |
| 66 | out << project_tab(active_tab, PRJ_TAB_GIT) |
| 67 | out << project_tab(active_tab, PRJ_TAB_MEMBERS) |
| 69 | 68 | out << project_tab(active_tab, PRJ_TAB_TICKETS) |
| 69 | out << project_tab(active_tab, PRJ_TAB_WIKI) |
| 70 | 70 | out << project_tab(active_tab, PRJ_TAB_ARTICLES) |
| 71 | 71 | out << project_tab(active_tab, PRJ_TAB_FORUM) |
| 72 | 72 | out << project_tab(active_tab, PRJ_TAB_LOG) |
| … | … | |
| 78 | 78 | def breadcrumb_repos_tab(subtab) |
| 79 | 79 | subtab == PRJ_TAB_SUBTAB_NONE ? out = "" : out = breadcrumb_repositories |
| 80 | 80 | case subtab |
| 81 | | when PRJ_TAB_REPOS_LOGS |
| 81 | when PRJ_TAB_GIT_LOGS |
| 82 | 82 | out << breadcrumb_repository |
| 83 | | when PRJ_TAB_REPOS_COMMIT |
| 83 | when PRJ_TAB_GIT_COMMIT |
| 84 | 84 | out << breadcrumb_repository |
| 85 | 85 | out << breadcrumb_repos_logs |
| 86 | | when PRJ_TAB_REPOS_TREE |
| 86 | when PRJ_TAB_GIT_TREE |
| 87 | 87 | out << breadcrumb_repository |
| 88 | | when PRJ_TAB_REPOS_MERGEREQUESTS |
| 88 | when PRJ_TAB_GIT_MERGEREQUESTS |
| 89 | 89 | end |
| 90 | 90 | out |
| 91 | 91 | end |
| … | … | |
| 100 | 100 | def render_right_column_project (tab, subtab) |
| 101 | 101 | out = "" |
| 102 | 102 | case tab |
| 103 | | when PRJ_TAB_WIKI |
| 104 | | case subtab |
| 105 | | when PRJ_TAB_WIKI_EDIT, PRJ_TAB_WIKI_NEW |
| 106 | | out << actionbox_basic(:allow_shortcuts => true) |
| 107 | | when PRJ_TAB_WIKI_LIST |
| 108 | | out << actionbox_complex(:allow_shortcuts => true, :new_project_wiki => true) |
| 109 | | else |
| 110 | | out << actionbox_complex(:allow_shortcuts => true, :edit_project_wiki => true, :new_project_wiki => true, :list_project_wikis => true) |
| 111 | | out << render_right_project_extrainfo |
| 112 | | out << render_right_project_contributors |
| 113 | | end |
| 114 | | when PRJ_TAB_ACTIVITIES |
| 115 | | out << actionbox_basic(:allow_shortcuts => true) |
| 116 | | out << render(:partial => "ac_right_actionbox_post_message") if @is_member |
| 117 | | when PRJ_TAB_REPOS |
| 103 | when PRJ_TAB_SUMMARY |
| 104 | out << actionbox_complex(:allow_shortcuts => true) |
| 105 | out << render_right_project_extrainfo |
| 106 | out << render_right_project_members |
| 107 | when PRJ_TAB_GIT |
| 118 | 108 | case subtab |
| 119 | 109 | when PRJ_TAB_SUBTAB_NONE |
| 120 | 110 | out << actionbox_complex(:allow_shortcuts => true, :clone_mainline => true) |
| 121 | | when PRJ_TAB_REPOS_SUMMARY |
| 111 | when PRJ_TAB_GIT_SUMMARY |
| 122 | 112 | out << render(:partial => "repositories/ac_right_actionbox_repos_summary") |
| 123 | | when PRJ_TAB_REPOS_LOGS |
| 113 | when PRJ_TAB_GIT_LOGS |
| 124 | 114 | out << actionbox_basic(:allow_shortcuts => true) |
| 125 | 115 | out << render(:partial => "repositories/ac_right_branches") |
| 126 | | when PRJ_TAB_REPOS_COMMIT |
| 116 | when PRJ_TAB_GIT_COMMIT |
| 127 | 117 | out << actionbox_basic(:allow_shortcuts => true) |
| 128 | 118 | out << render(:partial => "commits/ac_right_diff_mode_selector") |
| 129 | | when PRJ_TAB_REPOS_TREE |
| 119 | when PRJ_TAB_GIT_TREE |
| 130 | 120 | out << actionbox_basic(:allow_shortcuts => true) |
| 131 | 121 | out << render(:partial => "trees/ac_right_branches") |
| 132 | | when PRJ_TAB_REPOS_MERGEREQUESTS |
| 122 | when PRJ_TAB_GIT_MERGEREQUESTS |
| 133 | 123 | out << actionbox_basic(:allow_shortcuts => true) |
| 134 | 124 | end |
| 135 | | when PRJ_TAB_ROADMAP |
| 136 | | out << actionbox_complex(:allow_shortcuts => true, :new_milestone => true, :completed_milestones => true) |
| 125 | when PRJ_TAB_MEMBERS |
| 126 | out << actionbox_basic(:allow_shortcuts => true) |
| 127 | out << render(:partial => "ac_right_actionbox_post_message") if @is_member |
| 128 | out << render_right_project_members |
| 137 | 129 | when PRJ_TAB_TICKETS |
| 138 | | out << actionbox_complex(:allow_shortcuts => true, :new_ticket => true) |
| 130 | out << actionbox_complex(:allow_shortcuts => true, :new_ticket => true, :new_milestone => true, :completed_milestones => true, :current_milestones => true) |
| 139 | 131 | out << render(:partial => "ac_right_ticket_filter") |
| 132 | when PRJ_TAB_WIKI |
| 133 | case subtab |
| 134 | when PRJ_TAB_WIKI_EDIT, PRJ_TAB_WIKI_NEW |
| 135 | out << actionbox_basic(:allow_shortcuts => true) |
| 136 | when PRJ_TAB_WIKI_LIST |
| 137 | out << actionbox_complex(:allow_shortcuts => true, :new_project_wiki => true) |
| 138 | else |
| 139 | out << actionbox_complex(:allow_shortcuts => true, :edit_project_wiki => true, :new_project_wiki => true, :list_project_wikis => true) |
| 140 | end |
| 140 | 141 | when PRJ_TAB_ARTICLES |
| 141 | 142 | case subtab |
| 142 | 143 | when PRJ_TAB_ARTICLES_EDIT, PRJ_TAB_ARTICLES_NEW |
| toggle raw diff |
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -23,12 +23,12 @@ module ProjectsHelper
out
end
- def render_right_project_contributors
+ def render_right_project_members
out = ""
members = Member.find_by_project(@project.id)
if members.size > 0 then
out << "<table class='right_default_table'>"
- out << "<tr><th>Contributors</th></tr>"
+ out << "<tr><th>Members</th></tr>"
for member in members
#TODO only display admin/modify members
out << %Q{<tr><td>#{link_to_profile(member.user)} <small><span style='color: #888'>(#{format_member_accesslevel(member.accesslevel)})</span></small></td></tr>} if member.accesslevel != :user
@@ -62,11 +62,11 @@ module ProjectsHelper
def render_project_tabs (active_tab)
out = ""
out << "<ul id='tabmenu'>"
- out << project_tab(active_tab, PRJ_TAB_WIKI)
- out << project_tab(active_tab, PRJ_TAB_REPOS)
- out << project_tab(active_tab, PRJ_TAB_ACTIVITIES)
- out << project_tab(active_tab, PRJ_TAB_ROADMAP)
+ out << project_tab(active_tab, PRJ_TAB_SUMMARY)
+ out << project_tab(active_tab, PRJ_TAB_GIT)
+ out << project_tab(active_tab, PRJ_TAB_MEMBERS)
out << project_tab(active_tab, PRJ_TAB_TICKETS)
+ out << project_tab(active_tab, PRJ_TAB_WIKI)
out << project_tab(active_tab, PRJ_TAB_ARTICLES)
out << project_tab(active_tab, PRJ_TAB_FORUM)
out << project_tab(active_tab, PRJ_TAB_LOG)
@@ -78,14 +78,14 @@ module ProjectsHelper
def breadcrumb_repos_tab(subtab)
subtab == PRJ_TAB_SUBTAB_NONE ? out = "" : out = breadcrumb_repositories
case subtab
- when PRJ_TAB_REPOS_LOGS
+ when PRJ_TAB_GIT_LOGS
out << breadcrumb_repository
- when PRJ_TAB_REPOS_COMMIT
+ when PRJ_TAB_GIT_COMMIT
out << breadcrumb_repository
out << breadcrumb_repos_logs
- when PRJ_TAB_REPOS_TREE
+ when PRJ_TAB_GIT_TREE
out << breadcrumb_repository
- when PRJ_TAB_REPOS_MERGEREQUESTS
+ when PRJ_TAB_GIT_MERGEREQUESTS
end
out
end
@@ -100,43 +100,44 @@ module ProjectsHelper
def render_right_column_project (tab, subtab)
out = ""
case tab
- when PRJ_TAB_WIKI
- case subtab
- when PRJ_TAB_WIKI_EDIT, PRJ_TAB_WIKI_NEW
- out << actionbox_basic(:allow_shortcuts => true)
- when PRJ_TAB_WIKI_LIST
- out << actionbox_complex(:allow_shortcuts => true, :new_project_wiki => true)
- else
- out << actionbox_complex(:allow_shortcuts => true, :edit_project_wiki => true, :new_project_wiki => true, :list_project_wikis => true)
- out << render_right_project_extrainfo
- out << render_right_project_contributors
- end
- when PRJ_TAB_ACTIVITIES
- out << actionbox_basic(:allow_shortcuts => true)
- out << render(:partial => "ac_right_actionbox_post_message") if @is_member
- when PRJ_TAB_REPOS
+ when PRJ_TAB_SUMMARY
+ out << actionbox_complex(:allow_shortcuts => true)
+ out << render_right_project_extrainfo
+ out << render_right_project_members
+ when PRJ_TAB_GIT
case subtab
when PRJ_TAB_SUBTAB_NONE
out << actionbox_complex(:allow_shortcuts => true, :clone_mainline => true)
- when PRJ_TAB_REPOS_SUMMARY
+ when PRJ_TAB_GIT_SUMMARY
out << render(:partial => "repositories/ac_right_actionbox_repos_summary")
- when PRJ_TAB_REPOS_LOGS
+ when PRJ_TAB_GIT_LOGS
out << actionbox_basic(:allow_shortcuts => true)
out << render(:partial => "repositories/ac_right_branches")
- when PRJ_TAB_REPOS_COMMIT
+ when PRJ_TAB_GIT_COMMIT
out << actionbox_basic(:allow_shortcuts => true)
out << render(:partial => "commits/ac_right_diff_mode_selector")
- when PRJ_TAB_REPOS_TREE
+ when PRJ_TAB_GIT_TREE
out << actionbox_basic(:allow_shortcuts => true)
out << render(:partial => "trees/ac_right_branches")
- when PRJ_TAB_REPOS_MERGEREQUESTS
+ when PRJ_TAB_GIT_MERGEREQUESTS
out << actionbox_basic(:allow_shortcuts => true)
end
- when PRJ_TAB_ROADMAP
- out << actionbox_complex(:allow_shortcuts => true, :new_milestone => true, :completed_milestones => true)
+ when PRJ_TAB_MEMBERS
+ out << actionbox_basic(:allow_shortcuts => true)
+ out << render(:partial => "ac_right_actionbox_post_message") if @is_member
+ out << render_right_project_members
when PRJ_TAB_TICKETS
- out << actionbox_complex(:allow_shortcuts => true, :new_ticket => true)
+ out << actionbox_complex(:allow_shortcuts => true, :new_ticket => true, :new_milestone => true, :completed_milestones => true, :current_milestones => true)
out << render(:partial => "ac_right_ticket_filter")
+ when PRJ_TAB_WIKI
+ case subtab
+ when PRJ_TAB_WIKI_EDIT, PRJ_TAB_WIKI_NEW
+ out << actionbox_basic(:allow_shortcuts => true)
+ when PRJ_TAB_WIKI_LIST
+ out << actionbox_complex(:allow_shortcuts => true, :new_project_wiki => true)
+ else
+ out << actionbox_complex(:allow_shortcuts => true, :edit_project_wiki => true, :new_project_wiki => true, :list_project_wikis => true)
+ end
when PRJ_TAB_ARTICLES
case subtab
when PRJ_TAB_ARTICLES_EDIT, PRJ_TAB_ARTICLES_NEW |