Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/background_jobs/show.html.haml18
-rw-r--r--app/views/dashboard/_zero_authorized_projects.html.haml15
-rw-r--r--app/views/devise/sessions/_oauth_providers.html.haml4
-rw-r--r--app/views/groups/members.html.haml6
-rw-r--r--app/views/layouts/_head.html.haml3
-rw-r--r--app/views/layouts/_head_panel.html.haml4
-rw-r--r--app/views/layouts/_init_auto_complete.html.haml1
-rw-r--r--app/views/layouts/_public_head_panel.html.haml16
-rw-r--r--app/views/layouts/notify.html.haml34
-rw-r--r--app/views/layouts/public_projects.html.haml2
-rw-r--r--app/views/notify/_note_message.html.haml6
-rw-r--r--app/views/notify/closed_issue_email.html.haml3
-rw-r--r--app/views/notify/closed_merge_request_email.html.haml9
-rw-r--r--app/views/notify/group_access_granted_email.html.haml1
-rw-r--r--app/views/notify/issue_status_changed_email.html.haml3
-rw-r--r--app/views/notify/merged_merge_request_email.html.haml9
-rw-r--r--app/views/notify/new_issue_email.html.haml15
-rw-r--r--app/views/notify/new_merge_request_email.html.haml14
-rw-r--r--app/views/notify/note_commit_email.html.haml3
-rw-r--r--app/views/notify/note_issue_email.html.haml3
-rw-r--r--app/views/notify/note_merge_request_email.html.haml13
-rw-r--r--app/views/notify/note_wall_email.html.haml4
-rw-r--r--app/views/notify/reassigned_issue_email.html.haml3
-rw-r--r--app/views/notify/reassigned_merge_request_email.html.haml3
-rw-r--r--app/views/projects/commit/_commit_box.html.haml4
-rw-r--r--app/views/projects/commits/_diffs.html.haml7
-rw-r--r--app/views/projects/create.js.haml8
-rw-r--r--app/views/projects/edit.html.haml173
-rw-r--r--app/views/projects/empty.html.haml70
-rw-r--r--app/views/projects/hooks/index.html.haml9
-rw-r--r--app/views/projects/import.html.haml30
-rw-r--r--app/views/projects/merge_requests/_form.html.haml45
-rw-r--r--app/views/projects/merge_requests/branch_from.js.haml2
-rw-r--r--app/views/projects/merge_requests/show/_mr_accept.html.haml31
-rw-r--r--app/views/projects/merge_requests/show/_mr_box.html.haml4
-rw-r--r--app/views/projects/new.html.haml61
-rw-r--r--app/views/projects/notes/_diff_notes_with_reply.html.haml2
-rw-r--r--app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml2
-rw-r--r--app/views/projects/notes/_note.html.haml2
-rw-r--r--app/views/projects/show.html.haml4
40 files changed, 325 insertions, 321 deletions
diff --git a/app/views/admin/background_jobs/show.html.haml b/app/views/admin/background_jobs/show.html.haml
index e5af56ffc5c..32f77cc1a70 100644
--- a/app/views/admin/background_jobs/show.html.haml
+++ b/app/views/admin/background_jobs/show.html.haml
@@ -14,27 +14,21 @@
%table.table
%thead
%th USER
- %th
%th PID
- %th
%th CPU
- %th
%th MEM
- %th
%th STATE
- %th
%th START
- %th
%th COMMAND
- %th
- - @sidekiq_processes.split("\n").each do |process|
+ %tbody
+ - @sidekiq_processes.each do |process|
- next unless process.match(/(sidekiq \d+\.\d+\.\d+.+$)/)
- - data = process.gsub!(/\s+/m, '|').strip.split('|')
+ - data = process.strip.split(' ')
%tr
- - 6.times do
+ %td= Settings.gitlab.user
+ - 5.times do
%td= data.shift
- %td
- %td= data.join(" ")
+ %td= data.join(' ')
.clearfix
%p
diff --git a/app/views/dashboard/_zero_authorized_projects.html.haml b/app/views/dashboard/_zero_authorized_projects.html.haml
index bb62a1c24fc..e0993293eab 100644
--- a/app/views/dashboard/_zero_authorized_projects.html.haml
+++ b/app/views/dashboard/_zero_authorized_projects.html.haml
@@ -34,3 +34,18 @@
= link_to new_group_path, class: "btn btn-new" do
New group »
+-if @publicish_project_count > 0
+ %hr
+ %div
+ .dashboard-intro-icon
+ %i.icon-globe
+ %div
+ %p.slead
+ There are
+ %strong= @publicish_project_count
+ public projects on this server.
+ %br
+ Public projects are an easy way to allow everyone to have read-only access.
+ .link_holder
+ = link_to public_projects_path, class: "btn btn-new" do
+ Browse public projects »
diff --git a/app/views/devise/sessions/_oauth_providers.html.haml b/app/views/devise/sessions/_oauth_providers.html.haml
index 935bc6af505..2b1cb9c694f 100644
--- a/app/views/devise/sessions/_oauth_providers.html.haml
+++ b/app/views/devise/sessions/_oauth_providers.html.haml
@@ -2,10 +2,12 @@
- if providers.present?
%hr
%div{:'data-no-turbolink' => 'data-no-turbolink'}
- %span Sign in with:  
+ %span Sign in with*:  
- providers.each do |provider|
%span
- if default_providers.include?(provider)
= link_to authbutton(provider, 32), omniauth_authorize_path(resource_name, provider)
- else
= link_to provider.to_s.titleize, omniauth_authorize_path(resource_name, provider), class: "btn"
+ %br
+ %small * Make sure your email address is public
diff --git a/app/views/groups/members.html.haml b/app/views/groups/members.html.haml
index 0c972622f88..2d0605b18ad 100644
--- a/app/views/groups/members.html.haml
+++ b/app/views/groups/members.html.haml
@@ -9,7 +9,7 @@
%hr
-.clearfix
+.clearfix.js-toggle-container
= form_tag members_group_path(@group), method: :get, class: 'form-inline member-search-form' do
.form-group
= search_field_tag :search, params[:search], { placeholder: 'Find member by name', class: 'form-control search-text-input input-mn-300' }
@@ -17,11 +17,11 @@
- if current_user && current_user.can?(:manage_group, @group)
.pull-right
- = link_to '#', class: 'btn btn-new js-toggle-visibility-link' do
+ = link_to '#', class: 'btn btn-new js-toggle-button' do
Add members
%i.icon-chevron-down
- .js-toggle-visibility-container.hide.new-group-member-holder
+ .js-toggle-content.hide.new-group-member-holder
= render "new_group_member"
.ui-box.prepend-top-20
diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml
index 9ba20f1347d..d9a7a2d31cf 100644
--- a/app/views/layouts/_head.html.haml
+++ b/app/views/layouts/_head.html.haml
@@ -4,7 +4,8 @@
= "#{title} | " if defined?(title)
GitLab
= favicon_link_tag 'favicon.ico'
- = stylesheet_link_tag "application"
+ = stylesheet_link_tag "application", :media => "all"
+ = stylesheet_link_tag "print", :media => "print"
= javascript_include_tag "application"
= csrf_meta_tags
= include_gon
diff --git a/app/views/layouts/_head_panel.html.haml b/app/views/layouts/_head_panel.html.haml
index 5080a1b7ef6..d8001fd76d7 100644
--- a/app/views/layouts/_head_panel.html.haml
+++ b/app/views/layouts/_head_panel.html.haml
@@ -15,10 +15,6 @@
.navbar-collapse.collapse
%ul.nav.navbar-nav
%li.hidden-sm.hidden-xs
- %a
- %div.hide.turbolink-spinner
- %i.icon-refresh.icon-spin
- %li.hidden-sm.hidden-xs
= render "layouts/search"
%li.visible-sm.visible-xs
= link_to search_path, title: "Search", class: 'has_bottom_tooltip', 'data-original-title' => 'Search area' do
diff --git a/app/views/layouts/_init_auto_complete.html.haml b/app/views/layouts/_init_auto_complete.html.haml
index 6a20dedf62f..9e728b462bb 100644
--- a/app/views/layouts/_init_auto_complete.html.haml
+++ b/app/views/layouts/_init_auto_complete.html.haml
@@ -1,4 +1,3 @@
:javascript
GitLab.GfmAutoComplete.dataSource = "#{autocomplete_sources_project_path(@project)}"
- GitLab.GfmAutoComplete.Emoji.assetBase = "#{Gitlab.config.gitlab.relative_url_root + '/assets/emoji'}"
GitLab.GfmAutoComplete.setup();
diff --git a/app/views/layouts/_public_head_panel.html.haml b/app/views/layouts/_public_head_panel.html.haml
index 99e11cd2b5c..63992a22f32 100644
--- a/app/views/layouts/_public_head_panel.html.haml
+++ b/app/views/layouts/_public_head_panel.html.haml
@@ -8,11 +8,15 @@
%span.separator
%h1.title= title
- .pull-right
+ %button.navbar-toggle{"data-target" => ".navbar-collapse", "data-toggle" => "collapse", type: "button"}
+ %span.sr-only Toggle navigation
+ %i.icon-reorder
+
+ .pull-right.hidden-xs
= link_to "Sign in", new_session_path(:user), class: 'btn btn-sign-in btn-new'
- %ul.nav.navbar-nav
- %li
- %a
- %div.hide.turbolink-spinner
- %i.icon-refresh.icon-spin
+ .navbar-collapse.collapse
+ %ul.nav.navbar-nav
+ %li.visible-xs
+ = link_to "Sign in", new_session_path(:user)
+
diff --git a/app/views/layouts/notify.html.haml b/app/views/layouts/notify.html.haml
index f88abeca887..09d84a3eb9f 100644
--- a/app/views/layouts/notify.html.haml
+++ b/app/views/layouts/notify.html.haml
@@ -3,20 +3,24 @@
%meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
%title
GitLab
+ :css
+ p.details {
+ font-style:italic;
+ color:#777
+ }
+ .footer p {
+ font-size:small;
+ color:#777
+ }
%body
- %h1{style: "background: #EEE; border-bottom: 1px solid #DDD; color: #474D57; font: normal 20px Helvetica, Arial, sans-serif; margin: 0; padding: 5px 10px; line-height: 32px; font-size: 16px;"}
- GitLab
- - if @project
- \|
- = link_to @project.name_with_namespace, project_url(@project), style: 'color: #29B; text-decoration: none'
- %table{align: "left", border: "0", cellpadding: "0", cellspacing: "0", style: "padding: 10px 0;", width: "100%"}
- %tr
- %td{align: "left", style: "margin: 0; padding: 10px;"}
- = yield
- %br
- %tr
- %td{align: "left", style: "margin: 0; padding: 10px;"}
- %p{style: "font-size:small;color:#777"}
- - if @project
- You're receiving this notification because you are a member of the #{@project.name_with_namespace} project team.
+ %div.content
+ = yield
+ %div.footer{style: "margin-top: 10px;"}
+ %p
+ \—
+ %br
+ - if @project
+ You're receiving this notification because you are a member of the #{link_to @project.name_with_namespace, project_url(@project)} project team.
+ - if @target_url
+ #{link_to "View in GitLab", @target_url}
diff --git a/app/views/layouts/public_projects.html.haml b/app/views/layouts/public_projects.html.haml
index cf4ca9c7a84..2a9230244f8 100644
--- a/app/views/layouts/public_projects.html.haml
+++ b/app/views/layouts/public_projects.html.haml
@@ -4,7 +4,7 @@
%body{class: "#{app_theme} application", :'data-page' => body_data_page}
= render "layouts/broadcast"
= render "layouts/public_head_panel", title: project_title(@project)
- %nav.main-nav
+ %nav.main-nav.navbar-collapse.collapse
.container= render 'layouts/nav/project'
.container
.content= yield
diff --git a/app/views/notify/_note_message.html.haml b/app/views/notify/_note_message.html.haml
index 9e329af2d47..5272dfa0ede 100644
--- a/app/views/notify/_note_message.html.haml
+++ b/app/views/notify/_note_message.html.haml
@@ -1,6 +1,2 @@
-%p
- %strong #{@note.author_name}
- wrote:
-
-%cite{style: 'color: #666'}
+%div
= markdown(@note.note)
diff --git a/app/views/notify/closed_issue_email.html.haml b/app/views/notify/closed_issue_email.html.haml
index 325cd44eb4b..56c18cd83cd 100644
--- a/app/views/notify/closed_issue_email.html.haml
+++ b/app/views/notify/closed_issue_email.html.haml
@@ -1,5 +1,2 @@
%p
= "Issue was closed by #{@updated_by.name}"
-%p
- = "Issue ##{@issue.iid}"
- = link_to_gfm truncate(@issue.title, length: 45), project_issue_url(@issue.project, @issue), title: @issue.title
diff --git a/app/views/notify/closed_merge_request_email.html.haml b/app/views/notify/closed_merge_request_email.html.haml
index 45770cc85de..809d46f31be 100644
--- a/app/views/notify/closed_merge_request_email.html.haml
+++ b/app/views/notify/closed_merge_request_email.html.haml
@@ -1,9 +1,2 @@
%p
- = "Merge Request #{@merge_request.iid} was closed by #{@updated_by.name}"
-%p
- = link_to_gfm truncate(@merge_request.title, length: 40), project_merge_request_url(@merge_request.target_project, @merge_request)
-%p
- != merge_path_description(@merge_request, '→')
-%p
- Assignee: #{@merge_request.author_name} → #{@merge_request.assignee_name}
-
+ = "Merge Request !#{@merge_request.iid} was closed by #{@updated_by.name}"
diff --git a/app/views/notify/group_access_granted_email.html.haml b/app/views/notify/group_access_granted_email.html.haml
index 5023ec737a5..823ebf77347 100644
--- a/app/views/notify/group_access_granted_email.html.haml
+++ b/app/views/notify/group_access_granted_email.html.haml
@@ -1,5 +1,4 @@
%p
= "You have been granted #{@membership.human_access} access to group"
-%p
= link_to group_url(@group) do
= @group.name
diff --git a/app/views/notify/issue_status_changed_email.html.haml b/app/views/notify/issue_status_changed_email.html.haml
index 7706b3f7516..482c884a9db 100644
--- a/app/views/notify/issue_status_changed_email.html.haml
+++ b/app/views/notify/issue_status_changed_email.html.haml
@@ -1,5 +1,2 @@
%p
= "Issue was #{@issue_status} by #{@updated_by.name}"
-%p
- = "Issue ##{@issue.iid}"
- = link_to_gfm truncate(@issue.title, length: 45), project_issue_url(@issue.project, @issue), title: @issue.title
diff --git a/app/views/notify/merged_merge_request_email.html.haml b/app/views/notify/merged_merge_request_email.html.haml
index e2bc9cf5c04..0c62d439aed 100644
--- a/app/views/notify/merged_merge_request_email.html.haml
+++ b/app/views/notify/merged_merge_request_email.html.haml
@@ -1,9 +1,2 @@
%p
- = "Merge Request #{@merge_request.iid} was merged"
-%p
- = link_to_gfm truncate(@merge_request.title, length: 40), project_merge_request_url(@merge_request.target_project, @merge_request)
-%p
- != merge_path_description(@merge_request, '→')
-%p
- Assignee: #{@merge_request.author_name} → #{@merge_request.assignee_name}
-
+ = "Merge Request !#{@merge_request.iid} was merged"
diff --git a/app/views/notify/new_issue_email.html.haml b/app/views/notify/new_issue_email.html.haml
index 3b3c148517a..f2f8eee18c4 100644
--- a/app/views/notify/new_issue_email.html.haml
+++ b/app/views/notify/new_issue_email.html.haml
@@ -1,9 +1,6 @@
-%p
- New Issue was created.
-%p
- = "Issue ##{@issue.iid}"
- = link_to_gfm truncate(@issue.title, length: 45), project_issue_url(@issue.project, @issue), title: @issue.title
-%p
- Author: #{@issue.author_name}
-%p
- Assignee: #{@issue.assignee_name}
+-if @issue.description
+ = markdown(@issue.description)
+
+- if @issue.assignee_id.present?
+ %p
+ Assignee: #{@issue.assignee_name}
diff --git a/app/views/notify/new_merge_request_email.html.haml b/app/views/notify/new_merge_request_email.html.haml
index 321f9418ded..f02d5111b22 100644
--- a/app/views/notify/new_merge_request_email.html.haml
+++ b/app/views/notify/new_merge_request_email.html.haml
@@ -1,9 +1,9 @@
-%p
- = "New Merge Request ##{@merge_request.iid}"
-%p
- = link_to_gfm truncate(@merge_request.title, length: 40), project_merge_request_url(@merge_request.target_project, @merge_request)
-%p
+%p.details
!= merge_path_description(@merge_request, '→')
-%p
- Assignee: #{@merge_request.author_name} → #{@merge_request.assignee_name}
+- if @merge_request.assignee_id.present?
+ %p
+ Assignee: #{@merge_request.author_name} → #{@merge_request.assignee_name}
+
+-if @merge_request.description
+ = markdown(@merge_request.description)
diff --git a/app/views/notify/note_commit_email.html.haml b/app/views/notify/note_commit_email.html.haml
index 620b258fc15..1d961e4424c 100644
--- a/app/views/notify/note_commit_email.html.haml
+++ b/app/views/notify/note_commit_email.html.haml
@@ -1,5 +1,2 @@
-%p
- = "New comment for Commit #{@commit.short_id}"
- = link_to_gfm truncate(@commit.title, length: 16), project_commit_url(@note.project, id: @commit.id, anchor: "note_#{@note.id}")
= render 'note_message'
diff --git a/app/views/notify/note_issue_email.html.haml b/app/views/notify/note_issue_email.html.haml
index b3230953e7d..2fa2f784661 100644
--- a/app/views/notify/note_issue_email.html.haml
+++ b/app/views/notify/note_issue_email.html.haml
@@ -1,4 +1 @@
-%p
- = "New comment for Issue ##{@issue.iid}"
- = link_to_gfm truncate(@issue.title, length: 35), project_issue_url(@issue.project, @issue, anchor: "note_#{@note.id}")
= render 'note_message'
diff --git a/app/views/notify/note_merge_request_email.html.haml b/app/views/notify/note_merge_request_email.html.haml
index d587b068486..65f0e4c4068 100644
--- a/app/views/notify/note_merge_request_email.html.haml
+++ b/app/views/notify/note_merge_request_email.html.haml
@@ -1,8 +1,7 @@
-%p
- - if @note.for_diff_line?
- = link_to "New comment on diff", diffs_project_merge_request_url(@merge_request.target_project, @merge_request, anchor: "note_#{@note.id}")
- - else
- = link_to "New comment", project_merge_request_url(@merge_request.target_project, @merge_request, anchor: "note_#{@note.id}")
- for Merge Request ##{@merge_request.iid}
- %cite "#{truncate(@merge_request.title, length: 20)}"
+- if @note.diff_file_name
+ %p.details
+ New comment on diff for
+ = link_to @note.diff_file_name, @target_url
+ \:
+
= render 'note_message'
diff --git a/app/views/notify/note_wall_email.html.haml b/app/views/notify/note_wall_email.html.haml
index 92200e83efa..2fa2f784661 100644
--- a/app/views/notify/note_wall_email.html.haml
+++ b/app/views/notify/note_wall_email.html.haml
@@ -1,5 +1 @@
-%p
- New message on
- = link_to "Project Wall", project_wall_url(@note.project, anchor: "note_#{@note.id}")
-
= render 'note_message'
diff --git a/app/views/notify/reassigned_issue_email.html.haml b/app/views/notify/reassigned_issue_email.html.haml
index b0edff44ce6..07227a3e68c 100644
--- a/app/views/notify/reassigned_issue_email.html.haml
+++ b/app/views/notify/reassigned_issue_email.html.haml
@@ -1,7 +1,4 @@
%p
- = "Reassigned Issue ##{@issue.iid}"
- = link_to_gfm truncate(@issue.title, length: 30), project_issue_url(@issue.project, @issue)
-%p
Assignee changed
- if @previous_assignee
from
diff --git a/app/views/notify/reassigned_merge_request_email.html.haml b/app/views/notify/reassigned_merge_request_email.html.haml
index d2d82d36c48..00aee6bc952 100644
--- a/app/views/notify/reassigned_merge_request_email.html.haml
+++ b/app/views/notify/reassigned_merge_request_email.html.haml
@@ -1,7 +1,4 @@
%p
- = "Reassigned Merge Request ##{@merge_request.iid}"
- = link_to_gfm truncate(@merge_request.title, length: 30), project_merge_request_url(@merge_request.target_project, @merge_request)
-%p
Assignee changed
- if @previous_assignee
from
diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml
index df44c30c005..f2b0699f136 100644
--- a/app/views/projects/commit/_commit_box.html.haml
+++ b/app/views/projects/commit/_commit_box.html.haml
@@ -1,7 +1,7 @@
.pull-right
%div
- if @notes_count > 0
- %span.btn.disabled.grouped
+ %span.btn.disabled.btn-grouped
%i.icon-comment
= @notes_count
.pull-left.btn-group
@@ -47,7 +47,7 @@
- if @branches.any?
and in
= link_to("#{pluralize(@branches.count, "other branch")}", "#", class: "js-details-expand")
- %span.js-details-contain.hide
+ %span.js-details-content.hide
= commit_branches_links(@project, @branches)
.commit-box
diff --git a/app/views/projects/commits/_diffs.html.haml b/app/views/projects/commits/_diffs.html.haml
index dd287fcc153..466085139f9 100644
--- a/app/views/projects/commits/_diffs.html.haml
+++ b/app/views/projects/commits/_diffs.html.haml
@@ -44,7 +44,7 @@
- file = project.repository.blob_at(@commit.id, diff.new_path)
- file = project.repository.blob_at(@commit.parent_id, diff.old_path) unless file
- next unless file
- .diff-file{id: "diff-#{i}"}
+ .diff-file.js-toggle-container{id: "diff-#{i}"}
.diff-header{id: "file-path-#{hexdigest(diff.new_path || diff.old_path)}"}
- if diff.deleted_file
%span= diff.old_path
@@ -60,6 +60,11 @@
%span.file-mode= "#{diff.a_mode} → #{diff.b_mode}"
.diff-btn-group
+ = link_to "#", class: "js-toggle-button btn btn-small" do
+ %i.icon-chevron-down
+ Diff comments
+  
+
- if @merge_request && @merge_request.source_project
= link_to project_edit_tree_path(@merge_request.source_project, tree_join(@merge_request.source_branch, diff.new_path), from_merge_request_id: @merge_request.id), { class: 'btn btn-small' } do
Edit
diff --git a/app/views/projects/create.js.haml b/app/views/projects/create.js.haml
index a444b8b59a6..89710d3a09a 100644
--- a/app/views/projects/create.js.haml
+++ b/app/views/projects/create.js.haml
@@ -1,6 +1,10 @@
- if @project.saved?
- :plain
- location.href = "#{project_path(@project)}";
+ - if @project.import?
+ :plain
+ location.href = "#{import_project_path(@project)}";
+ - else
+ :plain
+ location.href = "#{project_path(@project)}";
- else
:plain
$(".project-edit-errors").html("#{escape_javascript(render('errors'))}");
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index 005d994806e..10674ccae46 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -93,100 +93,101 @@
- .centered-light-block
- %h3
- %i.icon-warning-sign
- Dangerous settings
-
- %p Project settings below may result in data loss!
- = link_to '#', class: 'btn js-toggle-visibility-link' do
- Show it to me
- %i.icon-chevron-down
-
- .js-toggle-visibility-container.hide
- - if can? current_user, :archive_project, @project
- .ui-box.ui-box-danger
- .title
- - if @project.archived?
- Unarchive project
- - else
- Archive project
- .body
- - if @project.archived?
- %p
- Unarchiving the project will mark its repository as active.
- %br
- The project can be committed to.
- %br
- %strong Once active this project shows up in the search and on the dashboard.
- = link_to 'Unarchive', unarchive_project_path(@project),
- data: { confirm: "Are you sure that you want to unarchive this project?\nWhen this project is unarchived it is active and can be comitted to again." },
- method: :post, class: "btn btn-remove"
- - else
- %p
- Archiving the project will mark its repository as read-only.
- %br
- It is hidden from the dashboard and doesn't show up in searches.
- %br
- %strong Archived projects cannot be committed to!
- = link_to 'Archive', archive_project_path(@project),
- data: { confirm: "Are you sure that you want to archive this project?\nAn archived project cannot be committed to." },
- method: :post, class: "btn btn-remove"
- - else
- .nothing-here-block Only the project owner can archive a project
-
- - if can?(current_user, :change_namespace, @project)
+ .danger-settings.js-toggle-container
+ .centered-light-block
+ %h3
+ %i.icon-warning-sign
+ Dangerous settings
+
+ %p Project settings below may result in data loss!
+ = link_to '#', class: 'btn js-toggle-button' do
+ Show it to me
+ %i.icon-chevron-down
+
+ .js-toggle-content.hide
+ - if can? current_user, :archive_project, @project
+ .ui-box.ui-box-danger
+ .title
+ - if @project.archived?
+ Unarchive project
+ - else
+ Archive project
+ .body
+ - if @project.archived?
+ %p
+ Unarchiving the project will mark its repository as active.
+ %br
+ The project can be committed to.
+ %br
+ %strong Once active this project shows up in the search and on the dashboard.
+ = link_to 'Unarchive', unarchive_project_path(@project),
+ data: { confirm: "Are you sure that you want to unarchive this project?\nWhen this project is unarchived it is active and can be comitted to again." },
+ method: :post, class: "btn btn-remove"
+ - else
+ %p
+ Archiving the project will mark its repository as read-only.
+ %br
+ It is hidden from the dashboard and doesn't show up in searches.
+ %br
+ %strong Archived projects cannot be committed to!
+ = link_to 'Archive', archive_project_path(@project),
+ data: { confirm: "Are you sure that you want to archive this project?\nAn archived project cannot be committed to." },
+ method: :post, class: "btn btn-remove"
+ - else
+ .nothing-here-block Only the project owner can archive a project
+
+ - if can?(current_user, :change_namespace, @project)
+ .ui-box.ui-box-danger
+ .title Transfer project
+ .errors-holder
+ .form-holder
+ = form_for(@project, url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'transfer-project form-horizontal' }) do |f|
+ .form-group
+ = f.label :namespace_id, class: 'control-label' do
+ %span Namespace
+ .col-sm-10
+ .form-group
+ = f.select :namespace_id, namespaces_options(@project.namespace_id), { prompt: 'Choose a project namespace' }, { class: 'select2' }
+ %ul
+ %li Be careful. Changing the project's namespace can have unintended side effects.
+ %li You can only transfer the project to namespaces you manage.
+ %li You will need to update your local repositories to point to the new location.
+ .form-actions
+ = f.submit 'Transfer', class: "btn btn-remove"
+ - else
+ .nothing-here-block Only the project owner can transfer a project
+
.ui-box.ui-box-danger
- .title Transfer project
+ .title Rename repository
.errors-holder
.form-holder
- = form_for(@project, url: transfer_project_path(@project), method: :put, remote: true, html: { class: 'transfer-project form-horizontal' }) do |f|
+ = form_for(@project, html: { class: 'form-horizontal' }) do |f|
.form-group
- = f.label :namespace_id, class: 'control-label' do
- %span Namespace
- .col-sm-10
+ = f.label :path, class: 'control-label' do
+ %span Path
+ .col-sm-9
.form-group
- = f.select :namespace_id, namespaces_options(@project.namespace_id), { prompt: 'Choose a project namespace' }, { class: 'select2' }
+ .input-group
+ = f.text_field :path, class: 'form-control'
+ %span.input-group-addon .git
%ul
- %li Be careful. Changing the project's namespace can have unintended side effects.
- %li You can only transfer the project to namespaces you manage.
+ %li Be careful. Renaming a project's repository can have unintended side effects.
%li You will need to update your local repositories to point to the new location.
.form-actions
- = f.submit 'Transfer', class: "btn btn-remove"
- - else
- .nothing-here-block Only the project owner can transfer a project
-
- .ui-box.ui-box-danger
- .title Rename repository
- .errors-holder
- .form-holder
- = form_for(@project, html: { class: 'form-horizontal' }) do |f|
- .form-group
- = f.label :path, class: 'control-label' do
- %span Path
- .col-sm-9
- .form-group
- .input-group
- = f.text_field :path, class: 'form-control'
- %span.input-group-addon .git
- %ul
- %li Be careful. Renaming a project's repository can have unintended side effects.
- %li You will need to update your local repositories to point to the new location.
- .form-actions
- = f.submit 'Rename', class: "btn btn-remove"
-
- - if can?(current_user, :remove_project, @project)
- .ui-box.ui-box-danger
- .title Remove project
- .body
- %p
- Removing the project will delete its repository and all related resources including issues, merge requests etc.
- %br
- %strong Removed projects cannot be restored!
-
- = link_to 'Remove project', @project, data: { confirm: remove_project_message(@project) }, method: :delete, class: "btn btn-remove"
- - else
- .nothing-here-block Only project owner can remove a project
+ = f.submit 'Rename', class: "btn btn-remove"
+
+ - if can?(current_user, :remove_project, @project)
+ .ui-box.ui-box-danger
+ .title Remove project
+ .body
+ %p
+ Removing the project will delete its repository and all related resources including issues, merge requests etc.
+ %br
+ %strong Removed projects cannot be restored!
+
+ = link_to 'Remove project', @project, data: { confirm: remove_project_message(@project) }, method: :delete, class: "btn btn-remove"
+ - else
+ .nothing-here-block Only project owner can remove a project
.save-project-loader.hide
%center
diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml
index 489b9b0e951..97dc73bce14 100644
--- a/app/views/projects/empty.html.haml
+++ b/app/views/projects/empty.html.haml
@@ -1,46 +1,34 @@
= render "home_panel"
-- if @project.import? && !@project.imported
- .save-project-loader
- %center
- %h2
- %i.icon-spinner.icon-spin
- Importing repository.
- %p.monospace git clone --bare #{@project.import_url}
- %p Please wait while we import the repository for you. Refresh at will.
- :javascript
- new ProjectImport();
+%div.git-empty
+ %fieldset
+ %legend Git global setup:
+ %pre.dark
+ :preserve
+ git config --global user.name "#{git_user_name}"
+ git config --global user.email "#{git_user_email}"
-- else
- %div.git-empty
- %fieldset
- %legend Git global setup:
- %pre.dark
- :preserve
- git config --global user.name "#{git_user_name}"
- git config --global user.email "#{git_user_email}"
+ %fieldset
+ %legend Create Repository
+ %pre.dark
+ :preserve
+ mkdir #{@project.path}
+ cd #{@project.path}
+ git init
+ touch README
+ git add README
+ git commit -m 'first commit'
+ git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
+ git push -u origin master
- %fieldset
- %legend Create Repository
- %pre.dark
- :preserve
- mkdir #{@project.path}
- cd #{@project.path}
- git init
- touch README
- git add README
- git commit -m 'first commit'
- git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
- git push -u origin master
+ %fieldset
+ %legend Existing Git Repo?
+ %pre.dark
+ :preserve
+ cd existing_git_repo
+ git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
+ git push -u origin master
- %fieldset
- %legend Existing Git Repo?
- %pre.dark
- :preserve
- cd existing_git_repo
- git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
- git push -u origin master
-
- - if can? current_user, :remove_project, @project
- .prepend-top-20
- = link_to 'Remove project', @project, data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-remove pull-right"
+- if can? current_user, :remove_project, @project
+ .prepend-top-20
+ = link_to 'Remove project', @project, data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-remove pull-right"
diff --git a/app/views/projects/hooks/index.html.haml b/app/views/projects/hooks/index.html.haml
index 00e5ae27779..866fd6f6066 100644
--- a/app/views/projects/hooks/index.html.haml
+++ b/app/views/projects/hooks/index.html.haml
@@ -27,6 +27,13 @@
%p.light
This url will be triggered by a push to the repository
%div
+ = f.check_box :tag_push_events, class: 'pull-left'
+ .prepend-left-20
+ = f.label :tag_push_events, class: 'list-label' do
+ %strong Tag push events
+ %p.light
+ This url will be triggered when a new tag is pushed to the repository
+ %div
= f.check_box :issues_events, class: 'pull-left'
.prepend-left-20
= f.label :issues_events, class: 'list-label' do
@@ -56,6 +63,6 @@
.clearfix
%span.monospace= hook.url
%p
- - %w(push_events issues_events merge_requests_events).each do |trigger|
+ - %w(push_events tag_push_events issues_events merge_requests_events).each do |trigger|
- if hook.send(trigger)
%span.label.label-gray= trigger.titleize
diff --git a/app/views/projects/import.html.haml b/app/views/projects/import.html.haml
new file mode 100644
index 00000000000..d11372be61b
--- /dev/null
+++ b/app/views/projects/import.html.haml
@@ -0,0 +1,30 @@
+- if @project.import_in_progress?
+ .save-project-loader
+ %center
+ %h2
+ %i.icon-spinner.icon-spin
+ Import in progress.
+ %p.monospace git clone --bare #{@project.import_url}
+ %p Please wait while we import the repository for you. Refresh at will.
+ :javascript
+ new ProjectImport();
+
+- elsif @project.import_failed?
+ .save-project-loader
+ %center
+ %h2
+ Import failed. Retry?
+ %hr
+ - if can?(current_user, :admin_project, @project)
+ = form_for @project, url: retry_import_project_path(@project), method: :put, html: { class: 'form-horizontal' } do |f|
+ .form-group.import-url-data
+ = f.label :import_url, class: 'control-label' do
+ %span Import existing repo
+ .col-sm-10
+ = f.text_field :import_url, class: 'form-control', placeholder: 'https://github.com/randx/six.git'
+ .bs-callout.bs-callout-info
+ This url must be publicly accessible or you can add a username and password like this: https://username:password@gitlab.com/company/project.git.
+ %br
+ The import will time out after 2 minutes. For big repositories, use a clone/push combination.
+ .form-actions
+ = f.submit 'Retry import', class: "btn btn-create", tabindex: 4
diff --git a/app/views/projects/merge_requests/_form.html.haml b/app/views/projects/merge_requests/_form.html.haml
index 51fa29ddcbe..22502760e50 100644
--- a/app/views/projects/merge_requests/_form.html.haml
+++ b/app/views/projects/merge_requests/_form.html.haml
@@ -1,13 +1,18 @@
-- if @repository.contribution_guide && !@merge_request.persisted?
- - contribution_guide_url = project_blob_path(@project, tree_join(@repository.root_ref, @repository.contribution_guide.name))
- .alert.alert-info.col-sm-10.col-sm-offset-2
- ="Please review the <strong>#{link_to "guidelines for contribution", contribution_guide_url}</strong> to this repository.".html_safe
= form_for [@project, @merge_request], html: { class: "merge-request-form form-horizontal" } do |f|
- -if @merge_request.errors.any?
- .alert.alert-danger
- %ul
- - @merge_request.errors.full_messages.each do |msg|
- %li= msg
+ .row
+ .col-sm-2
+ .col-sm-10
+ - if @repository.contribution_guide && !@merge_request.persisted?
+ - contribution_guide_url = project_blob_path(@project, tree_join(@repository.root_ref, @repository.contribution_guide.name))
+ .alert.alert-info
+ Please review the
+ %strong #{link_to "guidelines for contribution", contribution_guide_url}
+ to this repository.
+
+ -if @merge_request.errors.any?
+ .alert.alert-danger
+ - @merge_request.errors.full_messages.each do |msg|
+ %div= msg
.merge-request-branches
.form-group
@@ -47,24 +52,6 @@
= f.text_area :description, class: "form-control js-gfm-input", rows: 14
%p.hint Description is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
- %hr
- .form-group
- .merge-request-assignee
- = f.label :assignee_id, class: 'control-label' do
- %i.icon-user
- Assign to
- .col-sm-10
- = project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select a user', class: 'custom-form-control', selected: @merge_request.assignee_id)
- &nbsp;
- = link_to 'Assign to me', '#', class: 'btn btn-small assign-to-me-link'
- .form-group
- .merge-request-milestone
- = f.label :milestone_id, class: 'control-label' do
- %i.icon-time
- Milestone
- .col-sm-10= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'select2'})
-
-
.form-actions
- if @merge_request.new_record?
= f.submit 'Submit merge request', class: "btn btn-create"
@@ -96,7 +83,3 @@
target_branch.on("change", function() {
$.get("#{branch_to_project_merge_requests_path(@source_project)}", {target_project_id: target_project.val(),ref: $(this).val() });
});
- $('.assign-to-me-link').on('click', function(e){
- $('#merge_request_assignee_id').val("#{current_user.id}").trigger("change");
- e.preventDefault();
- });
diff --git a/app/views/projects/merge_requests/branch_from.js.haml b/app/views/projects/merge_requests/branch_from.js.haml
index d3147188d1c..1b1082baafe 100644
--- a/app/views/projects/merge_requests/branch_from.js.haml
+++ b/app/views/projects/merge_requests/branch_from.js.haml
@@ -3,5 +3,5 @@
var mrTitle = $('#merge_request_title');
if(mrTitle.val().length == 0) {
- mrTitle.val("#{params[:ref].titleize}");
+ mrTitle.val("#{params[:ref].humanize}");
}
diff --git a/app/views/projects/merge_requests/show/_mr_accept.html.haml b/app/views/projects/merge_requests/show/_mr_accept.html.haml
index a9cbe43fb16..4b1857ccb68 100644
--- a/app/views/projects/merge_requests/show/_mr_accept.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_accept.html.haml
@@ -1,6 +1,10 @@
- unless @allowed_to_merge
- .bs-callout
- %strong You don't have permission to merge this MR
+ - if @project.archived?
+ .bs-callout.bs-callout-warning
+ %strong Archived projects cannot be committed to!
+ - else
+ .bs-callout
+ %strong You don't have permission to merge this MR
- if @show_merge_controls
@@ -15,18 +19,19 @@
= link_to "click here", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
for instructions.
- %br
- If you want to modify merge commit message -
- %strong
- = link_to "click here", "#", class: "modify-merge-commit-link js-toggle-visibility-link", title: "Modify merge commit message"
- .js-toggle-visibility-container.hide
- .form-group
- = label_tag :merge_commit_message, "Commit message", class: 'control-label'
- .col-sm-10
- = text_area_tag :merge_commit_message, @merge_request.merge_commit_message, class: "form-control js-gfm-input", rows: 14, required: true
- %p.hint
- The recommended maximum line length is 52 characters for the first line and 72 characters for all following lines.
+ .js-toggle-container
+ %p
+ If you want to modify merge commit message -
+ %strong
+ = link_to "click here", "#", class: "modify-merge-commit-link js-toggle-button", title: "Modify merge commit message"
+ .js-toggle-content.hide
+ .form-group
+ = label_tag :merge_commit_message, "Commit message", class: 'control-label'
+ .col-sm-10
+ = text_area_tag :merge_commit_message, @merge_request.merge_commit_message, class: "form-control js-gfm-input", rows: 14, required: true
+ %p.hint
+ The recommended maximum line length is 52 characters for the first line and 72 characters for all following lines.
.accept-group
.pull-left
diff --git a/app/views/projects/merge_requests/show/_mr_box.html.haml b/app/views/projects/merge_requests/show/_mr_box.html.haml
index 38db4363ade..abdcd127a0c 100644
--- a/app/views/projects/merge_requests/show/_mr_box.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_box.html.haml
@@ -29,13 +29,13 @@
%span
%i.icon-remove
Closed by #{link_to_member(@project, @merge_request.closed_event.author)}
- #{time_ago_with_tooltip(@merge_request.closed_event.created_at)}.
+ #{time_ago_with_tooltip(@merge_request.closed_event.created_at)}
- if @merge_request.merged?
.alert.alert-info
%span
%i.icon-ok
Merged by #{link_to_member(@project, @merge_request.merge_event.author)}
- #{time_ago_with_tooltip(@merge_request.merge_event.created_at)}.
+ #{time_ago_with_tooltip(@merge_request.merge_event.created_at)}
- if !@closes_issues.empty? && @merge_request.open?
.alert.alert-info.alert-info
%span
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index 9ee54fef062..5d5637c1588 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -9,18 +9,6 @@
%strong Project name
.col-sm-10
= f.text_field :name, placeholder: "Example Project", class: "form-control", tabindex: 1, autofocus: true
- .help-inline
- = link_to "#", class: 'js-toggle-visibility-link' do
- %span Customize repository name?
-
- .form-group.js-toggle-visibility-container.hide
- = f.label :path, class: 'control-label' do
- %span Repository name
- .col-sm-10
- .input-group
- = f.text_field :path, class: 'form-control'
- %span.input-group-addon .git
-
- if current_user.can_select_namespace?
.form-group
@@ -29,19 +17,42 @@
.col-sm-10
= f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'select2', tabindex: 2}
- .form-group
- .col-sm-2
- .col-sm-10
- = link_to "#", class: 'appear-link' do
- %i.icon-upload-alt
- %span Import existing repository?
- .form-group.appear-data.import-url-data
- = f.label :import_url, class: 'control-label' do
- %span Import existing repo
- .col-sm-10
- = f.text_field :import_url, class: 'form-control', placeholder: 'https://github.com/randx/six.git'
- .light
- URL must be cloneable
+ %hr
+ .js-toggle-container
+ .form-group
+ .col-sm-2
+ .col-sm-10
+ = link_to "#", class: 'js-toggle-button' do
+ %i.icon-edit
+ %span Customize repository name?
+ .js-toggle-content.hide
+ .form-group
+ = f.label :path, class: 'control-label' do
+ %span Repository name
+ .col-sm-10
+ .input-group
+ = f.text_field :path, class: 'form-control'
+ %span.input-group-addon .git
+
+ .js-toggle-container
+ .form-group
+ .col-sm-2
+ .col-sm-10
+ = link_to "#", class: 'js-toggle-button' do
+ %i.icon-upload-alt
+ %span Import existing repository?
+ .js-toggle-content.hide
+ .form-group.import-url-data
+ = f.label :import_url, class: 'control-label' do
+ %span Import existing repo
+ .col-sm-10
+ = f.text_field :import_url, class: 'form-control', placeholder: 'https://github.com/randx/six.git'
+ .bs-callout.bs-callout-info
+ This url must be publicly accessible or you can add a username and password like this: https://username:password@gitlab.com/company/project.git.
+ %br
+ The import will time out after 2 minutes. For big repositories, use a clone/push combination.
+ %hr
+
.form-group
= f.label :description, class: 'control-label' do
Description
diff --git a/app/views/projects/notes/_diff_notes_with_reply.html.haml b/app/views/projects/notes/_diff_notes_with_reply.html.haml
index 9537ab18caa..9acadc6a14e 100644
--- a/app/views/projects/notes/_diff_notes_with_reply.html.haml
+++ b/app/views/projects/notes/_diff_notes_with_reply.html.haml
@@ -1,7 +1,7 @@
- note = notes.first # example note
-# Check if line want not changed since comment was left
- if !defined?(line) || line == note.diff_line
- %tr.notes_holder
+ %tr.notes_holder.js-toggle-content
%td.notes_line{ colspan: 2 }
%span.btn.disabled
%i.icon-comment
diff --git a/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml b/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml
index 936dbb354cd..2012aa021b9 100644
--- a/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml
+++ b/app/views/projects/notes/_diff_notes_with_reply_parallel.html.haml
@@ -1,6 +1,6 @@
- note1 = notes1.first # example note
- note2 = notes2.first # example note
-%tr.notes_holder
+%tr.notes_holder.js-toggle-content
-# Check if line want not changed since comment was left
/- if !defined?(line1) || line1 == note1.diff_line
- if note1
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index 217e36e38d0..81bf0611ec6 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -23,7 +23,7 @@
%i.icon-thumbs-up
\+1
- if note.downvote?
- %span.vote.downvote.label.label-error
+ %span.vote.downvote.label.label-danger
%i.icon-thumbs-down
\-1
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml
index 8a1e1d3354b..20879d69091 100644
--- a/app/views/projects/show.html.haml
+++ b/app/views/projects/show.html.haml
@@ -9,8 +9,8 @@
.col-md-3.project-side.hidden-sm
.clearfix
- if @project.archived?
- .alert
- %h5
+ .alert.alert-warning
+ %h4
%i.icon-warning-sign
Archived project!
%p Repository is read-only