summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/help/index.html.haml52
-rw-r--r--app/views/help/permissions.html.haml27
-rw-r--r--app/views/help/workflow.html.haml38
-rw-r--r--app/views/projects/team.html.haml6
-rw-r--r--app/views/protected_branches/index.html.haml40
-rw-r--r--app/views/repositories/_branches_head.html.haml2
-rw-r--r--app/views/team_members/_form.html.haml20
-rw-r--r--app/views/team_members/_show.html.haml8
8 files changed, 128 insertions, 65 deletions
diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml
index fd1f512bbd8..2b0b5a191ff 100644
--- a/app/views/help/index.html.haml
+++ b/app/views/help/index.html.haml
@@ -1,43 +1,17 @@
-- bash_lexer = Pygments::Lexer[:bash]
-%div.help_content
- %h2
- Gitlabhq
- %span.right v2.1
- %hr
- %h3 Self Hosted Git Management
- %h3 Fast, secure and stable solution based on Ruby on Rails & Gitolite.
+%h3
+ Gitlabhq
+ %span.right v2.2
+%hr
+%h4 Self Hosted Git Management
+%h4 Fast, secure and stable solution based on Ruby on Rails & Gitolite.
- %hr
+%hr
- .menu
- %h3= link_to "Workflow", "#", :class => "active"
+%h3 Help
- .content
- %h3 Clone project
- .bash
- %pre
- git clone git@example.com:project-name.git
+%ol
+ %li
+ = link_to "Workflow", help_workflow_path
- %h3 Create branch with your feature
- .bash
- %pre
- git checkout -b $feature_name
-
- %h3 Write code. Commit changes
- .bash
- %pre
- git commit -am "My feature is ready"
-
- %h3 Push your branch to gitlabhq
- .bash
- %pre
- git push origin $feature_name
-
- %h3 Review your code
- .bash= image_tag "help_commit.png", :width => 600
-
-
- %h3 Open a merge request
- .bash= image_tag "help_merge_request.png", :width => 600
-
- %h3 Your team lead will review code & merge it to main branch
+ %li
+ = link_to "Permissions", help_permissions_path
diff --git a/app/views/help/permissions.html.haml b/app/views/help/permissions.html.haml
new file mode 100644
index 00000000000..1e54a91dcd2
--- /dev/null
+++ b/app/views/help/permissions.html.haml
@@ -0,0 +1,27 @@
+%h3 Permissions
+%hr
+
+%h4 Reporter
+%ul
+ %li Pull project code
+ %li Create new issue
+ %li Create new merge request
+ %li Write on project wall
+
+
+%h4 Developer
+%ul
+ %li Pull project code
+ %li Create new branches
+ %li Push to non-protected branches
+ %li Remove non-protected branches
+ %li Add tags
+ %li Create new issue
+ %li Create new merge request
+ %li Write on project wall
+
+%h4 Master
+%ul
+ %li Full repository access
+ %li Full project access
+ %li Add new team members
diff --git a/app/views/help/workflow.html.haml b/app/views/help/workflow.html.haml
new file mode 100644
index 00000000000..4785b367e65
--- /dev/null
+++ b/app/views/help/workflow.html.haml
@@ -0,0 +1,38 @@
+- bash_lexer = Pygments::Lexer[:bash]
+%h3 Workflow
+%hr
+
+%ol.help
+ %li
+ %p Clone project
+ .bash
+ %pre
+ git clone git@example.com:project-name.git
+
+ %li
+ %p Create branch with your feature
+ .bash
+ %pre
+ git checkout -b $feature_name
+
+ %li
+ %p Write code. Commit changes
+ .bash
+ %pre
+ git commit -am "My feature is ready"
+
+ %li
+ %p Push your branch to gitlabhq
+ .bash
+ %pre
+ git push origin $feature_name
+
+ %li
+ %p Review your code on Commits page
+
+ %li
+ %p Create a merge request
+
+ %li
+ %p Your team lead will review code & merge it to main branch
+
diff --git a/app/views/projects/team.html.haml b/app/views/projects/team.html.haml
index 884c1645445..a19f57026f4 100644
--- a/app/views/projects/team.html.haml
+++ b/app/views/projects/team.html.haml
@@ -4,9 +4,9 @@
.alert-message.block-message
= link_to new_project_team_member_path(@project), :class => "btn small right", :title => "New Team Member" do
New Team Member
- Manage project team from this page.
- %br
- To open team member profile - click on avatar.
+ %p Ream more about project permissions #{link_to "here", help_permissions_path, :class => "vlink"}
+ %p To open team member profile - click on avatar.
+
= render :partial => "team", :locals => {:project => @project}
diff --git a/app/views/protected_branches/index.html.haml b/app/views/protected_branches/index.html.haml
index 055d9369091..dde90af3d39 100644
--- a/app/views/protected_branches/index.html.haml
+++ b/app/views/protected_branches/index.html.haml
@@ -1,25 +1,22 @@
= render "repositories/branches_head"
-= form_for [@project, @protected_branch] do |f|
- -if @protected_branch.errors.any?
- .alert-message.block-message.error
- %ul
- - @protected_branch.errors.full_messages.each do |msg|
- %li= msg
+.alert-message.block-message
+ %p Protected branches designed to prevent push for all except #{link_to "masters", help_permissions_path, :class => "vlink"}.
+ %p This ability allows:
+ %ul
+ %li keep stable branches secured
+ %li forced code review before merge to protected branches
+ %p Ream more about project permissions #{link_to "here", help_permissions_path, :class => "vlink"}
- .clearfix
- = f.label :name
- .input= f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , { :include_blank => "Select branch" }, { :style => "width:300px" })
- .actions
- = f.submit 'Add', :class => "primary btn"
- unless @branches.empty?
- %table
+ %table.zebra-striped
%thead
%tr
%th Name
%th Last commit
+ %th
%tbody
- @branches.each do |branch|
%tr
@@ -33,6 +30,25 @@
= truncate branch.commit.id.to_s, :length => 10
= time_ago_in_words(branch.commit.committed_date)
ago
+ %td
+ - if can? current_user, :admin_project, @project
+ = link_to 'Unprotect', [@project, branch], :confirm => 'Are you sure?', :method => :delete, :class => "danger btn small"
+
+
+
+- if can? current_user, :admin_project, @project
+ = form_for [@project, @protected_branch] do |f|
+ -if @protected_branch.errors.any?
+ .alert-message.block-message.error
+ %ul
+ - @protected_branch.errors.full_messages.each do |msg|
+ %li= msg
+
+ .clearfix
+ = f.label :name
+ .input= f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , { :include_blank => "Select branch" }, { :style => "width:300px" })
+ .actions
+ = f.submit 'Add', :class => "primary btn"
:javascript
diff --git a/app/views/repositories/_branches_head.html.haml b/app/views/repositories/_branches_head.html.haml
index d98dedc23eb..dd4d6868bcc 100644
--- a/app/views/repositories/_branches_head.html.haml
+++ b/app/views/repositories/_branches_head.html.haml
@@ -6,4 +6,4 @@
%li{:class => ("active" if current_page?(project_protected_branches_path(@project)))}
= link_to project_protected_branches_path(@project) do
Protected
-
+%hr
diff --git a/app/views/team_members/_form.html.haml b/app/views/team_members/_form.html.haml
index ec31deb183a..bc4ee353b77 100644
--- a/app/views/team_members/_form.html.haml
+++ b/app/views/team_members/_form.html.haml
@@ -11,13 +11,20 @@
= f.label :user_id, "Name"
.input= f.select(:user_id, User.not_in_project(@project).all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" }, { :style => "width:300px" })
+
.clearfix
= f.label :project_access, "Project Access"
- .input= f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, :class => "project-access-select"
+ .input= f.select :_project_access, options_for_select(UsersProject.access_roles, @team_member.role_access), {}, :class => "project-access-select"
+
- .clearfix
- = f.label :repo_access, "Repository Access"
- .input= f.select :repo_access, options_for_select(Repository.access_options, @team_member.repo_access), {}, :class => "repo-access-select"
+
+ -#.clearfix
+ -#= f.label :project_access, "Project Access"
+ -#.input= f.select :project_access, options_for_select(Project.access_options, @team_member.project_access), {}, :class => "project-access-select"
+
+ -#.clearfix
+ -#= f.label :repo_access, "Repository Access"
+ -#.input= f.select :repo_access, options_for_select(Repository.access_options, @team_member.repo_access), {}, :class => "repo-access-select"
.actions
= f.submit 'Save', :class => "btn primary"
@@ -30,5 +37,6 @@
:javascript
$('select#team_member_user_id').chosen();
- $('select#team_member_repo_access').chosen();
- $('select#team_member_project_access').chosen();
+ $('select#team_member__project_access').chosen();
+ //$('select#team_member_repo_access').chosen();
+ //$('select#team_member_project_access').chosen();
diff --git a/app/views/team_members/_show.html.haml b/app/views/team_members/_show.html.haml
index e5cd947ba2b..90a5de602e6 100644
--- a/app/views/team_members/_show.html.haml
+++ b/app/views/team_members/_show.html.haml
@@ -11,9 +11,9 @@
.span3
= form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f|
- = f.select :project_access, options_for_select(Project.access_options, member.project_access), {}, :class => "medium project-access-select", :disabled => !allow_admin
- .span3
- = form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f|
- = f.select :repo_access, options_for_select(Repository.access_options, member.repo_access), {}, :class => "medium repo-access-select", :disabled => !allow_admin
+ = f.select :_project_access, options_for_select(UsersProject.access_roles, member.role_access), {}, :class => "medium project-access-select", :disabled => !allow_admin
+ -#.span3
+ -#= form_for(member, :as => :team_member, :url => project_team_member_path(@project, member)) do |f|
+ -#= f.select :repo_access, options_for_select(Repository.access_options, member.repo_access), {}, :class => "medium repo-access-select", :disabled => !allow_admin
- if @project.owner == user
%span.label Project Owner