project_settings.page=Settings
project_links.page=Links
project_exclusions.page=Exclusions
+project_deletion.page=Deletion
quality_profiles.page=Quality Profiles
reviews.page=Reviews
settings.page=General Settings
redirect_to :overwrite_params => {:controller => :dashboard, :action => 'index'}
end
+ def deletion
+ @project=Project.by_key(params[:id])
+ return access_denied unless is_admin?(@project)
+
+ @snapshot=@project.last_snapshot
+ if !@project.project?
+ redirect_to :action => 'index', :id => params[:id]
+ end
+ end
+
def delete
if params[:id]
@project = Project.by_key(params[:id])
<% if (@project.project? || @project.view? || @project.subview?) %>
<li class="<%= 'selected' if request.request_uri.include?('/project_roles') -%>"><a href="<%= ApplicationController.root_context -%>/project_roles/index?resource=<%= @project.id -%>"><%= message('project_roles.page') -%></a></li>
<% end %>
+ <% if (@project.project?) %>
+ <li class="<%= 'selected' if request.request_uri.include?('/project/deletion') -%>"><a href="<%= ApplicationController.root_context -%>/project/deletion/<%= @project.id -%>"><%= message('project_deletion.page') -%></a></li>
+ <% end %>
<% end %>
<% elsif selected_section==Navigation::SECTION_CONFIGURATION %>
--- /dev/null
+<% if @snapshot.root? %>
+<h1>Delete project</h1>
+<br/>
+<div class="yui-g widget" id="widget_delete_project">
+ <div class="warning">
+ This operation can not be undone.
+ <%= button_to( "Delete project", { :action => "delete", :id => @project.id }, :class => 'action red-button', :confirm => "Are you sure you want to delete this project?", :method => :delete) %>
+ </div>
+</div>
+<% end %>
\ No newline at end of file
<div name="settings">
-<%= render :partial => 'project/settings/plugins' %>
-<% if @project.project? %>
-<br/>
-<%= render :partial => 'project/settings/delete_project' %>
-<% end %>
+ <h1 class="marginbottom10">Settings</h1>
+
+ <div class="yui-g widget" id="widget_plugins">
+ <%= render :partial => 'settings/plugins', :locals => {:project=>@project} %>
+ </div>
</div>
\ No newline at end of file
+++ /dev/null
-<% if @snapshot.root? %>
-<h1>Delete project</h1>
-<div class="yui-g widget" id="widget_delete_project">
- <div class="warning">
- This operation can not be undone.
- <%= button_to( "Delete project", { :action => "delete", :id => @project.id }, :class => 'action red-button', :confirm => "Are you sure you want to delete this project?", :method => :delete) %>
- </div>
-</div>
-<% end %>
\ No newline at end of file
+++ /dev/null
-<h1 class="marginbottom10">Settings</h1>
-<div class="yui-g widget" id="widget_plugins">
-<%= render :partial => 'settings/plugins', :locals => {:project=>@project} %>
-</div>
\ No newline at end of file