adds settings menu to the top for editting and leaving projects
This commit is contained in:
parent
47fbba4474
commit
eb162c2b27
3 changed files with 25 additions and 9 deletions
|
@ -26,6 +26,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.project-home-panel {
|
.project-home-panel {
|
||||||
|
|
||||||
|
.cover-controls {
|
||||||
|
.project-settings-dropdown {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.project-identicon-holder {
|
.project-identicon-holder {
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,26 @@
|
||||||
= visibility_level_label(@project.visibility_level)
|
= visibility_level_label(@project.visibility_level)
|
||||||
|
|
||||||
.cover-controls
|
.cover-controls
|
||||||
- if can?(current_user, :admin_project, @project)
|
|
||||||
= link_to edit_project_path(@project), class: 'btn btn-gray' do
|
|
||||||
= icon('pencil')
|
|
||||||
- if current_user
|
- if current_user
|
||||||
|
|
||||||
= link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), class: 'btn btn-gray' do
|
= link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), class: 'btn btn-gray' do
|
||||||
= icon('rss')
|
= icon('rss')
|
||||||
|
- access = user_max_access_in_project(current_user.id, @project)
|
||||||
|
- can_edit = can?(current_user, :admin_project, @project)
|
||||||
|
- if access || can_edit
|
||||||
|
%span.dropdown.project-settings-dropdown
|
||||||
|
%a.dropdown-new.btn.btn-gray.notifications-btn#notifications-button{href: '#', 'data-toggle' => 'dropdown'}
|
||||||
|
= icon('cog')
|
||||||
|
= icon('angle-down')
|
||||||
|
%ul.dropdown-menu.dropdown-menu-right
|
||||||
|
- if can_edit
|
||||||
|
%li
|
||||||
|
= link_to edit_project_path(@project) do
|
||||||
|
Edit Project
|
||||||
|
- if access
|
||||||
|
%li
|
||||||
|
= link_to leave_namespace_project_project_members_path(@project.namespace, @project),
|
||||||
|
data: { confirm: leave_project_message(@project) }, method: :delete, title: 'Leave project' do
|
||||||
|
Leave project
|
||||||
|
|
||||||
.project-repo-buttons
|
.project-repo-buttons
|
||||||
.split-one.count-buttons
|
.split-one.count-buttons
|
||||||
|
|
|
@ -75,8 +75,4 @@
|
||||||
- if access
|
- if access
|
||||||
.prepend-top-20.project-footer
|
.prepend-top-20.project-footer
|
||||||
.gray-content-block.footer-block.center
|
.gray-content-block.footer-block.center
|
||||||
You have #{access} access to this project.
|
You have #{access} access to this project.
|
||||||
- if @project.project_member_by_id(current_user)
|
|
||||||
= link_to leave_namespace_project_project_members_path(@project.namespace, @project),
|
|
||||||
data: { confirm: leave_project_message(@project) }, method: :delete, title: 'Leave project', class: 'cred' do
|
|
||||||
Leave this project
|
|
Loading…
Reference in a new issue