summaryrefslogtreecommitdiff
path: root/app/views/projects
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/blob/_text.html.haml25
-rw-r--r--app/views/projects/deploy_keys/_deploy_key.html.haml45
-rw-r--r--app/views/projects/deploy_keys/_form.html.haml31
-rw-r--r--app/views/projects/deploy_keys/index.html.haml69
-rw-r--r--app/views/projects/diffs/_diffs.html.haml6
-rw-r--r--app/views/projects/diffs/_file.html.haml26
-rw-r--r--app/views/projects/group_links/index.html.haml79
-rw-r--r--app/views/projects/hooks/_project_hook.html.haml15
-rw-r--r--app/views/projects/hooks/index.html.haml166
-rw-r--r--app/views/projects/imports/new.html.haml2
-rw-r--r--app/views/projects/issues/_new_branch.html.haml16
-rw-r--r--app/views/projects/merge_requests/_new_submit.html.haml2
-rw-r--r--app/views/projects/milestones/show.html.haml17
-rw-r--r--app/views/projects/protected_branches/_branches_list.html.haml56
-rw-r--r--app/views/projects/protected_branches/index.html.haml58
-rw-r--r--app/views/projects/triggers/_trigger.html.haml8
-rw-r--r--app/views/projects/triggers/index.html.haml119
17 files changed, 384 insertions, 356 deletions
diff --git a/app/views/projects/blob/_text.html.haml b/app/views/projects/blob/_text.html.haml
index d09cd73558c..b1769759dce 100644
--- a/app/views/projects/blob/_text.html.haml
+++ b/app/views/projects/blob/_text.html.haml
@@ -1,10 +1,19 @@
-- blob.load_all_data!(@repository)
-- if markup?(blob.name)
- .file-content.wiki
- = render_markup(blob.name, blob.data)
+- if blob.only_display_raw?
+ .file-content.code
+ .nothing-here-block
+ File too large, you can
+ = succeed '.' do
+ = link_to 'view the raw file', namespace_project_raw_path(@project.namespace, @project, @id), target: '_blank'
+
- else
- - unless blob.empty?
- = render 'shared/file_highlight', blob: blob
+ - blob.load_all_data!(@repository)
+
+ - if markup?(blob.name)
+ .file-content.wiki
+ = render_markup(blob.name, blob.data)
- else
- .file-content.code
- .nothing-here-block Empty file
+ - if blob.empty?
+ .file-content.code
+ .nothing-here-block Empty file
+ - else
+ = render 'shared/file_highlight', blob: blob
diff --git a/app/views/projects/deploy_keys/_deploy_key.html.haml b/app/views/projects/deploy_keys/_deploy_key.html.haml
index 8d66bae8cdf..450aaeb367c 100644
--- a/app/views/projects/deploy_keys/_deploy_key.html.haml
+++ b/app/views/projects/deploy_keys/_deploy_key.html.haml
@@ -1,32 +1,27 @@
%li
- .pull-right
+ .pull-left.append-right-10.hidden-xs
+ = icon "key", class: "key-icon"
+ .deploy-key-content.key-list-item-info
+ %strong.title
+ = deploy_key.title
+ .description
+ = deploy_key.fingerprint
+ .deploy-key-content.prepend-left-default.deploy-key-projects
+ - deploy_key.projects.each do |project|
+ - if can?(current_user, :read_project, project)
+ = link_to namespace_project_path(project.namespace, project), class: "label deploy-project-label" do
+ = project.name_with_namespace
+ .deploy-key-content
+ %span.key-created-at
+ created #{time_ago_with_tooltip(deploy_key.created_at)}
+ .visible-xs-block.visible-sm-block
- if @available_keys.include?(deploy_key)
- = link_to enable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), class: 'btn btn-sm', method: :put do
- = icon('plus')
+ = link_to enable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), class: "btn btn-sm prepend-left-10", method: :put do
Enable
- else
- if deploy_key.destroyed_when_orphaned? && deploy_key.almost_orphaned?
- = link_to 'Remove', disable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), data: { confirm: 'You are going to remove deploy key. Are you sure?'}, method: :put, class: "btn btn-remove delete-key btn-sm pull-right"
+ = link_to disable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), data: { confirm: "You are going to remove deploy key. Are you sure?" }, method: :put, class: "btn btn-warning btn-sm prepend-left-10" do
+ Remove
- else
- = link_to disable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), class: 'btn btn-sm', method: :put do
- = icon('power-off')
+ = link_to disable_namespace_project_deploy_key_path(@project.namespace, @project, deploy_key), class: "btn btn-warning btn-sm prepend-left-10", method: :put do
Disable
-
- = icon('key')
- %strong= deploy_key.title
- %br
- %code.key-fingerprint= deploy_key.fingerprint
-
- %p.light.prepend-top-10
- - if deploy_key.public?
- %span.label.label-info.deploy-project-label
- Public deploy key
-
- - deploy_key.projects.each do |project|
- - if can?(current_user, :read_project, project)
- %span.label.label-gray.deploy-project-label
- = link_to namespace_project_path(project.namespace, project) do
- = project.name_with_namespace
-
- %small.pull-right
- Created #{time_ago_with_tooltip(deploy_key.created_at)}
diff --git a/app/views/projects/deploy_keys/_form.html.haml b/app/views/projects/deploy_keys/_form.html.haml
index f6565f85836..894c36a96df 100644
--- a/app/views/projects/deploy_keys/_form.html.haml
+++ b/app/views/projects/deploy_keys/_form.html.haml
@@ -1,18 +1,13 @@
-%div
- = form_for [@project.namespace.becomes(Namespace), @project, @key], url: namespace_project_deploy_keys_path, html: { class: 'deploy-key-form form-horizontal js-requires-input' } do |f|
- = form_errors(@key)
-
- .form-group
- = f.label :title, class: "control-label"
- .col-sm-10= f.text_field :title, class: 'form-control', autofocus: true, required: true
- .form-group
- = f.label :key, class: "control-label"
- .col-sm-10
- %p.light
- Paste a machine public key here. Read more about how to generate it
- = link_to "here", help_page_path("ssh", "README")
- = f.text_area :key, class: "form-control thin_area", rows: 5, required: true
-
- .form-actions
- = f.submit 'Create Deploy Key', class: "btn-create btn"
- = link_to "Cancel", namespace_project_deploy_keys_path(@project.namespace, @project), class: "btn btn-cancel"
+= form_for [@project.namespace.becomes(Namespace), @project, @key], url: namespace_project_deploy_keys_path, html: { class: "js-requires-input" } do |f|
+ = form_errors(@key)
+ .form-group
+ = f.label :title, class: "label-light"
+ = f.text_field :title, class: 'form-control', autofocus: true, required: true
+ .form-group
+ = f.label :key, class: "label-light"
+ = f.text_area :key, class: "form-control", rows: 5, required: true
+ .form-group
+ %p.light.append-bottom-0
+ Paste a machine public key here. Read more about how to generate it
+ = link_to "here", help_page_path("ssh", "README")
+ = f.submit "Add key", class: "btn-create btn"
diff --git a/app/views/projects/deploy_keys/index.html.haml b/app/views/projects/deploy_keys/index.html.haml
index 8e24c778b7c..e230834e8ba 100644
--- a/app/views/projects/deploy_keys/index.html.haml
+++ b/app/views/projects/deploy_keys/index.html.haml
@@ -1,43 +1,36 @@
- page_title "Deploy Keys"
-%h3.page-title
- Deploy keys allow read-only access to the repository
-
- = link_to new_namespace_project_deploy_key_path(@project.namespace, @project), class: "btn btn-new pull-right", title: "New Deploy Key" do
- %i.fa.fa-plus
- New Deploy Key
-
-%p.light
- Deploy keys can be used for CI, staging or production servers.
- You can create a deploy key or add an existing one
-
-%hr.clearfix
-
-.row
- .col-md-6.enabled-keys
- %h5
- %strong.cgreen Enabled deploy keys
- for this project
- %ul.bordered-list
- = render @enabled_keys
- - if @enabled_keys.blank?
- .light-well
- .nothing-here-block Create a #{link_to 'new deploy key', new_namespace_project_deploy_key_path(@project.namespace, @project)} or add an existing one
- .col-md-6.available-keys
- - # If there are available public deploy keys but no available project deploy keys, only public deploy keys are shown.
- - if @available_project_keys.any? || @available_public_keys.blank?
- %h5
- %strong Deploy keys
- from projects you have access to
- %ul.bordered-list
+.row.prepend-top-default
+ .col-lg-3.profile-settings-sidebar
+ %h4.prepend-top-0
+ = page_title
+ %p
+ Deploy keys allow read-only access to your repository. Deploy keys can be used for CI, staging or production servers. You can create a deploy key or add an existing one.
+ .col-lg-9
+ %h5.prepend-top-0
+ Create a new deploy key for this project
+ = render "form"
+ .col-lg-9.col-lg-offset-3
+ %hr
+ .col-lg-9.col-lg-offset-3.append-bottom-default.deploy-keys
+ %h5.prepend-top-0
+ Enabled deploy keys for this project (#{@enabled_keys.size})
+ - if @enabled_keys.any?
+ %ul.well-list
+ = render @enabled_keys
+ - else
+ .profile-settings-message.text-center
+ No deploy keys found. Create one with the form above or add existing one below.
+ %h5.prepend-top-default
+ Deploy keys from projects you have access to (#{@available_project_keys.size})
+ - if @available_project_keys.any?
+ %ul.well-list
= render @available_project_keys
- - if @available_project_keys.blank?
- .light-well
- .nothing-here-block Deploy keys from projects you have access to will be displayed here
-
+ - else
+ .profile-settings-message.text-center
+ No deploy keys from your projects could be found. Create one with the form above or add existing one below.
- if @available_public_keys.any?
- %h5
- %strong Public deploy keys
- available to any project
- %ul.bordered-list
+ %h5.prepend-top-default
+ Public deploy keys available to any project (#{@available_public_keys.size})
+ %ul.well-list
= render @available_public_keys
diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml
index eaab99973a4..d9c4b410d32 100644
--- a/app/views/projects/diffs/_diffs.html.haml
+++ b/app/views/projects/diffs/_diffs.html.haml
@@ -1,3 +1,4 @@
+- show_whitespace_toggle = local_assigns.fetch(:show_whitespace_toggle, true)
- if diff_view == 'parallel'
- fluid_layout true
@@ -5,6 +6,11 @@
.content-block.oneline-block.files-changed
.inline-parallel-buttons
+ - if show_whitespace_toggle
+ - if current_controller?(:commit)
+ = commit_diff_whitespace_link(@project, @commit, class: 'hidden-xs')
+ - elsif current_controller?(:merge_requests)
+ = diff_merge_request_whitespace_link(@project, @merge_request, class: 'hidden-xs')
.btn-group
= inline_diff_btn
= parallel_diff_btn
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml
index 83a8d7ae9bf..0f04fc5d33c 100644
--- a/app/views/projects/diffs/_file.html.haml
+++ b/app/views/projects/diffs/_file.html.haml
@@ -40,19 +40,19 @@
= view_file_btn(diff_commit.id, diff_file, project)
.diff-content.diff-wrap-lines
- -# Skipp all non non-supported blobs
+ - # Skip all non non-supported blobs
- return unless blob.respond_to?('text?')
- if diff_file.too_large?
- .nothing-here-block
- This diff could not be displayed because it is too large.
- - else
- - if blob_text_viewable?(blob)
- - if diff_view == 'parallel'
- = render "projects/diffs/parallel_view", diff_file: diff_file, project: project, blob: blob, index: i
- - else
- = render "projects/diffs/text_file", diff_file: diff_file, index: i
- - elsif blob.image?
- - old_file = project.repository.prev_blob_for_diff(diff_commit, diff_file)
- = render "projects/diffs/image", diff_file: diff_file, old_file: old_file, file: blob, index: i, diff_refs: diff_refs
+ .nothing-here-block This diff could not be displayed because it is too large.
+ - elsif blob_text_viewable?(blob) && !project.repository.diffable?(blob)
+ .nothing-here-block This diff was suppressed by a .gitattributes entry.
+ - elsif blob_text_viewable?(blob)
+ - if diff_view == 'parallel'
+ = render "projects/diffs/parallel_view", diff_file: diff_file, project: project, blob: blob, index: i
- else
- .nothing-here-block No preview for this file type
+ = render "projects/diffs/text_file", diff_file: diff_file, index: i
+ - elsif blob.image?
+ - old_file = project.repository.prev_blob_for_diff(diff_commit, diff_file)
+ = render "projects/diffs/image", diff_file: diff_file, old_file: old_file, file: blob, index: i, diff_refs: diff_refs
+ - else
+ .nothing-here-block No preview for this file type
diff --git a/app/views/projects/group_links/index.html.haml b/app/views/projects/group_links/index.html.haml
index 13f5fc141fa..2b904544f28 100644
--- a/app/views/projects/group_links/index.html.haml
+++ b/app/views/projects/group_links/index.html.haml
@@ -1,41 +1,44 @@
- page_title "Groups"
-%h3.page_title Share project with other groups
-%p.light
- Projects can be stored in only one group at once. However you can share a project with other groups here.
-%hr
-- if @group_links.present?
- .enabled-groups.panel.panel-default
- .panel-heading
- Already shared with
- %ul.well-list
- - @group_links.each do |group_link|
- - group = group_link.group
- %li
- .pull-right
- = link_to namespace_project_group_link_path(@project.namespace, @project, group_link), method: :delete, class: 'btn btn-sm' do
- %i.icon-remove
- disable sharing
- = link_to group do
- %strong
- %i.icon-folder-open
- = group.name
- %br
- .light up to #{group_link.human_access}
-
-
-.available-groups
- %h4
- Can be shared with
- %div
- = form_tag namespace_project_group_links_path(@project.namespace, @project), method: :post, class: 'form-horizontal' do
+.row.prepend-top-default
+ .col-lg-3.settings-sidebar
+ %h4.prepend-top-0
+ Share project with other groups
+ %p
+ Projects can be stored in only one group at once. However you can share a project with other groups here.
+ .col-lg-9
+ %h5.prepend-top-0
+ Set a group to share
+ = form_tag namespace_project_group_links_path(@project.namespace, @project), method: :post do
.form-group
- = label_tag :link_group_id, 'Group', class: 'control-label'
- .col-sm-10
- = groups_select_tag(:link_group_id, skip_group: @project.group.try(:path))
+ = label_tag :link_group_id, "Group", class: "label-light"
+ = groups_select_tag(:link_group_id, skip_group: @project.group.try(:path))
.form-group
- = label_tag :link_group_access, 'Max access level', class: 'control-label'
- .col-sm-10
- = select_tag :link_group_access, options_for_select(ProjectGroupLink.access_options, ProjectGroupLink.default_access), class: "form-control"
- .form-actions
- = submit_tag "Share", class: "btn btn-create"
-
+ = label_tag :link_group_access, "Max access level", class: "label-light"
+ .select-wrapper
+ = select_tag :link_group_access, options_for_select(ProjectGroupLink.access_options, ProjectGroupLink.default_access), class: "form-control select-control"
+ %span.caret
+ = submit_tag "Share", class: "btn btn-create"
+ .col-lg-9.col-lg-offset-3
+ %hr
+ .col-lg-9.col-lg-offset-3.append-bottom-default.enabled-groups
+ %h5.prepend-top-0
+ Groups you share with (#{@group_links.size})
+ - if @group_links.present?
+ %ul.well-list
+ - @group_links.each do |group_link|
+ - group = group_link.group
+ %li
+ .pull-left.append-right-10.hidden-xs
+ = icon("folder-open-o", class: "settings-list-icon")
+ .pull-left
+ = link_to group do
+ = group.name
+ %br
+ up to #{group_link.human_access}
+ .pull-right
+ = link_to namespace_project_group_link_path(@project.namespace, @project, group_link), method: :delete, class: "btn btn-transparent" do
+ %span.sr-only disable sharing
+ = icon("trash")
+ - else
+ .settings-message.text-center
+ There are no groups with access to your project, add one in the form above
diff --git a/app/views/projects/hooks/_project_hook.html.haml b/app/views/projects/hooks/_project_hook.html.haml
new file mode 100644
index 00000000000..62eba5888a4
--- /dev/null
+++ b/app/views/projects/hooks/_project_hook.html.haml
@@ -0,0 +1,15 @@
+%li
+ .row
+ .col-md-8.col-lg-7
+ %strong.light-header= hook.url
+ %div
+ - %w(push_events tag_push_events issues_events note_events merge_requests_events build_events).each do |trigger|
+ - if hook.send(trigger)
+ %span.label.label-gray.deploy-project-label= trigger.titleize
+ .col-md-4.col-lg-5.text-right-lg.prepend-top-5
+ %span.append-right-10.inline
+ SSL Verification: #{hook.enable_ssl_verification ? "enabled" : "disabled"}
+ = link_to "Test", test_namespace_project_hook_path(@project.namespace, @project, hook), class: "btn btn-sm"
+ = link_to namespace_project_hook_path(@project.namespace, @project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-transparent" do
+ %span.sr-only Remove
+ = icon('trash')
diff --git a/app/views/projects/hooks/index.html.haml b/app/views/projects/hooks/index.html.haml
index aae3abcad4b..36c1d69f060 100644
--- a/app/views/projects/hooks/index.html.haml
+++ b/app/views/projects/hooks/index.html.haml
@@ -1,88 +1,84 @@
- page_title "Webhooks"
-%h3.page-title
- Webhooks
+.row.prepend-top-default
+ .col-lg-3.profile-settings-sidebar
+ %h4.prepend-top-0
+ = page_title
+ %p
+ #{link_to "Webhooks", help_page_path("web_hooks", "web_hooks")} can be
+ used for binding events when something is happening within the project.
+ .col-lg-9.append-bottom-default
+ %h5.prepend-top-0
+ Add new webhook
+ = form_for [@project.namespace.becomes(Namespace), @project, @hook], as: :hook, url: namespace_project_hooks_path(@project.namespace, @project) do |f|
+ = form_errors(@hook)
-%p.light
- #{link_to "Webhooks ", help_page_path("web_hooks", "web_hooks"), class: "vlink"} can be
- used for binding events when something is happening within the project.
-
-%hr.clearfix
-
-= form_for [@project.namespace.becomes(Namespace), @project, @hook], as: :hook, url: namespace_project_hooks_path(@project.namespace, @project), html: { class: 'form-horizontal' } do |f|
- = form_errors(@hook)
-
- .form-group
- = f.label :url, "URL", class: 'control-label'
- .col-sm-10
- = f.text_field :url, class: "form-control", placeholder: 'http://example.com/trigger-ci.json'
- .form-group
- = f.label :url, "Trigger", class: 'control-label'
- .col-sm-10.prepend-top-10
- %div
- = f.check_box :push_events, class: 'pull-left'
- .prepend-left-20
- = f.label :push_events, class: 'list-label' do
- %strong Push events
- %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 :note_events, class: 'pull-left'
- .prepend-left-20
- = f.label :note_events, class: 'list-label' do
- %strong Comments
- %p.light
- This url will be triggered when someone adds a comment
- %div
- = f.check_box :issues_events, class: 'pull-left'
- .prepend-left-20
- = f.label :issues_events, class: 'list-label' do
- %strong Issues events
- %p.light
- This url will be triggered when an issue is created/updated/merged
- %div
- = f.check_box :merge_requests_events, class: 'pull-left'
- .prepend-left-20
- = f.label :merge_requests_events, class: 'list-label' do
- %strong Merge Request events
- %p.light
- This url will be triggered when a merge request is created/updated/merged
- %div
- = f.check_box :build_events, class: 'pull-left'
- .prepend-left-20
- = f.label :build_events, class: 'list-label' do
- %strong Build events
- %p.light
- This url will be triggered when the build status changes
- .form-group
- = f.label :enable_ssl_verification, "SSL verification", class: 'control-label checkbox'
- .col-sm-10
- .checkbox
- = f.label :enable_ssl_verification do
- = f.check_box :enable_ssl_verification
- %strong Enable SSL verification
- .form-actions
- = f.submit "Add Webhook", class: "btn btn-create"
-
--if @hooks.any?
- .panel.panel-default
- .panel-heading
+ .form-group
+ = f.label :url, "URL", class: "label-light"
+ = f.text_field :url, class: "form-control", placeholder: "http://example.com/trigger-ci.json"
+ .form-group
+ = f.label :token, "Secret Token", class: 'label-light'
+ = f.text_field :token, class: "form-control", placeholder: ''
+ %p.help-block
+ Use this token to validate received payloads
+ .form-group
+ = f.label :url, "Trigger", class: "label-light"
+ %div
+ = f.check_box :push_events, class: "pull-left"
+ .prepend-left-20
+ = f.label :push_events, class: "label-light append-bottom-0" do
+ Push events
+ %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: "label-light append-bottom-0" do
+ Tag push events
+ %p.light
+ This url will be triggered when a new tag is pushed to the repository
+ %div
+ = f.check_box :note_events, class: "pull-left"
+ .prepend-left-20
+ = f.label :note_events, class: "label-light append-bottom-0" do
+ Comments
+ %p.light
+ This url will be triggered when someone adds a comment
+ %div
+ = f.check_box :issues_events, class: "pull-left"
+ .prepend-left-20
+ = f.label :issues_events, class: "label-light append-bottom-0" do
+ Issues events
+ %p.light
+ This url will be triggered when an issue is created/updated/merged
+ %div
+ = f.check_box :merge_requests_events, class: "pull-left"
+ .prepend-left-20
+ = f.label :merge_requests_events, class: "label-light append-bottom-0" do
+ Merge Request events
+ %p.light
+ This url will be triggered when a merge request is created/updated/merged
+ %div
+ = f.check_box :build_events, class: "pull-left"
+ .prepend-left-20
+ = f.label :build_events, class: "label-light append-bottom-0" do
+ Build events
+ %p.light
+ This url will be triggered when the build status changes
+ .form-group
+ = f.label :enable_ssl_verification, "SSL verification", class: "label-light"
+ %div
+ = f.check_box :enable_ssl_verification, class: "pull-left"
+ .prepend-left-20
+ = f.label :enable_ssl_verification, class: "label-light append-bottom-0" do
+ Enable SSL verification
+ = f.submit "Add Webhook", class: "btn btn-create"
+ %hr
+ %h5.prepend-top-default
Webhooks (#{@hooks.count})
- %ul.content-list
- - @hooks.each do |hook|
- %li
- .controls
- = link_to 'Test Hook', test_namespace_project_hook_path(@project.namespace, @project, hook), class: "btn btn-sm btn-grouped"
- = link_to 'Remove', namespace_project_hook_path(@project.namespace, @project, hook), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
- .monospace= hook.url
- %div
- - %w(push_events tag_push_events issues_events note_events merge_requests_events build_events).each do |trigger|
- - if hook.send(trigger)
- %span.label.label-gray= trigger.titleize
- %span.label.label-gray SSL Verification: #{hook.enable_ssl_verification ? "enabled" : "disabled"}
+ - if @hooks.any?
+ %ul.well-list
+ - @hooks.each do |hook|
+ = render "project_hook", hook: hook
+ - else
+ %p.profile-settings-message.text-center.append-bottom-0
+ No webhooks found, add one in the form above.
diff --git a/app/views/projects/imports/new.html.haml b/app/views/projects/imports/new.html.haml
index 6027fb23360..a8a8caf7280 100644
--- a/app/views/projects/imports/new.html.haml
+++ b/app/views/projects/imports/new.html.haml
@@ -10,7 +10,7 @@
.panel-body
%pre
:preserve
- #{@project.import_error.try(:strip)}
+ #{sanitize_repo_path(@project.import_error)}
= form_for @project, url: namespace_project_import_path(@project.namespace, @project), method: :post, html: { class: 'form-horizontal' } do |f|
= render "shared/import_form", f: f
diff --git a/app/views/projects/issues/_new_branch.html.haml b/app/views/projects/issues/_new_branch.html.haml
index 6da8e4f33a9..469429ccf3c 100644
--- a/app/views/projects/issues/_new_branch.html.haml
+++ b/app/views/projects/issues/_new_branch.html.haml
@@ -1,5 +1,13 @@
-- if current_user && can?(current_user, :push_code, @project) && @issue.can_be_worked_on?(current_user)
+- if can?(current_user, :push_code, @project)
.pull-right
- = link_to namespace_project_branches_path(@project.namespace, @project, branch_name: @issue.to_branch_name, issue_iid: @issue.iid), method: :post, class: 'btn has-tooltip', title: @issue.to_branch_name do
- = icon('code-fork')
- New Branch
+ #new-branch{'data-path' => can_create_branch_namespace_project_issue_path(@project.namespace, @project, @issue)}
+ = link_to namespace_project_branches_path(@project.namespace, @project, branch_name: @issue.to_branch_name, issue_iid: @issue.iid), method: :post, class: 'btn has-tooltip', title: @issue.to_branch_name, disabled: 'disabled' do
+ .checking
+ %i.fa.fa-spinner.fa-spin
+ Checking branches
+ .available(style="display: none")
+ %i.fa.fa-code-fork
+ New branch
+ .unavailable(style="display: none")
+ %i.fa.fa-exclamation-triangle
+ New branch unavailable
diff --git a/app/views/projects/merge_requests/_new_submit.html.haml b/app/views/projects/merge_requests/_new_submit.html.haml
index 2f14a91e64f..18b3f9e1549 100644
--- a/app/views/projects/merge_requests/_new_submit.html.haml
+++ b/app/views/projects/merge_requests/_new_submit.html.haml
@@ -42,7 +42,7 @@
%h4 This comparison includes more than #{MergeRequestDiff::COMMITS_SAFE_SIZE} commits.
%p To preserve performance the line changes are not shown.
- else
- = render "projects/diffs/diffs", diffs: @diffs, project: @project, diff_refs: @merge_request.diff_refs
+ = render "projects/diffs/diffs", diffs: @diffs, project: @project, diff_refs: @merge_request.diff_refs, show_whitespace_toggle: false
- if @ci_commit
#builds.builds.tab-pane
= render "projects/merge_requests/show/builds"
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index be63875ab34..6ec84660157 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -24,15 +24,15 @@
- else
= link_to 'Reopen Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-reopen btn-nr btn-grouped"
- = link_to namespace_project_milestone_path(@project.namespace, @project, @milestone), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-grouped btn-nr" do
- = icon('trash-o')
- Delete
-
= link_to edit_namespace_project_milestone_path(@project.namespace, @project, @milestone), class: "btn btn-grouped btn-nr" do
= icon('pencil-square-o')
Edit
-.detail-page-description.milestone-detail.second-block
+ = link_to namespace_project_milestone_path(@project.namespace, @project, @milestone), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-grouped btn-danger" do
+ = icon('trash-o')
+ Delete
+
+.detail-page-description.milestone-detail
%h2.title
= markdown escape_once(@milestone.title), pipeline: :single_line
%div
@@ -42,9 +42,12 @@
= preserve do
= markdown @milestone.description
-- if @milestone.complete?(current_user) && @milestone.active?
+- if @milestone.total_items_count(current_user).zero?
+ .alert.alert-success.prepend-top-default
+ %span Assign some issues to this milestone.
+- elsif @milestone.complete?(current_user) && @milestone.active?
.alert.alert-success.prepend-top-default
- %span All issues for this milestone are closed. You may close milestone now.
+ %span All issues for this milestone are closed. You may close this milestone now.
= render 'shared/milestones/summary', milestone: @milestone, project: @project
= render 'shared/milestones/tabs', milestone: @milestone
diff --git a/app/views/projects/protected_branches/_branches_list.html.haml b/app/views/projects/protected_branches/_branches_list.html.haml
index f68449b1863..b9e9dd8aaea 100644
--- a/app/views/projects/protected_branches/_branches_list.html.haml
+++ b/app/views/projects/protected_branches/_branches_list.html.haml
@@ -1,35 +1,41 @@
-- unless @branches.empty?
- %br
- %h4 Already Protected:
- .table-holder
+%h5.prepend-top-0
+ Already Protected (#{@branches.size})
+- if @branches.empty?
+ %p.profile-settings-message.text-center
+ No branches are protected, protect a branch with the form above.
+- else
+ - can_admin_project = can?(current_user, :admin_project, @project)
+ .table-responsive
%table.table.protected-branches-list
+ %colgroup
+ %col{ width: "30%" }
+ %col{ width: "30%" }
+ %col{ width: "25%" }
+ - if can_admin_project
+ %col
%thead
- %tr.no-border
+ %tr
%th Branch
- %th Developers can push
%th Last commit
- %th
-
+ %th Developers can push
+ - if can_admin_project
+ %th
%tbody
- @branches.each do |branch|
- @url = namespace_project_protected_branch_path(@project.namespace, @project, branch)
%tr
%td
- = link_to namespace_project_commits_path(@project.namespace, @project, branch.name) do
- %strong= branch.name
- - if @project.root_ref?(branch.name)
- %span.label.label-info default
- %td
- = check_box_tag "developers_can_push", branch.id, branch.developers_can_push, "data-url" => @url
- %td
- - if commit = branch.commit
- = link_to namespace_project_commit_path(@project.namespace, @project, commit.id), class: 'commit_short_id' do
- = commit.short_id
- ·
- #{time_ago_with_tooltip(commit.committed_date)}
- - else
- (branch was removed from repository)
+ = link_to(branch.name, namespace_project_commits_path(@project.namespace, @project, branch.name))
+ - if @project.root_ref?(branch.name)
+ %span.label.label-info.prepend-left-5 default
+ %td
+ - if commit = branch.commit
+ = link_to(commit.short_id, namespace_project_commit_path(@project.namespace, @project, commit.id), class: 'commit_short_id')
+ #{time_ago_with_tooltip(commit.committed_date)}
+ - else
+ (branch was removed from repository)
+ %td
+ = check_box_tag("developers_can_push", branch.id, branch.developers_can_push, data: { url: @url })
+ - if can_admin_project
%td
- .pull-right
- - if can? current_user, :admin_project, @project
- = link_to 'Unprotect', [@project.namespace.becomes(Namespace), @project, branch], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-remove btn-sm"
+ = link_to 'Unprotect', [@project.namespace.becomes(Namespace), @project, branch], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-warning btn-sm"
diff --git a/app/views/projects/protected_branches/index.html.haml b/app/views/projects/protected_branches/index.html.haml
index 653b02da4db..c7d317dbaee 100644
--- a/app/views/projects/protected_branches/index.html.haml
+++ b/app/views/projects/protected_branches/index.html.haml
@@ -1,31 +1,33 @@
- page_title "Protected branches"
-%h3.page-title Protected branches
-%p.light Keep stable branches secure and force developers to use Merge Requests
-%hr
-.well
- %p Protected branches are designed to
- %ul
- %li prevent pushes from everybody except #{link_to "masters", help_page_path("permissions", "permissions"), class: "vlink"}
- %li prevent anyone from force pushing to the branch
- %li prevent anyone from deleting the branch
- %p Read more about #{link_to "project permissions", help_page_path("permissions", "permissions"), class: "underlined-link"}
+.row.prepend-top-default.append-bottom-default
+ .col-lg-3
+ %h4.prepend-top-0
+ = page_title
+ %p Keep stable branches secure and force developers to use Merge Requests
+ .col-lg-9
+ %h5.prepend-top-0
+ Protect a branch
+ .account-well.append-bottom-default
+ %p.light-header.append-bottom-0 Protected branches are designed to
+ %ul
+ %li prevent pushes from everybody except #{link_to "masters", help_page_path("permissions", "permissions"), class: "vlink"}
+ %li prevent anyone from force pushing to the branch
+ %li prevent anyone from deleting the branch
+ %p.append-bottom-0 Read more about #{link_to "project permissions", help_page_path("permissions", "permissions"), class: "underlined-link"}
+ - if can? current_user, :admin_project, @project
+ = form_for [@project.namespace.becomes(Namespace), @project, @protected_branch] do |f|
+ = form_errors(@protected_branch)
-- if can? current_user, :admin_project, @project
- = form_for [@project.namespace.becomes(Namespace), @project, @protected_branch], html: { class: 'form-horizontal' } do |f|
- = form_errors(@protected_branch)
-
- .form-group
- = f.label :name, "Branch", class: 'control-label'
- .col-sm-10
- = f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: true}, {class: "select2", data: {placeholder: "Select branch"}})
- .form-group
- .col-sm-offset-2.col-sm-10
- .checkbox
- = f.label :developers_can_push do
- = f.check_box :developers_can_push
- %strong Developers can push
- .help-block Allow developers to push to this branch
- .form-actions
- = f.submit 'Protect', class: "btn-create btn"
-= render 'branches_list'
+ .form-group
+ = f.label :name, "Branch", class: "label-light"
+ = f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: true}, {class: "select2", data: {placeholder: "Select branch"}})
+ .form-group
+ = f.check_box :developers_can_push, class: "pull-left"
+ .prepend-left-20
+ = f.label :developers_can_push, "Developers can push", class: "label-light append-bottom-0"
+ %p.light.append-bottom-0
+ Allow developers to push to this branch
+ = f.submit "Protect", class: "btn-create btn"
+ %hr
+ = render "branches_list"
diff --git a/app/views/projects/triggers/_trigger.html.haml b/app/views/projects/triggers/_trigger.html.haml
index 48b3b5c9920..112b51712ef 100644
--- a/app/views/projects/triggers/_trigger.html.haml
+++ b/app/views/projects/triggers/_trigger.html.haml
@@ -1,7 +1,6 @@
%tr
%td
- .clearfix
- %span.monospace= trigger.token
+ %span.monospace= trigger.token
%td
- if trigger.last_trigger_request
@@ -9,6 +8,5 @@
- else
Never
- %td
- .pull-right
- = link_to 'Revoke', namespace_project_trigger_path(@project.namespace, @project, trigger), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-danger btn-sm btn-grouped"
+ %td.text-right
+ = link_to 'Revoke', namespace_project_trigger_path(@project.namespace, @project, trigger), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-warning btn-sm"
diff --git a/app/views/projects/triggers/index.html.haml b/app/views/projects/triggers/index.html.haml
index bd346c4b8e6..f91885b216d 100644
--- a/app/views/projects/triggers/index.html.haml
+++ b/app/views/projects/triggers/index.html.haml
@@ -1,71 +1,70 @@
- page_title "Triggers"
-%h3.page-title
- Triggers
-%p.light
- Triggers can be used to force a rebuild of a specific branch or tag with an API call.
+.row.prepend-top-default.append-bottom-default
+ .col-lg-3
+ %h4.prepend-top-0
+ = page_title
+ %p
+ Triggers can be used to force a rebuild of a specific branch or tag with an API call.
+ .col-lg-9
+ %h5.prepend-top-0
+ Your triggers
+ - if @triggers.any?
+ .table-responsive
+ %table.table
+ %thead
+ %th Token
+ %th Last used
+ %th
+ = render partial: 'trigger', collection: @triggers, as: :trigger
+ - else
+ %p.profile-settings-message.text-center.append-bottom-default
+ There are no triggers to use, add one by the button below.
-%hr.clearfix
+ = form_for @trigger, url: url_for(controller: 'projects/triggers', action: 'create') do |f|
+ = f.submit "Add Trigger", class: 'btn btn-success'
--if @triggers.any?
- .table-holder
- %table.table
- %thead
- %th Token
- %th Last used
- %th
- = render partial: 'trigger', collection: @triggers, as: :trigger
-- else
- %h4 No triggers
+ %h5.prepend-top-default
+ Use CURL
-= form_for @trigger, url: url_for(controller: 'projects/triggers', action: 'create'), html: { class: 'form-horizontal' } do |f|
- .clearfix
- = f.submit "Add Trigger", class: 'btn btn-success pull-right'
+ %p.light
+ Copy the token above and set your branch or tag name. This is the reference that will be rebuild.
-%hr.clearfix
--if @triggers.any?
- %h3
- Use CURL
+ %pre
+ :plain
+ curl -X POST \
+ -F token=TOKEN \
+ -F ref=REF_NAME \
+ #{builds_trigger_url(@project.id)}
+ %h5.prepend-top-default
+ Use .gitlab-ci.yml
- %p.light
- Copy the token above and set your branch or tag name. This is the reference that will be rebuild.
+ %p.light
+ Copy the snippet to
+ %i .gitlab-ci.yml
+ of dependent project.
+ At the end of your build it will trigger this project to rebuilt.
+ %pre
+ :plain
+ trigger:
+ type: deploy
+ script:
+ - "curl -X POST -F token=TOKEN -F ref=REF_NAME #{builds_trigger_url(@project.id)}"
+ %h5.prepend-top-default
+ Pass build variables
- %pre
- :plain
- curl -X POST \
- -F token=TOKEN \
- -F ref=REF_NAME \
- #{builds_trigger_url(@project.id)}
- %h3
- Use .gitlab-ci.yml
+ %p.light
+ Add
+ %strong variables[VARIABLE]=VALUE
+ to API request.
+ The value of variable could then be used to distinguish triggered build from normal one.
- %p.light
- Copy the snippet to
- %i .gitlab-ci.yml
- of dependent project.
- At the end of your build it will trigger this project to rebuilt.
-
- %pre
- :plain
- trigger:
- type: deploy
- script:
- - "curl -X POST -F token=TOKEN -F ref=REF_NAME #{builds_trigger_url(@project.id)}"
- %h3
- Pass build variables
-
- %p.light
- Add
- %strong variables[VARIABLE]=VALUE
- to API request.
- The value of variable could then be used to distinguish triggered build from normal one.
-
- %pre
- :plain
- curl -X POST \
- -F token=TOKEN \
- -F "ref=REF_NAME" \
- -F "variables[RUN_NIGHTLY_BUILD]=true" \
- #{builds_trigger_url(@project.id)}
+ %pre.append-bottom-0
+ :plain
+ curl -X POST \
+ -F token=TOKEN \
+ -F "ref=REF_NAME" \
+ -F "variables[RUN_NIGHTLY_BUILD]=true" \
+ #{builds_trigger_url(@project.id)}