From ba9855d4877998e3574907cc542fcab15a9d1353 Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Tue, 29 Dec 2015 18:58:38 -0200 Subject: Prevent ldap_blocked users from being unblocked by the Admin UI --- app/views/admin/users/index.html.haml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index a92c9c152b9..911c4d0cf12 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -90,7 +90,12 @@   = link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn btn-xs" - unless user == current_user - - if user.blocked? + - if user.ldap_blocked? + = link_to '#', title: 'Cannot unblock LDAP blocked users', data: {toggle: 'tooltip'}, class: 'btn btn-xs btn-success disabled' do + %i.fa.fa-lock + Unblock + = '' + - elsif user.blocked? = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success" - else = link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-xs btn-warning" -- cgit v1.2.1 From b433efcf70dbafd5f76ce7140a4e6eb36008eee5 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 13 Jan 2016 14:27:36 +0100 Subject: Add suport for layout without container Signed-off-by: Dmitriy Zaporozhets --- app/views/layouts/_page.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml index ec7cd79bc54..26159989777 100644 --- a/app/views/layouts/_page.html.haml +++ b/app/views/layouts/_page.html.haml @@ -24,7 +24,7 @@ .content-wrapper = render "layouts/flash" = yield :flash_message - %div{ class: container_class } + %div{ class: (container_class unless @no_container) } .content .clearfix = yield -- cgit v1.2.1 From 3b3f755b5bfa5348375fffe22ec56fe0f01ac1f5 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 13 Jan 2016 14:37:25 +0100 Subject: New layout without background color Signed-off-by: Dmitriy Zaporozhets --- app/views/groups/show.html.haml | 30 ++++++++++++++++++------------ app/views/projects/_activity.html.haml | 2 +- app/views/projects/show.html.haml | 24 ++++++++++++++---------- app/views/shared/_event_filter.html.haml | 2 +- 4 files changed, 34 insertions(+), 24 deletions(-) (limited to 'app/views') diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 48a544fc834..34719481984 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -5,6 +5,9 @@ - if current_user = auto_discovery_link_tag(:atom, group_url(@group, format: :atom, private_token: current_user.private_token), title: "#{@group.name} activity") +- @no_container = true +- @blank_container = true + .cover-block .cover-controls - if @group && can?(current_user, :admin_group, @group) @@ -25,8 +28,8 @@ .cover-desc.description = markdown(@group.description, pipeline: :description) -- if can?(current_user, :read_group, @group) - %ul.center-top-menu.no-top + + %ul.center-top-menu.cover-menu %li.active = link_to "#activity", 'data-toggle' => 'tab' do Activity @@ -35,19 +38,22 @@ = link_to "#projects", 'data-toggle' => 'tab' do Projects - .tab-content - .tab-pane.active#activity - .gray-content-block.activity-filter-block - - if current_user - = render "events/event_last_push", event: @last_push +- if can?(current_user, :read_group, @group) + + %div{ class: container_class } + .tab-content + .tab-pane.active#activity + .activity-filter-block + - if current_user + = render "events/event_last_push", event: @last_push - = render 'shared/event_filter' + = render 'shared/event_filter' - .content_list - = spinner + .content_list + = spinner - .tab-pane#projects - = render "projects", projects: @projects + .tab-pane#projects + = render "projects", projects: @projects - else %p.center-top-menu.no-top diff --git a/app/views/projects/_activity.html.haml b/app/views/projects/_activity.html.haml index 101880bd105..6edc94e7a98 100644 --- a/app/views/projects/_activity.html.haml +++ b/app/views/projects/_activity.html.haml @@ -1,4 +1,4 @@ -.gray-content-block.activity-filter-block +.activity-filter-block - if current_user .pull-right = link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), title: "Feed", class: 'btn rss-btn' do diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 8436be433b1..25dcedf2b0b 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -7,8 +7,10 @@ = render 'shared/no_ssh' = render 'shared/no_password' -= render 'projects/last_push' +- @no_container = true +- @blank_container = true += render 'projects/last_push' = render "home_panel" .project-stats.gray-content-block.second-block @@ -57,15 +59,17 @@ = link_to add_contribution_guide_path(@project) do Add Contribution guide -- if @project.archived? - .text-warning.center.prepend-top-20 - %p - = icon("exclamation-triangle fw") - Archived project! Repository is read-only - - if @repository.commit .content-block.second-block.white - = render 'projects/last_commit', commit: @repository.commit, project: @project + %div{ class: container_class } + = render 'projects/last_commit', commit: @repository.commit, project: @project + +%div{ class: container_class } + - if @project.archived? + .text-warning.center.prepend-top-20 + %p + = icon("exclamation-triangle fw") + Archived project! Repository is read-only -%div{class: "project-show-#{default_project_view}"} - = render default_project_view + %div{class: "project-show-#{default_project_view}"} + = render default_project_view diff --git a/app/views/shared/_event_filter.html.haml b/app/views/shared/_event_filter.html.haml index 8495774accc..4426096f742 100644 --- a/app/views/shared/_event_filter.html.haml +++ b/app/views/shared/_event_filter.html.haml @@ -1,4 +1,4 @@ -.btn-group.btn-group-next.event-filter +%ul.left-top-menu.event-filter.no-top = event_filter_link EventFilter.push, 'Push events' = event_filter_link EventFilter.merged, 'Merge events' = event_filter_link EventFilter.comments, 'Comments' -- cgit v1.2.1 From 8c3debb18aae2cda444d25468315bdf340cb3e9e Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 13 Jan 2016 15:03:32 +0100 Subject: Start moving all navigation to one class Signed-off-by: Dmitriy Zaporozhets --- app/views/groups/show.html.haml | 2 +- app/views/shared/_event_filter.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 34719481984..24d2f000b40 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -29,7 +29,7 @@ = markdown(@group.description, pipeline: :description) - %ul.center-top-menu.cover-menu + %ul.nav-links %li.active = link_to "#activity", 'data-toggle' => 'tab' do Activity diff --git a/app/views/shared/_event_filter.html.haml b/app/views/shared/_event_filter.html.haml index 4426096f742..c38d9313dba 100644 --- a/app/views/shared/_event_filter.html.haml +++ b/app/views/shared/_event_filter.html.haml @@ -1,4 +1,4 @@ -%ul.left-top-menu.event-filter.no-top +%ul.nav-links.event-filter = event_filter_link EventFilter.push, 'Push events' = event_filter_link EventFilter.merged, 'Merge events' = event_filter_link EventFilter.comments, 'Comments' -- cgit v1.2.1 From 03090a88d80cbc8c4333053081882915beb721da Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 13 Jan 2016 15:58:04 +0100 Subject: Replace all navigation menu with nav-links class Signed-off-by: Dmitriy Zaporozhets --- app/views/admin/builds/index.html.haml | 2 +- app/views/dashboard/_activities.html.haml | 4 +- app/views/dashboard/_activity_head.html.haml | 2 +- app/views/dashboard/_groups_head.html.haml | 2 +- app/views/dashboard/_projects_head.html.haml | 2 +- app/views/dashboard/_snippets_head.html.haml | 2 +- app/views/dashboard/milestones/show.html.haml | 2 +- app/views/dashboard/snippets/index.html.haml | 48 ++++++++++++---------- app/views/groups/milestones/show.html.haml | 2 +- app/views/groups/show.html.haml | 2 +- app/views/help/ui.html.haml | 4 +- app/views/projects/_activity.html.haml | 4 +- app/views/projects/_md_preview.html.haml | 2 +- app/views/projects/blob/edit.html.haml | 2 +- app/views/projects/builds/index.html.haml | 2 +- app/views/projects/builds/show.html.haml | 2 +- app/views/projects/commit/_ci_menu.html.haml | 2 +- app/views/projects/commit/show.html.haml | 4 +- app/views/projects/commits/_head.html.haml | 2 +- app/views/projects/graphs/_head.html.haml | 2 +- .../projects/merge_requests/_new_submit.html.haml | 2 +- app/views/projects/merge_requests/_show.html.haml | 2 +- app/views/projects/milestones/show.html.haml | 2 +- app/views/projects/wikis/_nav.html.haml | 2 +- app/views/shared/_milestones_filter.html.haml | 2 +- app/views/shared/issuable/_filter.html.haml | 2 +- app/views/sherlock/queries/show.html.haml | 2 +- app/views/sherlock/transactions/show.html.haml | 2 +- app/views/users/show.html.haml | 2 +- 29 files changed, 59 insertions(+), 53 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/builds/index.html.haml b/app/views/admin/builds/index.html.haml index ddd4e1481eb..ebf2b7b60e7 100644 --- a/app/views/admin/builds/index.html.haml +++ b/app/views/admin/builds/index.html.haml @@ -4,7 +4,7 @@ - if @all_builds.running_or_pending.any? = link_to 'Cancel all', cancel_all_admin_builds_path, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post - %ul.center-top-menu + %ul.nav-links %li{class: ('active' if @scope.nil?)} = link_to admin_builds_path do All diff --git a/app/views/dashboard/_activities.html.haml b/app/views/dashboard/_activities.html.haml index f98fd9f06ba..dc76599b776 100644 --- a/app/views/dashboard/_activities.html.haml +++ b/app/views/dashboard/_activities.html.haml @@ -1,9 +1,9 @@ .hidden-xs = render "events/event_last_push", event: @last_push -.gray-content-block +.nav-block - if current_user - .pull-right + .controls = link_to dashboard_projects_path(:atom, { private_token: current_user.private_token }), class: 'btn rss-btn' do %i.fa.fa-rss = render 'shared/event_filter' diff --git a/app/views/dashboard/_activity_head.html.haml b/app/views/dashboard/_activity_head.html.haml index 9f4be025bf2..b78e70ebc1e 100644 --- a/app/views/dashboard/_activity_head.html.haml +++ b/app/views/dashboard/_activity_head.html.haml @@ -1,4 +1,4 @@ -%ul.center-top-menu +%ul.nav-links %li{ class: ("active" unless params[:filter]) } = link_to activity_dashboard_path, class: 'shortcuts-activity', data: {placement: 'right'} do Your Projects diff --git a/app/views/dashboard/_groups_head.html.haml b/app/views/dashboard/_groups_head.html.haml index 64bd356f546..6ca97a692b4 100644 --- a/app/views/dashboard/_groups_head.html.haml +++ b/app/views/dashboard/_groups_head.html.haml @@ -1,4 +1,4 @@ -%ul.center-top-menu +%ul.nav-links = nav_link(page: dashboard_groups_path) do = link_to dashboard_groups_path, title: 'Your groups', data: {placement: 'right'} do Your Groups diff --git a/app/views/dashboard/_projects_head.html.haml b/app/views/dashboard/_projects_head.html.haml index f4a3e3162bf..5c4b58cd688 100644 --- a/app/views/dashboard/_projects_head.html.haml +++ b/app/views/dashboard/_projects_head.html.haml @@ -1,7 +1,7 @@ = content_for :flash_message do = render 'shared/project_limit' .top-area - %ul.left-top-menu + %ul.nav-links = nav_link(page: [dashboard_projects_path, root_path]) do = link_to dashboard_projects_path, title: 'Home', class: 'shortcuts-activity', data: {placement: 'right'} do Your Projects diff --git a/app/views/dashboard/_snippets_head.html.haml b/app/views/dashboard/_snippets_head.html.haml index 0ae62d6f1b6..b25e8ea1f0c 100644 --- a/app/views/dashboard/_snippets_head.html.haml +++ b/app/views/dashboard/_snippets_head.html.haml @@ -1,4 +1,4 @@ -%ul.center-top-menu +%ul.nav-links = nav_link(page: dashboard_snippets_path, html_options: {class: 'home'}) do = link_to dashboard_snippets_path, title: 'Your snippets', data: {placement: 'right'} do Your Snippets diff --git a/app/views/dashboard/milestones/show.html.haml b/app/views/dashboard/milestones/show.html.haml index 49a558e8ac9..3810267577c 100644 --- a/app/views/dashboard/milestones/show.html.haml +++ b/app/views/dashboard/milestones/show.html.haml @@ -48,7 +48,7 @@ #{@milestone.open_items_count} open = milestone_progress_bar(@milestone) -%ul.center-top-menu.no-top.no-bottom +%ul.nav-links.no-top.no-bottom %li.active = link_to '#tab-issues', 'data-toggle' => 'tab' do Issues diff --git a/app/views/dashboard/snippets/index.html.haml b/app/views/dashboard/snippets/index.html.haml index 07b6d57932e..d4e7862981c 100644 --- a/app/views/dashboard/snippets/index.html.haml +++ b/app/views/dashboard/snippets/index.html.haml @@ -3,32 +3,36 @@ = render 'dashboard/snippets_head' -.gray-content-block - .pull-right +.nav-block + .controls = link_to new_snippet_path, class: "btn btn-new", title: "New Snippet" do = icon('plus') New Snippet - .btn-group.btn-group-next.snippet-scope-menu - = link_to dashboard_snippets_path, class: "btn btn-default #{"active" unless params[:scope]}" do - All - %span.badge - = current_user.snippets.count - - = link_to dashboard_snippets_path(scope: 'are_private'), class: "btn btn-default #{"active" if params[:scope] == "are_private"}" do - Private - %span.badge - = current_user.snippets.are_private.count - - = link_to dashboard_snippets_path(scope: 'are_internal'), class: "btn btn-default #{"active" if params[:scope] == "are_internal"}" do - Internal - %span.badge - = current_user.snippets.are_internal.count - - = link_to dashboard_snippets_path(scope: 'are_public'), class: "btn btn-default #{"active" if params[:scope] == "are_public"}" do - Public - %span.badge - = current_user.snippets.are_public.count + .nav-links.snippet-scope-menu + %li{ class: ("active" unless params[:scope]) } + = link_to dashboard_snippets_path do + All + %span.badge + = current_user.snippets.count + + %li{ class: ("active" if params[:scope] == "are_private") } + = link_to dashboard_snippets_path(scope: 'are_private') do + Private + %span.badge + = current_user.snippets.are_private.count + + %li{ class: ("active" if params[:scope] == "are_internal") } + = link_to dashboard_snippets_path(scope: 'are_internal') do + Internal + %span.badge + = current_user.snippets.are_internal.count + + %li{ class: ("active" if params[:scope] == "are_public") } + = link_to dashboard_snippets_path(scope: 'are_public') do + Public + %span.badge + = current_user.snippets.are_public.count = render 'snippets/snippets' diff --git a/app/views/groups/milestones/show.html.haml b/app/views/groups/milestones/show.html.haml index d063b257b5e..1233da85524 100644 --- a/app/views/groups/milestones/show.html.haml +++ b/app/views/groups/milestones/show.html.haml @@ -54,7 +54,7 @@ #{@milestone.open_items_count} open = milestone_progress_bar(@milestone) -%ul.center-top-menu.no-top.no-bottom +%ul.nav-links.no-top.no-bottom %li.active = link_to '#tab-issues', 'data-toggle' => 'tab' do Issues diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 24d2f000b40..4da70358766 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -56,5 +56,5 @@ = render "projects", projects: @projects - else - %p.center-top-menu.no-top + %p.nav-links.no-top No projects to show diff --git a/app/views/help/ui.html.haml b/app/views/help/ui.html.haml index d9ffda884c8..65335c708fa 100644 --- a/app/views/help/ui.html.haml +++ b/app/views/help/ui.html.haml @@ -139,9 +139,9 @@ %h2#navs Navigation %h4 - %code .center-top-menu + %code .nav-links .example - %ul.center-top-menu + %ul.nav-links %li.active %a Open %li diff --git a/app/views/projects/_activity.html.haml b/app/views/projects/_activity.html.haml index 6edc94e7a98..961b61d2e76 100644 --- a/app/views/projects/_activity.html.haml +++ b/app/views/projects/_activity.html.haml @@ -1,6 +1,6 @@ -.activity-filter-block +.nav-block.activity-filter-block - if current_user - .pull-right + .controls = link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), title: "Feed", class: 'btn rss-btn' do %i.fa.fa-rss diff --git a/app/views/projects/_md_preview.html.haml b/app/views/projects/_md_preview.html.haml index 54c818baaf4..1fb37ef6621 100644 --- a/app/views/projects/_md_preview.html.haml +++ b/app/views/projects/_md_preview.html.haml @@ -1,6 +1,6 @@ .md-area .md-header.clearfix - %ul.center-top-menu + %ul.nav-links %li.active %a.js-md-write-button(href="#md-write-holder" tabindex="-1") Write diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml index 09fa148b129..a279e6eda55 100644 --- a/app/views/projects/blob/edit.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -2,7 +2,7 @@ = render "header_title" .file-editor - %ul.center-top-menu.no-bottom.js-edit-mode + %ul.nav-links.no-bottom.js-edit-mode %li.active = link_to '#editor' do = icon('edit') diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml index 3bbfdb1e3b0..5d18c0d803a 100644 --- a/app/views/projects/builds/index.html.haml +++ b/app/views/projects/builds/index.html.haml @@ -8,7 +8,7 @@ - if @all_builds.running_or_pending.any? = link_to 'Cancel running', cancel_all_namespace_project_builds_path(@project.namespace, @project), data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post - %ul.center-top-menu + %ul.nav-links %li{class: ('active' if @scope.nil?)} = link_to project_builds_path(@project) do All diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 5b7ecce86ab..08a59d465c0 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -14,7 +14,7 @@ #up-build-trace - if @commit.matrix_for_ref?(@build.ref) - %ul.center-top-menu.no-top.no-bottom + %ul.nav-links.no-top.no-bottom - @commit.latest_builds_for_ref(@build.ref).each do |build| %li{class: ('active' if build == @build) } = link_to namespace_project_build_path(@project.namespace, @project, build) do diff --git a/app/views/projects/commit/_ci_menu.html.haml b/app/views/projects/commit/_ci_menu.html.haml index f74f8b427ec..ea33aa472a6 100644 --- a/app/views/projects/commit/_ci_menu.html.haml +++ b/app/views/projects/commit/_ci_menu.html.haml @@ -1,4 +1,4 @@ -%ul.center-top-menu.no-top.no-bottom.commit-ci-menu +%ul.nav-links.no-top.no-bottom.commit-ci-menu = nav_link(path: 'commit#show') do = link_to namespace_project_commit_path(@project.namespace, @project, @commit.id) do Changes diff --git a/app/views/projects/commit/show.html.haml b/app/views/projects/commit/show.html.haml index 58aa45e8d2c..02297158dec 100644 --- a/app/views/projects/commit/show.html.haml +++ b/app/views/projects/commit/show.html.haml @@ -2,7 +2,9 @@ - page_description @commit.description = render "projects/commits/header_title" -= render "commit_box" + +.prepend-top-default + = render "commit_box" - if @ci_commit = render "ci_menu" - else diff --git a/app/views/projects/commits/_head.html.haml b/app/views/projects/commits/_head.html.haml index fcccb002d7e..498c5e05b32 100644 --- a/app/views/projects/commits/_head.html.haml +++ b/app/views/projects/commits/_head.html.haml @@ -1,4 +1,4 @@ -%ul.center-top-menu +%ul.nav-links = nav_link(controller: [:commit, :commits]) do = link_to namespace_project_commits_path(@project.namespace, @project, current_ref) do Commits diff --git a/app/views/projects/graphs/_head.html.haml b/app/views/projects/graphs/_head.html.haml index a47643bd09c..79a56647c53 100644 --- a/app/views/projects/graphs/_head.html.haml +++ b/app/views/projects/graphs/_head.html.haml @@ -1,4 +1,4 @@ -%ul.center-top-menu +%ul.nav-links = nav_link(action: :show) do = link_to 'Contributors', namespace_project_graph_path = nav_link(action: :commits) do diff --git a/app/views/projects/merge_requests/_new_submit.html.haml b/app/views/projects/merge_requests/_new_submit.html.haml index a14943b15d3..dd2c59e112a 100644 --- a/app/views/projects/merge_requests/_new_submit.html.haml +++ b/app/views/projects/merge_requests/_new_submit.html.haml @@ -18,7 +18,7 @@ = f.hidden_field :target_branch .mr-compare.merge-request - %ul.merge-request-tabs.center-top-menu.no-top.no-bottom + %ul.merge-request-tabs.nav-links.no-top.no-bottom %li.commits-tab = link_to url_for(params), data: {target: 'div#commits', action: 'commits', toggle: 'tab'} do Commits diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml index 095876450a0..200bfa5ac4f 100644 --- a/app/views/projects/merge_requests/_show.html.haml +++ b/app/views/projects/merge_requests/_show.html.haml @@ -45,7 +45,7 @@ = link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal" - if @commits.present? - %ul.merge-request-tabs.center-top-menu.no-top.no-bottom + %ul.merge-request-tabs.nav-links.no-top.no-bottom %li.notes-tab = link_to namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: {target: 'div#notes', action: 'notes', toggle: 'tab'} do Discussion diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index 1670ea8741a..f258b75e01c 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -57,7 +57,7 @@ %span.pull-right= @milestone.expires_at = milestone_progress_bar(@milestone) -%ul.center-top-menu.no-top.no-bottom +%ul.nav-links.no-top.no-bottom %li.active = link_to '#tab-issues', 'data-toggle' => 'tab' do Issues diff --git a/app/views/projects/wikis/_nav.html.haml b/app/views/projects/wikis/_nav.html.haml index e6e6ad5bc4b..69ba301e231 100644 --- a/app/views/projects/wikis/_nav.html.haml +++ b/app/views/projects/wikis/_nav.html.haml @@ -7,7 +7,7 @@ = render 'projects/wikis/new' - %ul.center-top-menu + %ul.nav-links = nav_link(html_options: {class: params[:id] == 'home' ? 'active' : '' }) do = link_to 'Home', namespace_project_wiki_path(@project.namespace, @project, :home) diff --git a/app/views/shared/_milestones_filter.html.haml b/app/views/shared/_milestones_filter.html.haml index cbdecda4fff..f77feeb79cd 100644 --- a/app/views/shared/_milestones_filter.html.haml +++ b/app/views/shared/_milestones_filter.html.haml @@ -1,5 +1,5 @@ .milestones-filters - %ul.center-top-menu + %ul.nav-links %li{class: ("active" if params[:state].blank? || params[:state] == 'opened')} = link_to milestones_filter_path(state: 'opened') do Open diff --git a/app/views/shared/issuable/_filter.html.haml b/app/views/shared/issuable/_filter.html.haml index 0e3e9275fc1..8d6f47b38ef 100644 --- a/app/views/shared/issuable/_filter.html.haml +++ b/app/views/shared/issuable/_filter.html.haml @@ -1,6 +1,6 @@ .issues-filters .issues-state-filters - %ul.center-top-menu + %ul.nav-links - if defined?(type) && type == :merge_requests - page_context_word = 'merge requests' - else diff --git a/app/views/sherlock/queries/show.html.haml b/app/views/sherlock/queries/show.html.haml index 4a84348ac82..83f61ce4b07 100644 --- a/app/views/sherlock/queries/show.html.haml +++ b/app/views/sherlock/queries/show.html.haml @@ -1,7 +1,7 @@ - page_title t('sherlock.title'), t('sherlock.transaction'), t('sherlock.query') - header_title t('sherlock.title'), sherlock_transactions_path -%ul.center-top-menu +%ul.nav-links %li.active %a(href="#tab-general" data-toggle="tab") = t('sherlock.general') diff --git a/app/views/sherlock/transactions/show.html.haml b/app/views/sherlock/transactions/show.html.haml index 3c8ffb06648..9d4b0b2724c 100644 --- a/app/views/sherlock/transactions/show.html.haml +++ b/app/views/sherlock/transactions/show.html.haml @@ -1,7 +1,7 @@ - page_title t('sherlock.title'), t('sherlock.transaction') - header_title t('sherlock.title'), sherlock_transactions_path -%ul.center-top-menu +%ul.nav-links %li.active %a(href="#tab-general" data-toggle="tab") = t('sherlock.general') diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index ce17fc7bca1..e7848bf1333 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -74,7 +74,7 @@ .user-calendar-activities -%ul.center-top-menu.no-top.no-bottom.bottom-border.wide +%ul.nav-links.no-top.no-bottom.bottom-border.wide %li.active = link_to "#activity", 'data-toggle' => 'tab' do Activity -- cgit v1.2.1 From 96dda5f6ecba417118d80a0bdfa5c0a14e15a04c Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 13 Jan 2016 16:00:08 +0100 Subject: Update UI help page with only one nav-link example Signed-off-by: Dmitriy Zaporozhets --- app/views/help/ui.html.haml | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'app/views') diff --git a/app/views/help/ui.html.haml b/app/views/help/ui.html.haml index 65335c708fa..7b45bd09050 100644 --- a/app/views/help/ui.html.haml +++ b/app/views/help/ui.html.haml @@ -147,23 +147,6 @@ %li %a Closed - %h4 - %code .btn-group.btn-group-next - .example - %div.btn-group.btn-group-next - %a.btn.active Open - %a.btn Closed - - - %h4 - %code .nav.nav-tabs - .example - %ul.nav.nav-tabs - %li.active - %a Open - %li - %a Closed - %h2#buttons Buttons -- cgit v1.2.1 From 0673fad893e2cd457424bc730b1faa146e1f6f5f Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 13 Jan 2016 16:26:40 +0100 Subject: Apply new layout to user page Signed-off-by: Dmitriy Zaporozhets --- app/views/groups/show.html.haml | 7 +-- app/views/projects/show.html.haml | 6 +- app/views/users/show.html.haml | 127 +++++++++++++++++++------------------- 3 files changed, 71 insertions(+), 69 deletions(-) (limited to 'app/views') diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 4da70358766..5e39d3ab601 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -1,3 +1,6 @@ +- @no_container = true +- @blank_container = true + - unless can?(current_user, :read_group, @group) - @disable_search_panel = true @@ -5,9 +8,6 @@ - if current_user = auto_discovery_link_tag(:atom, group_url(@group, format: :atom, private_token: current_user.private_token), title: "#{@group.name} activity") -- @no_container = true -- @blank_container = true - .cover-block .cover-controls - if @group && can?(current_user, :admin_group, @group) @@ -39,7 +39,6 @@ Projects - if can?(current_user, :read_group, @group) - %div{ class: container_class } .tab-content .tab-pane.active#activity diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 25dcedf2b0b..65444e7e334 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -1,3 +1,6 @@ +- @no_container = true +- @blank_container = true + = content_for :meta_tags do - if current_user = auto_discovery_link_tag(:atom, namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), title: "#{@project.name} activity") @@ -7,9 +10,6 @@ = render 'shared/no_ssh' = render 'shared/no_password' -- @no_container = true -- @blank_container = true - = render 'projects/last_push' = render "home_panel" diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index e7848bf1333..284a62e6f47 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -1,6 +1,8 @@ - page_title @user.name - page_description @user.bio - header_title @user.name, user_path(@user) +- @no_container = true +- @blank_container = true = content_for :meta_tags do = auto_discovery_link_tag(:atom, user_url(@user, format: :atom), title: "#{@user.name} activity") @@ -8,6 +10,25 @@ = render 'shared/show_aside' .cover-block + .cover-controls + - if @user == current_user + = link_to profile_path, class: 'btn btn-gray' do + = icon('pencil') + - elsif current_user + %span.report-abuse + - if @user.abuse_report + %button.btn.btn-danger{ title: 'Already reported for abuse', + data: { toggle: 'tooltip', placement: 'left', container: 'body' }} + = icon('exclamation-circle') + - else + = link_to new_abuse_report_path(user_id: @user.id), class: 'btn btn-gray', + title: 'Report abuse', data: {toggle: 'tooltip', placement: 'left', container: 'body'} do + = icon('exclamation-circle') + - if current_user +   + = link_to user_path(@user, :atom, { private_token: current_user.private_token }), class: 'btn btn-gray' do + = icon('rss') + .avatar-holder = link_to avatar_icon(@user, 400), target: '_blank' do = image_tag avatar_icon(@user, 90), class: "avatar s90", alt: '' @@ -47,74 +68,56 @@ = icon('map-marker') = @user.location + %ul.nav-links.center + %li.active + = link_to "#activity", 'data-toggle' => 'tab' do + Activity + - if @groups.any? + %li + = link_to "#groups", 'data-toggle' => 'tab' do + Groups + - if @contributed_projects.present? + %li + = link_to "#contributed", 'data-toggle' => 'tab' do + Contributed projects + - if @projects.present? + %li + = link_to "#personal", 'data-toggle' => 'tab' do + Personal projects - .cover-controls - - if @user == current_user - = link_to profile_path, class: 'btn btn-gray' do - = icon('pencil') - - elsif current_user - %span.report-abuse - - if @user.abuse_report - %button.btn.btn-danger{ title: 'Already reported for abuse', - data: { toggle: 'tooltip', placement: 'left', container: 'body' }} - = icon('exclamation-circle') - - else - = link_to new_abuse_report_path(user_id: @user.id), class: 'btn btn-gray', - title: 'Report abuse', data: {toggle: 'tooltip', placement: 'left', container: 'body'} do - = icon('exclamation-circle') - - if current_user -   - = link_to user_path(@user, :atom, { private_token: current_user.private_token }), class: 'btn btn-gray' do - = icon('rss') - -.gray-content-block.second-block - .user-calendar - %h4.center.light - %i.fa.fa-spinner.fa-spin - .user-calendar-activities - +%div{ class: container_class } + .tab-content + .tab-pane.active#activity + .gray-content-block.white.second-block + %div{ class: container_class } + .user-calendar + %h4.center.light + %i.fa.fa-spinner.fa-spin + .user-calendar-activities -%ul.nav-links.no-top.no-bottom.bottom-border.wide - %li.active - = link_to "#activity", 'data-toggle' => 'tab' do - Activity - - if @groups.any? - %li - = link_to "#groups", 'data-toggle' => 'tab' do - Groups - - if @contributed_projects.present? - %li - = link_to "#contributed", 'data-toggle' => 'tab' do - Contributed projects - - if @projects.present? - %li - = link_to "#personal", 'data-toggle' => 'tab' do - Personal projects -.tab-content - .tab-pane.active#activity - .content_list - = spinner + .content_list + = spinner - - if @groups.any? - .tab-pane#groups - %ul.content-list - - @groups.each do |group| - = render 'shared/groups/group', group: group + - if @groups.any? + .tab-pane#groups + %ul.content-list + - @groups.each do |group| + = render 'shared/groups/group', group: group - - if @contributed_projects.present? - .tab-pane#contributed - .contributed-projects - = render 'shared/projects/list', - projects: @contributed_projects.sort_by(&:star_count).reverse, - projects_limit: 5, stars: true, avatar: true + - if @contributed_projects.present? + .tab-pane#contributed + .contributed-projects + = render 'shared/projects/list', + projects: @contributed_projects.sort_by(&:star_count).reverse, + projects_limit: 10, stars: true, avatar: true - - if @projects.present? - .tab-pane#personal - .personal-projects - = render 'shared/projects/list', - projects: @projects.sort_by(&:star_count).reverse, - projects_limit: 10, stars: true, avatar: true + - if @projects.present? + .tab-pane#personal + .personal-projects + = render 'shared/projects/list', + projects: @projects.sort_by(&:star_count).reverse, + projects_limit: 10, stars: true, avatar: true :javascript $(".user-calendar").load("#{user_calendar_path}"); -- cgit v1.2.1 From 3238b0bc9fddd1a00d4926a7679c454db03d6fed Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 13 Jan 2016 17:13:36 +0100 Subject: Replace nav-tabs with nav-links Signed-off-by: Dmitriy Zaporozhets --- app/views/admin/logs/show.html.haml | 5 +++-- app/views/admin/users/_head.html.haml | 3 ++- app/views/devise/shared/_signin_box.html.haml | 2 +- app/views/search/_category.html.haml | 2 +- app/views/search/_results.html.haml | 2 +- app/views/search/show.html.haml | 4 +++- 6 files changed, 11 insertions(+), 7 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/logs/show.html.haml b/app/views/admin/logs/show.html.haml index 1484baa78e0..af9fdeb0734 100644 --- a/app/views/admin/logs/show.html.haml +++ b/app/views/admin/logs/show.html.haml @@ -1,12 +1,13 @@ - page_title "Logs" - loggers = [Gitlab::GitLogger, Gitlab::AppLogger, Gitlab::ProductionLogger, Gitlab::SidekiqLogger] -%ul.nav.nav-tabs.log-tabs +%ul.nav-links.log-tabs - loggers.each do |klass| %li{ class: (klass == Gitlab::GitLogger ? 'active' : '') } = link_to klass::file_name, "##{klass::file_name_noext}", 'data-toggle' => 'tab' -%p.light To prevent performance issues admin logs output the last 2000 lines +.gray-content-block + To prevent performance issues admin logs output the last 2000 lines .tab-content - loggers.each do |klass| .tab-pane{ class: (klass == Gitlab::GitLogger ? 'active' : ''), diff --git a/app/views/admin/users/_head.html.haml b/app/views/admin/users/_head.html.haml index bc44b1b1d8e..ce5e21e54cc 100644 --- a/app/views/admin/users/_head.html.haml +++ b/app/views/admin/users/_head.html.haml @@ -12,7 +12,7 @@ %i.fa.fa-pencil-square-o Edit %hr -%ul.nav.nav-tabs +%ul.nav-links = nav_link(path: 'users#show') do = link_to "Account", admin_user_path(@user) = nav_link(path: 'users#groups') do @@ -23,3 +23,4 @@ = link_to "SSH keys", keys_admin_user_path(@user) = nav_link(controller: :identities) do = link_to "Identities", admin_user_identities_path(@user) +.append-bottom-default diff --git a/app/views/devise/shared/_signin_box.html.haml b/app/views/devise/shared/_signin_box.html.haml index 41ad2c231d4..2c15e2c4891 100644 --- a/app/views/devise/shared/_signin_box.html.haml +++ b/app/views/devise/shared/_signin_box.html.haml @@ -7,7 +7,7 @@ %h3 Sign in .login-body - if form_based_providers.any? - %ul.nav.nav-tabs + %ul.nav-links - if crowd_enabled? %li.active = link_to "Crowd", "#tab-crowd", 'data-toggle' => 'tab' diff --git a/app/views/search/_category.html.haml b/app/views/search/_category.html.haml index 481451edb23..2c3fca439f3 100644 --- a/app/views/search/_category.html.haml +++ b/app/views/search/_category.html.haml @@ -1,4 +1,4 @@ -%ul.nav.nav-tabs.search-filter +%ul.nav-links.search-filter - if @project %li{class: ("active" if @scope == 'blobs')} = link_to search_filter_path(scope: 'blobs') do diff --git a/app/views/search/_results.html.haml b/app/views/search/_results.html.haml index 2a38c98dcfc..d0e64537621 100644 --- a/app/views/search/_results.html.haml +++ b/app/views/search/_results.html.haml @@ -1,7 +1,7 @@ - if @search_results.empty? = render partial: "search/results/empty" - else - %p.light + .gray-content-block Search results for %code = @search_term diff --git a/app/views/search/show.html.haml b/app/views/search/show.html.haml index f4f3dcfc29f..215dbb3909e 100644 --- a/app/views/search/show.html.haml +++ b/app/views/search/show.html.haml @@ -1,5 +1,7 @@ - page_title @search_term -= render 'search/form' + +.prepend-top-default + = render 'search/form' - if @search_term = render 'search/category' = render 'search/results' -- cgit v1.2.1 From f956514b109fc5628b397ff8f507bb4c37d5b115 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 13 Jan 2016 17:26:45 +0100 Subject: Dont use nav-pills. Instead use nav-lists Signed-off-by: Dmitriy Zaporozhets --- app/views/admin/users/index.html.haml | 187 +++++++++++++++++----------------- app/views/projects/show.html.haml | 2 +- 2 files changed, 92 insertions(+), 97 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index a92c9c152b9..4fc0ee78117 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -1,101 +1,96 @@ - page_title "Users" = render 'shared/show_aside' -.row - %aside.col-md-3 - .admin-filter - %ul.nav.nav-pills.nav-stacked - %li{class: "#{'active' unless params[:filter]}"} - = link_to admin_users_path do - Active - %small.pull-right= number_with_delimiter(User.active.count) - %li{class: "#{'active' if params[:filter] == "admins"}"} - = link_to admin_users_path(filter: "admins") do - Admins - %small.pull-right= number_with_delimiter(User.admins.count) - %li.filter-two-factor-enabled{class: "#{'active' if params[:filter] == 'two_factor_enabled'}"} - = link_to admin_users_path(filter: 'two_factor_enabled') do - 2FA Enabled - %small.pull-right= number_with_delimiter(User.with_two_factor.count) - %li.filter-two-factor-disabled{class: "#{'active' if params[:filter] == 'two_factor_disabled'}"} - = link_to admin_users_path(filter: 'two_factor_disabled') do - 2FA Disabled - %small.pull-right= number_with_delimiter(User.without_two_factor.count) - %li{class: "#{'active' if params[:filter] == "blocked"}"} - = link_to admin_users_path(filter: "blocked") do - Blocked - %small.pull-right= number_with_delimiter(User.blocked.count) - %li{class: "#{'active' if params[:filter] == "wop"}"} - = link_to admin_users_path(filter: "wop") do - Without projects - %small.pull-right= number_with_delimiter(User.without_projects.count) - %hr - = form_tag admin_users_path, method: :get, class: 'form-inline' do - .form-group - = search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control', spellcheck: false - = hidden_field_tag "filter", params[:filter] - = button_tag class: 'btn btn-primary' do - %i.fa.fa-search - %hr - = link_to 'Reset', admin_users_path, class: "btn btn-cancel" +.admin-filter + %ul.nav-links + %li{class: "#{'active' unless params[:filter]}"} + = link_to admin_users_path do + Active + %small.badge= number_with_delimiter(User.active.count) + %li{class: "#{'active' if params[:filter] == "admins"}"} + = link_to admin_users_path(filter: "admins") do + Admins + %small.badge= number_with_delimiter(User.admins.count) + %li.filter-two-factor-enabled{class: "#{'active' if params[:filter] == 'two_factor_enabled'}"} + = link_to admin_users_path(filter: 'two_factor_enabled') do + 2FA Enabled + %small.badge= number_with_delimiter(User.with_two_factor.count) + %li.filter-two-factor-disabled{class: "#{'active' if params[:filter] == 'two_factor_disabled'}"} + = link_to admin_users_path(filter: 'two_factor_disabled') do + 2FA Disabled + %small.badge= number_with_delimiter(User.without_two_factor.count) + %li{class: "#{'active' if params[:filter] == "blocked"}"} + = link_to admin_users_path(filter: "blocked") do + Blocked + %small.badge= number_with_delimiter(User.blocked.count) + %li{class: "#{'active' if params[:filter] == "wop"}"} + = link_to admin_users_path(filter: "wop") do + Without projects + %small.badge= number_with_delimiter(User.without_projects.count) - %section.col-md-9 - .panel.panel-default - .panel-heading - Users (#{number_with_delimiter(@users.total_count)}) - .panel-head-actions - .dropdown.inline - %a.dropdown-toggle.btn.btn-sm{href: '#', "data-toggle" => "dropdown"} - %span.light sort: - - if @sort.present? - = sort_options_hash[@sort] - - else - = sort_title_name - %b.caret - %ul.dropdown-menu - %li - = link_to admin_users_path(sort: sort_value_name, filter: params[:filter]) do - = sort_title_name - = link_to admin_users_path(sort: sort_value_recently_signin, filter: params[:filter]) do - = sort_title_recently_signin - = link_to admin_users_path(sort: sort_value_oldest_signin, filter: params[:filter]) do - = sort_title_oldest_signin - = link_to admin_users_path(sort: sort_value_recently_created, filter: params[:filter]) do - = sort_title_recently_created - = link_to admin_users_path(sort: sort_value_oldest_created, filter: params[:filter]) do - = sort_title_oldest_created - = link_to admin_users_path(sort: sort_value_recently_updated, filter: params[:filter]) do - = sort_title_recently_updated - = link_to admin_users_path(sort: sort_value_oldest_updated, filter: params[:filter]) do - = sort_title_oldest_updated - - = link_to 'New User', new_admin_user_path, class: "btn btn-new btn-sm" - %ul.well-list - - @users.each do |user| + .gray-content-block.second-block + .pull-right + .dropdown.inline + %a.dropdown-toggle.btn{href: '#', "data-toggle" => "dropdown"} + %span.light sort: + - if @sort.present? + = sort_options_hash[@sort] + - else + = sort_title_name + %b.caret + %ul.dropdown-menu %li - .list-item-name - - if user.blocked? - %i.fa.fa-lock.cred - - else - %i.fa.fa-user.cgreen - = link_to user.name, [:admin, user] - - if user.admin? - %strong.cred (Admin) - - if user == current_user - %span.cred It's you! - .pull-right - %span.light - %i.fa.fa-envelope - = mail_to user.email, user.email, class: 'light' -   - = link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn btn-xs" - - unless user == current_user - - if user.blocked? - = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success" - - else - = link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-xs btn-warning" - - if user.access_locked? - = link_to 'Unlock', unlock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success", data: { confirm: 'Are you sure?' } - - if user.can_be_removed? - = link_to 'Destroy', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! All issues, merge requests and groups linked to this user will also be removed! Maybe block the user instead? Are you sure?" }, method: :delete, class: "btn btn-xs btn-remove" - = paginate @users, theme: "gitlab" + = link_to admin_users_path(sort: sort_value_name, filter: params[:filter]) do + = sort_title_name + = link_to admin_users_path(sort: sort_value_recently_signin, filter: params[:filter]) do + = sort_title_recently_signin + = link_to admin_users_path(sort: sort_value_oldest_signin, filter: params[:filter]) do + = sort_title_oldest_signin + = link_to admin_users_path(sort: sort_value_recently_created, filter: params[:filter]) do + = sort_title_recently_created + = link_to admin_users_path(sort: sort_value_oldest_created, filter: params[:filter]) do + = sort_title_oldest_created + = link_to admin_users_path(sort: sort_value_recently_updated, filter: params[:filter]) do + = sort_title_recently_updated + = link_to admin_users_path(sort: sort_value_oldest_updated, filter: params[:filter]) do + = sort_title_oldest_updated + + = link_to 'New User', new_admin_user_path, class: "btn btn-new" + = form_tag admin_users_path, method: :get, class: 'form-inline' do + .form-group + = search_field_tag :name, params[:name], placeholder: 'Name, email or username', class: 'form-control', spellcheck: false + = hidden_field_tag "filter", params[:filter] + = button_tag class: 'btn btn-primary' do + %i.fa.fa-search + + +.panel.panel-default + %ul.well-list + - @users.each do |user| + %li + .list-item-name + - if user.blocked? + %i.fa.fa-lock.cred + - else + %i.fa.fa-user.cgreen + = link_to user.name, [:admin, user] + - if user.admin? + %strong.cred (Admin) + - if user == current_user + %span.cred It's you! + .pull-right + %span.light + %i.fa.fa-envelope + = mail_to user.email, user.email, class: 'light' +   + = link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn btn-xs" + - unless user == current_user + - if user.blocked? + = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success" + - else + = link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-xs btn-warning" + - if user.access_locked? + = link_to 'Unlock', unlock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success", data: { confirm: 'Are you sure?' } + - if user.can_be_removed? + = link_to 'Destroy', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! All issues, merge requests and groups linked to this user will also be removed! Maybe block the user instead? Are you sure?" }, method: :delete, class: "btn btn-xs btn-remove" += paginate @users, theme: "gitlab" diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 65444e7e334..797bee708bd 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -14,7 +14,7 @@ = render "home_panel" .project-stats.gray-content-block.second-block - %ul.nav.nav-pills + %ul.nav %li = link_to namespace_project_commits_path(@project.namespace, @project, current_ref) do = pluralize(number_with_delimiter(@project.commit_count), 'commit') -- cgit v1.2.1 From fc7e6e8ffcb76e92b625b6490a966c830adc750a Mon Sep 17 00:00:00 2001 From: Gabriel Mazetto Date: Thu, 14 Jan 2016 03:08:40 -0200 Subject: Fix Admin/Users view to position buttons without spacing magic --- app/views/admin/users/index.html.haml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index 911c4d0cf12..8312642b6c3 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -88,19 +88,19 @@ %i.fa.fa-envelope = mail_to user.email, user.email, class: 'light'   - = link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: "btn btn-xs" - - unless user == current_user - - if user.ldap_blocked? - = link_to '#', title: 'Cannot unblock LDAP blocked users', data: {toggle: 'tooltip'}, class: 'btn btn-xs btn-success disabled' do - %i.fa.fa-lock - Unblock - = '' - - elsif user.blocked? - = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success" - - else - = link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "btn btn-xs btn-warning" - - if user.access_locked? - = link_to 'Unlock', unlock_admin_user_path(user), method: :put, class: "btn btn-xs btn-success", data: { confirm: 'Are you sure?' } - - if user.can_be_removed? - = link_to 'Destroy', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! All issues, merge requests and groups linked to this user will also be removed! Maybe block the user instead? Are you sure?" }, method: :delete, class: "btn btn-xs btn-remove" + .pull-right + = link_to 'Edit', edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: 'btn-grouped btn btn-xs' + - unless user == current_user + - if user.ldap_blocked? + = link_to '#', title: 'Cannot unblock LDAP blocked users', data: {toggle: 'tooltip'}, class: 'btn-grouped btn btn-xs btn-success disabled' do + %i.fa.fa-lock + Unblock + - elsif user.blocked? + = link_to 'Unblock', unblock_admin_user_path(user), method: :put, class: 'btn-grouped btn btn-xs btn-success' + - else + = link_to 'Block', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: 'btn-grouped btn btn-xs btn-warning' + - if user.access_locked? + = link_to 'Unlock', unlock_admin_user_path(user), method: :put, class: 'btn-grouped btn btn-xs btn-success', data: { confirm: 'Are you sure?' } + - if user.can_be_removed? + = link_to 'Destroy', [:admin, user], data: { confirm: "USER #{user.name} WILL BE REMOVED! All issues, merge requests and groups linked to this user will also be removed! Maybe block the user instead? Are you sure?" }, method: :delete, class: 'btn-grouped btn btn-xs btn-remove' = paginate @users, theme: "gitlab" -- cgit v1.2.1 From 818607f0115a2c67792fa83e9b39d74c443a8856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Thu, 14 Jan 2016 09:41:11 +0100 Subject: Improve the consistency of commit titles, branch names, tag names, issue/MR titles, on their respective project pages --- app/views/projects/branches/_branch.html.haml | 2 +- app/views/projects/commits/_commit.html.haml | 2 +- app/views/projects/tags/_tag.html.haml | 2 +- app/views/projects/tags/show.html.haml | 4 ++-- app/views/shared/groups/_group.html.haml | 3 +-- 5 files changed, 6 insertions(+), 7 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index a234536723e..d276e5932d1 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -6,7 +6,7 @@ %li(class="js-branch-#{branch.name}") %div = link_to namespace_project_tree_path(@project.namespace, @project, branch.name) do - %strong.str-truncated= branch.name + .branch-name.str-truncated= branch.name   - if branch.name == @repository.root_ref %span.label.label-primary default diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index 012825f0fdb..4d4b410ee29 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -11,7 +11,7 @@ = cache(cache_key) do %li.commit.js-toggle-container{ id: "commit-#{commit.short_id}" } .commit-row-title - %strong.str-truncated + .commit-title.str-truncated = link_to_gfm commit.title, namespace_project_commit_path(project.namespace, project, commit.id), class: "commit-row-message" - if commit.description? %a.text-expander.js-toggle-button ... diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml index 28b706c5c7e..56a7ced1236 100644 --- a/app/views/projects/tags/_tag.html.haml +++ b/app/views/projects/tags/_tag.html.haml @@ -3,7 +3,7 @@ %li %div = link_to namespace_project_tag_path(@project.namespace, @project, tag.name) do - %strong + .tag-name = icon('tag') = tag.name - if tag.message.present? diff --git a/app/views/projects/tags/show.html.haml b/app/views/projects/tags/show.html.haml index b594d4f1f27..dbb20347860 100644 --- a/app/views/projects/tags/show.html.haml +++ b/app/views/projects/tags/show.html.haml @@ -17,8 +17,8 @@ .pull-right = link_to namespace_project_tag_path(@project.namespace, @project, @tag.name), class: 'btn btn-remove remove-row grouped has_tooltip', title: "Delete tag", method: :delete, data: { confirm: "Deleting the '#{@tag.name}' tag cannot be undone. Are you sure?" } do %i.fa.fa-trash-o - .title - %strong= @tag.name + .tag-name.title + = @tag.name - if @tag.message.present? %span.light   diff --git a/app/views/shared/groups/_group.html.haml b/app/views/shared/groups/_group.html.haml index a54c5fa8c33..f4cfa29ae56 100644 --- a/app/views/shared/groups/_group.html.haml +++ b/app/views/shared/groups/_group.html.haml @@ -10,8 +10,7 @@ %i.fa.fa-sign-out = image_tag group_icon(group), class: "avatar s46 hidden-xs" - = link_to group, class: 'group-name' do - %strong= group.name + = link_to group.name, group, class: 'group-name' - if group_member as -- cgit v1.2.1 From 966c4f33929ac25e0d1b0d545dd4b372c2d6d0f4 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 14 Jan 2016 11:55:15 +0100 Subject: Fix files, project settings and few more pages with new layout Signed-off-by: Dmitriy Zaporozhets --- app/views/projects/edit.html.haml | 2 +- app/views/projects/runners/index.html.haml | 3 ++- app/views/projects/tree/_tree_content.html.haml | 2 +- app/views/projects/tree/show.html.haml | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 31e752c6649..8a99aceef7f 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -1,6 +1,6 @@ - @blank_container = true -.project-edit-container +.project-edit-container.prepend-top-default .project-edit-errors .project-edit-content .panel.panel-default diff --git a/app/views/projects/runners/index.html.haml b/app/views/projects/runners/index.html.haml index 315afe4a764..2d5b9f43c24 100644 --- a/app/views/projects/runners/index.html.haml +++ b/app/views/projects/runners/index.html.haml @@ -1,5 +1,6 @@ - page_title "Runners" -.light + +.light.prepend-top-default %p A 'runner' is a process which runs a build. You can setup as many runners as you need. diff --git a/app/views/projects/tree/_tree_content.html.haml b/app/views/projects/tree/_tree_content.html.haml index 1927883513a..558e6146ae9 100644 --- a/app/views/projects/tree/_tree_content.html.haml +++ b/app/views/projects/tree/_tree_content.html.haml @@ -1,6 +1,6 @@ %div.tree-content-holder .table-holder - %table.table#tree-slider{class: "table_#{@hex_path} tree-table table-striped" } + %table.table#tree-slider{class: "table_#{@hex_path} tree-table" } %thead %tr %th Name diff --git a/app/views/projects/tree/show.html.haml b/app/views/projects/tree/show.html.haml index c57570afa09..91fb2a44594 100644 --- a/app/views/projects/tree/show.html.haml +++ b/app/views/projects/tree/show.html.haml @@ -5,13 +5,13 @@ = auto_discovery_link_tag(:atom, namespace_project_commits_url(@project.namespace, @project, @ref, format: :atom, private_token: current_user.private_token), title: "#{@project.name}:#{@ref} commits") = render 'projects/last_push' -.pull-right +.tree-controls = render 'projects/find_file_link' - if can? current_user, :download_code, @project = render 'projects/repositories/download_archive', ref: @ref, btn_class: 'hidden-xs hidden-sm btn-grouped', split_button: true #tree-holder.tree-holder.clearfix - .gray-content-block.top-block + .nav-block = render 'projects/tree/tree_header', tree: @tree = render 'projects/tree/tree_content', tree: @tree -- cgit v1.2.1 From bb5213588befb5864793ac1f0cc43c80d378735b Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 14 Jan 2016 12:31:31 +0100 Subject: Update files/diffs to match new layout Signed-off-by: Dmitriy Zaporozhets --- app/views/profiles/accounts/show.html.haml | 2 +- app/views/projects/_files.html.haml | 2 +- app/views/projects/blob/_blob.html.haml | 2 +- app/views/projects/commit/_commit_box.html.haml | 2 +- app/views/projects/commits/show.html.haml | 2 +- app/views/projects/diffs/_diffs.html.haml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'app/views') diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml index 17e47c622ce..a42fd38de3a 100644 --- a/app/views/profiles/accounts/show.html.haml +++ b/app/views/profiles/accounts/show.html.haml @@ -6,7 +6,7 @@ .alert.alert-info Some options are unavailable for LDAP accounts -.account-page +.account-page.prepend-top-default .panel.panel-default.update-token .panel-heading Reset Private token diff --git a/app/views/projects/_files.html.haml b/app/views/projects/_files.html.haml index fa978325ddd..96c2fa87f45 100644 --- a/app/views/projects/_files.html.haml +++ b/app/views/projects/_files.html.haml @@ -1,5 +1,5 @@ #tree-holder.tree-holder.clearfix - .gray-content-block.second-block + .nav-block = render 'projects/tree/tree_header', tree: @tree = render 'projects/tree/tree_content', tree: @tree diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml index 2a3315da3db..3d8d88834e2 100644 --- a/app/views/projects/blob/_blob.html.haml +++ b/app/views/projects/blob/_blob.html.haml @@ -1,4 +1,4 @@ -.gray-content-block.top-block +.nav-block .tree-ref-holder = render 'shared/ref_switcher', destination: 'blob', path: @path diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index ddb77fd796b..bbe820b8842 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -50,7 +50,7 @@ .commit-info-row.branches %i.fa.fa-spinner.fa-spin -.commit-box.gray-content-block.middle-block +.commit-box.content-block %h3.commit-title = markdown escape_once(@commit.title), pipeline: :single_line - if @commit.description.present? diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index 034057da42e..ede64d47ab3 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -6,7 +6,7 @@ = render "head" -.gray-content-block +.gray-content-block.second-block .tree-ref-holder = render 'shared/ref_switcher', destination: 'commits' diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index f9d661d59d2..f67058ae0ba 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -3,7 +3,7 @@ - diff_files = safe_diff_files(diffs) -.gray-content-block.middle-block.oneline-block +.content-block.oneline-block .inline-parallel-buttons .btn-group = inline_diff_btn -- cgit v1.2.1 From 9c69c899410f9cb853f461dc1e997232bd4d47d3 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Thu, 14 Jan 2016 12:48:02 +0100 Subject: Add margin to pages where is no header Signed-off-by: Dmitriy Zaporozhets --- app/views/groups/edit.html.haml | 2 +- app/views/groups/group_members/index.html.haml | 2 +- app/views/groups/projects.html.haml | 2 +- app/views/projects/project_members/index.html.haml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/views') diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index 7e3e2e28bc9..e2f97fd9337 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -1,7 +1,7 @@ - header_title group_title(@group, "Settings", edit_group_path(@group)) - @blank_container = true -.panel.panel-default +.panel.panel-default.prepend-top-default .panel-heading Group settings .panel-body diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index 335bf036074..6a8acc42af9 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -2,7 +2,7 @@ - header_title group_title(@group, "Members", group_group_members_path(@group)) - @blank_container = true -.group-members-page +.group-members-page.prepend-top-default - if current_user && current_user.can?(:admin_group_member, @group) .panel.panel-default .panel-heading diff --git a/app/views/groups/projects.html.haml b/app/views/groups/projects.html.haml index f1d507a50c7..9ca11ed1177 100644 --- a/app/views/groups/projects.html.haml +++ b/app/views/groups/projects.html.haml @@ -1,7 +1,7 @@ - page_title "Projects" - header_title group_title(@group, "Projects", projects_group_path(@group)) -.panel.panel-default +.panel.panel-default.prepend-top-default .panel-heading %strong= @group.name projects: diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index 29225a36364..6239a148905 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -2,7 +2,7 @@ = render "header_title" - @blank_container = true -.project-members-page +.project-members-page.prepend-top-default - if can?(current_user, :admin_project_member, @project) .panel.panel-default .panel-heading -- cgit v1.2.1 From a96d45c694bd8fe7d07283d0b46725ca8e4c281b Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Thu, 17 Dec 2015 15:17:00 +0100 Subject: Add view action to artifacts controller --- app/views/projects/builds/artifacts/view.html.haml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 app/views/projects/builds/artifacts/view.html.haml (limited to 'app/views') diff --git a/app/views/projects/builds/artifacts/view.html.haml b/app/views/projects/builds/artifacts/view.html.haml new file mode 100644 index 00000000000..bb669ac8ba1 --- /dev/null +++ b/app/views/projects/builds/artifacts/view.html.haml @@ -0,0 +1,4 @@ +- page_title "#{@build.name} (##{@build.id})", 'Build artifacts' +- header_title project_title(@project, "Build artifacts", namespace_project_build_path(@project.namespace, @project, @build)) + += @metadata.inspect -- cgit v1.2.1 From f091272f1982dfe977c9f366e4127fbbe0314f4a Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Fri, 18 Dec 2015 08:41:16 +0100 Subject: Move artifacts controller level up This reverts nesting artifacts controller in builds module. --- app/views/projects/artifacts/browse.html.haml | 4 ++++ app/views/projects/builds/artifacts/view.html.haml | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 app/views/projects/artifacts/browse.html.haml delete mode 100644 app/views/projects/builds/artifacts/view.html.haml (limited to 'app/views') diff --git a/app/views/projects/artifacts/browse.html.haml b/app/views/projects/artifacts/browse.html.haml new file mode 100644 index 00000000000..bb669ac8ba1 --- /dev/null +++ b/app/views/projects/artifacts/browse.html.haml @@ -0,0 +1,4 @@ +- page_title "#{@build.name} (##{@build.id})", 'Build artifacts' +- header_title project_title(@project, "Build artifacts", namespace_project_build_path(@project.namespace, @project, @build)) + += @metadata.inspect diff --git a/app/views/projects/builds/artifacts/view.html.haml b/app/views/projects/builds/artifacts/view.html.haml deleted file mode 100644 index bb669ac8ba1..00000000000 --- a/app/views/projects/builds/artifacts/view.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -- page_title "#{@build.name} (##{@build.id})", 'Build artifacts' -- header_title project_title(@project, "Build artifacts", namespace_project_build_path(@project.namespace, @project, @build)) - -= @metadata.inspect -- cgit v1.2.1 From 5a1faf61f6d8bdbdde1842db8cf13521287ed168 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 21 Dec 2015 12:53:31 +0100 Subject: Add artifacts browser This implementation makes it possible to browse artifacts, it depends on artifacts metadata. --- app/views/projects/artifacts/_tree_directory.html.haml | 5 +++++ app/views/projects/artifacts/_tree_file.html.haml | 5 +++++ app/views/projects/artifacts/browse.html.haml | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 app/views/projects/artifacts/_tree_directory.html.haml create mode 100644 app/views/projects/artifacts/_tree_file.html.haml (limited to 'app/views') diff --git a/app/views/projects/artifacts/_tree_directory.html.haml b/app/views/projects/artifacts/_tree_directory.html.haml new file mode 100644 index 00000000000..a53001567c3 --- /dev/null +++ b/app/views/projects/artifacts/_tree_directory.html.haml @@ -0,0 +1,5 @@ +%tr{ class: 'tree-item' } + %td.tree-item-file-name + = tree_icon('folder', '755', directory.basename) + %span.str-truncated + = link_to directory.basename, browse_namespace_project_build_artifacts_path(@project.namespace, @project, @build, path: directory.path) diff --git a/app/views/projects/artifacts/_tree_file.html.haml b/app/views/projects/artifacts/_tree_file.html.haml new file mode 100644 index 00000000000..ad42162b50a --- /dev/null +++ b/app/views/projects/artifacts/_tree_file.html.haml @@ -0,0 +1,5 @@ +%tr{ class: 'tree-item' } + %td.tree-item-file-name + = tree_icon('file', '664', file.basename) + %span.str-truncated + = file.basename diff --git a/app/views/projects/artifacts/browse.html.haml b/app/views/projects/artifacts/browse.html.haml index bb669ac8ba1..6dae7a9efa6 100644 --- a/app/views/projects/artifacts/browse.html.haml +++ b/app/views/projects/artifacts/browse.html.haml @@ -1,4 +1,6 @@ - page_title "#{@build.name} (##{@build.id})", 'Build artifacts' - header_title project_title(@project, "Build artifacts", namespace_project_build_path(@project.namespace, @project, @build)) -= @metadata.inspect +%table.table.table-hover + = render partial: 'tree_directory', collection: @path.directories, as: :directory + = render partial: 'tree_file', collection: @path.files, as: :file -- cgit v1.2.1 From aae674c3a2bbe3e3c2303be0174fda785abb11d4 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 21 Dec 2015 14:50:03 +0100 Subject: Improve CI build artifacts browser view --- .../projects/artifacts/_tree_directory.html.haml | 1 + app/views/projects/artifacts/_tree_file.html.haml | 3 +++ app/views/projects/artifacts/browse.html.haml | 20 +++++++++++++++++--- 3 files changed, 21 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/artifacts/_tree_directory.html.haml b/app/views/projects/artifacts/_tree_directory.html.haml index a53001567c3..ec68c45865e 100644 --- a/app/views/projects/artifacts/_tree_directory.html.haml +++ b/app/views/projects/artifacts/_tree_directory.html.haml @@ -3,3 +3,4 @@ = tree_icon('folder', '755', directory.basename) %span.str-truncated = link_to directory.basename, browse_namespace_project_build_artifacts_path(@project.namespace, @project, @build, path: directory.path) + %td diff --git a/app/views/projects/artifacts/_tree_file.html.haml b/app/views/projects/artifacts/_tree_file.html.haml index ad42162b50a..ff30acc2957 100644 --- a/app/views/projects/artifacts/_tree_file.html.haml +++ b/app/views/projects/artifacts/_tree_file.html.haml @@ -3,3 +3,6 @@ = tree_icon('file', '664', file.basename) %span.str-truncated = file.basename + %td + = link_to '', class: 'btn btn-xs btn-default' do + = icon('download') diff --git a/app/views/projects/artifacts/browse.html.haml b/app/views/projects/artifacts/browse.html.haml index 6dae7a9efa6..ddca02d2bed 100644 --- a/app/views/projects/artifacts/browse.html.haml +++ b/app/views/projects/artifacts/browse.html.haml @@ -1,6 +1,20 @@ - page_title "#{@build.name} (##{@build.id})", 'Build artifacts' - header_title project_title(@project, "Build artifacts", namespace_project_build_path(@project.namespace, @project, @build)) -%table.table.table-hover - = render partial: 'tree_directory', collection: @path.directories, as: :directory - = render partial: 'tree_file', collection: @path.files, as: :file +#tree-holder.tree-holder + .gray-content-block.top-block.clearfix + .pull-right + = link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, @build), + class: 'btn btn-default', method: :get do + = icon('download') + Download artifacts archive + +%div.tree-content-holder + .table-holder + %table.table.tree-table.table-striped + %thead + %tr + %th Name + %th Download + = render partial: 'tree_directory', collection: @path.directories, as: :directory + = render partial: 'tree_file', collection: @path.files, as: :file -- cgit v1.2.1 From b19e958d86f5363057f006c8dbf9a8e8762618b9 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 22 Dec 2015 11:05:22 +0100 Subject: Add support for parent directories in `StringPath` This support is not completed though, as parent directory that is first in collection returned by `directories!` is not iterable yet. --- app/views/projects/artifacts/_tree_directory.html.haml | 4 ++-- app/views/projects/artifacts/browse.html.haml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/artifacts/_tree_directory.html.haml b/app/views/projects/artifacts/_tree_directory.html.haml index ec68c45865e..481a2cb072f 100644 --- a/app/views/projects/artifacts/_tree_directory.html.haml +++ b/app/views/projects/artifacts/_tree_directory.html.haml @@ -1,6 +1,6 @@ %tr{ class: 'tree-item' } %td.tree-item-file-name - = tree_icon('folder', '755', directory.basename) + = tree_icon('folder', '755', directory.name) %span.str-truncated - = link_to directory.basename, browse_namespace_project_build_artifacts_path(@project.namespace, @project, @build, path: directory.path) + = link_to directory.name, browse_namespace_project_build_artifacts_path(@project.namespace, @project, @build, path: directory.path) %td diff --git a/app/views/projects/artifacts/browse.html.haml b/app/views/projects/artifacts/browse.html.haml index ddca02d2bed..141fea9a6d4 100644 --- a/app/views/projects/artifacts/browse.html.haml +++ b/app/views/projects/artifacts/browse.html.haml @@ -16,5 +16,5 @@ %tr %th Name %th Download - = render partial: 'tree_directory', collection: @path.directories, as: :directory + = render partial: 'tree_directory', collection: @path.directories!, as: :directory = render partial: 'tree_file', collection: @path.files, as: :file -- cgit v1.2.1 From ebd69c5fc1296f30238326b901ad73c891d696da Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 28 Dec 2015 10:35:51 +0100 Subject: Remove artifacts metadata column from database --- app/views/projects/artifacts/browse.html.haml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/views') diff --git a/app/views/projects/artifacts/browse.html.haml b/app/views/projects/artifacts/browse.html.haml index 141fea9a6d4..f05e5d58265 100644 --- a/app/views/projects/artifacts/browse.html.haml +++ b/app/views/projects/artifacts/browse.html.haml @@ -18,3 +18,6 @@ %th Download = render partial: 'tree_directory', collection: @path.directories!, as: :directory = render partial: 'tree_file', collection: @path.files, as: :file + +- if @path.children.empty? + .center Empty -- cgit v1.2.1 From d8cc9e4ef7da6ac971d44361546188eebfb3beff Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 28 Dec 2015 11:10:39 +0100 Subject: Add button to CI build artifacts browser into build summary --- app/views/projects/builds/show.html.haml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 5b7ecce86ab..937ee293bc8 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -91,7 +91,12 @@ - if current_user && can?(current_user, :download_build_artifacts, @project) && @build.download_url .build-widget.center - = link_to "Download artifacts", @build.download_url, class: 'btn btn-sm btn-primary' + .panel.panel-default + .panel-heading Build artifacts + .panel-body + .btn-group{ role: :group } + = link_to "Download", @build.download_url, class: 'btn btn-sm btn-primary' + = link_to "Browse", @build.artifacts_browse_url, class: 'btn btn-sm btn-primary' .build-widget %h4.title -- cgit v1.2.1 From 9e0e9342a47022a9caaa4a5596ec3ddb91fddc58 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 28 Dec 2015 11:21:01 +0100 Subject: Rename method that returns url to CI build artifacts download --- app/views/admin/builds/_build.html.haml | 4 ++-- app/views/projects/builds/show.html.haml | 4 ++-- app/views/projects/commit_statuses/_commit_status.html.haml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/builds/_build.html.haml b/app/views/admin/builds/_build.html.haml index 6936e614346..7cd98c0f540 100644 --- a/app/views/admin/builds/_build.html.haml +++ b/app/views/admin/builds/_build.html.haml @@ -60,8 +60,8 @@ %td .pull-right - - if current_user && can?(current_user, :download_build_artifacts, project) && build.download_url - = link_to build.download_url, title: 'Download artifacts' do + - if current_user && can?(current_user, :download_build_artifacts, project) && build.artifacts_file.exist? + = link_to build.artifacts_download_url, title: 'Download artifacts' do %i.fa.fa-download - if current_user && can?(current_user, :manage_builds, build.project) - if build.active? diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 937ee293bc8..5780d7ad175 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -89,13 +89,13 @@ Test coverage %h1 #{@build.coverage}% - - if current_user && can?(current_user, :download_build_artifacts, @project) && @build.download_url + - if current_user && can?(current_user, :download_build_artifacts, @project) && @build.artifacts_file.exist? .build-widget.center .panel.panel-default .panel-heading Build artifacts .panel-body .btn-group{ role: :group } - = link_to "Download", @build.download_url, class: 'btn btn-sm btn-primary' + = link_to "Download", @build.artifacts_download_url, class: 'btn btn-sm btn-primary' = link_to "Browse", @build.artifacts_browse_url, class: 'btn btn-sm btn-primary' .build-widget diff --git a/app/views/projects/commit_statuses/_commit_status.html.haml b/app/views/projects/commit_statuses/_commit_status.html.haml index 74a05df24d3..5e7f55fdbff 100644 --- a/app/views/projects/commit_statuses/_commit_status.html.haml +++ b/app/views/projects/commit_statuses/_commit_status.html.haml @@ -66,8 +66,8 @@ %td .pull-right - - if current_user && can?(current_user, :download_build_artifacts, commit_status.project) && commit_status.download_url - = link_to commit_status.download_url, title: 'Download artifacts' do + - if current_user && can?(current_user, :download_build_artifacts, commit_status.project) && commit_status.artifacts_file.exist? + = link_to commit_status.artifacts_download_url, title: 'Download artifacts' do %i.fa.fa-download - if current_user && can?(current_user, :manage_builds, commit_status.project) - if commit_status.active? -- cgit v1.2.1 From 8eeed761a9c25ea8ccfc347fbd3f5894b5957d9e Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 28 Dec 2015 11:43:15 +0100 Subject: Update specs for CI Build, add `artifacts?` method `artifacts?` method checks if artifacts archive is available. --- app/views/admin/builds/_build.html.haml | 2 +- app/views/projects/builds/show.html.haml | 2 +- app/views/projects/commit_statuses/_commit_status.html.haml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/builds/_build.html.haml b/app/views/admin/builds/_build.html.haml index 7cd98c0f540..26cdb162b76 100644 --- a/app/views/admin/builds/_build.html.haml +++ b/app/views/admin/builds/_build.html.haml @@ -60,7 +60,7 @@ %td .pull-right - - if current_user && can?(current_user, :download_build_artifacts, project) && build.artifacts_file.exist? + - if current_user && can?(current_user, :download_build_artifacts, project) && build.artifacts? = link_to build.artifacts_download_url, title: 'Download artifacts' do %i.fa.fa-download - if current_user && can?(current_user, :manage_builds, build.project) diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 5780d7ad175..c7fd047949e 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -89,7 +89,7 @@ Test coverage %h1 #{@build.coverage}% - - if current_user && can?(current_user, :download_build_artifacts, @project) && @build.artifacts_file.exist? + - if current_user && can?(current_user, :download_build_artifacts, @project) && @build.artifacts? .build-widget.center .panel.panel-default .panel-heading Build artifacts diff --git a/app/views/projects/commit_statuses/_commit_status.html.haml b/app/views/projects/commit_statuses/_commit_status.html.haml index 5e7f55fdbff..7872eec72b0 100644 --- a/app/views/projects/commit_statuses/_commit_status.html.haml +++ b/app/views/projects/commit_statuses/_commit_status.html.haml @@ -66,7 +66,7 @@ %td .pull-right - - if current_user && can?(current_user, :download_build_artifacts, commit_status.project) && commit_status.artifacts_file.exist? + - if current_user && can?(current_user, :download_build_artifacts, commit_status.project) && commit_status.artifacts? = link_to commit_status.artifacts_download_url, title: 'Download artifacts' do %i.fa.fa-download - if current_user && can?(current_user, :manage_builds, commit_status.project) -- cgit v1.2.1 From 5ff7ec42dc8759717c485478261128d61ea70b9a Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 28 Dec 2015 12:06:27 +0100 Subject: Add method that checks if artifacts browser is supported This is needed because of backward compatibility. Previously artifacts archive had `.tar.gz` format, but artifacts browser requires ZIP format now. --- app/views/projects/builds/show.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index c7fd047949e..7d32711e642 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -96,7 +96,8 @@ .panel-body .btn-group{ role: :group } = link_to "Download", @build.artifacts_download_url, class: 'btn btn-sm btn-primary' - = link_to "Browse", @build.artifacts_browse_url, class: 'btn btn-sm btn-primary' + - if @build.artifacts_browser_supported? + = link_to "Browse", @build.artifacts_browse_url, class: 'btn btn-sm btn-primary' .build-widget %h4.title -- cgit v1.2.1 From ece114e630f11a7d244ab55a0ffd49a1d2cbcb94 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 28 Dec 2015 12:34:47 +0100 Subject: Update artifacts download specs --- app/views/projects/builds/show.html.haml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 7d32711e642..7cc127244dc 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -90,14 +90,14 @@ %h1 #{@build.coverage}% - if current_user && can?(current_user, :download_build_artifacts, @project) && @build.artifacts? - .build-widget.center - .panel.panel-default - .panel-heading Build artifacts - .panel-body - .btn-group{ role: :group } - = link_to "Download", @build.artifacts_download_url, class: 'btn btn-sm btn-primary' - - if @build.artifacts_browser_supported? - = link_to "Browse", @build.artifacts_browse_url, class: 'btn btn-sm btn-primary' + + .build-widget.artifacts + %h4.title Build artifacts + .center + .btn-group{ role: :group } + = link_to "Download", @build.artifacts_download_url, class: 'btn btn-sm btn-primary' + - if @build.artifacts_browser_supported? + = link_to "Browse", @build.artifacts_browse_url, class: 'btn btn-sm btn-primary' .build-widget %h4.title -- cgit v1.2.1 From 1b1793c2530d7003d8baa5aa1912a4ab258d4a1c Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 4 Jan 2016 15:07:49 +0100 Subject: Show file size in artifacts browser using metadata --- app/views/projects/artifacts/_tree_directory.html.haml | 1 + app/views/projects/artifacts/_tree_file.html.haml | 6 ++++-- app/views/projects/artifacts/browse.html.haml | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/artifacts/_tree_directory.html.haml b/app/views/projects/artifacts/_tree_directory.html.haml index 481a2cb072f..5b87d55efd5 100644 --- a/app/views/projects/artifacts/_tree_directory.html.haml +++ b/app/views/projects/artifacts/_tree_directory.html.haml @@ -4,3 +4,4 @@ %span.str-truncated = link_to directory.name, browse_namespace_project_build_artifacts_path(@project.namespace, @project, @build, path: directory.path) %td + %td diff --git a/app/views/projects/artifacts/_tree_file.html.haml b/app/views/projects/artifacts/_tree_file.html.haml index ff30acc2957..0059f845841 100644 --- a/app/views/projects/artifacts/_tree_file.html.haml +++ b/app/views/projects/artifacts/_tree_file.html.haml @@ -1,8 +1,10 @@ %tr{ class: 'tree-item' } %td.tree-item-file-name - = tree_icon('file', '664', file.basename) + = tree_icon('file', '664', file.name) %span.str-truncated - = file.basename + = file.name + %td + = number_to_human_size(file.metadata[:uncompressed_size], precision: 2) %td = link_to '', class: 'btn btn-xs btn-default' do = icon('download') diff --git a/app/views/projects/artifacts/browse.html.haml b/app/views/projects/artifacts/browse.html.haml index f05e5d58265..fc161be2ffc 100644 --- a/app/views/projects/artifacts/browse.html.haml +++ b/app/views/projects/artifacts/browse.html.haml @@ -15,6 +15,7 @@ %thead %tr %th Name + %th Size %th Download = render partial: 'tree_directory', collection: @path.directories!, as: :directory = render partial: 'tree_file', collection: @path.files, as: :file -- cgit v1.2.1 From 387b27813d1d496c015f4f174812b4761c32648d Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Fri, 8 Jan 2016 12:35:49 +0100 Subject: Change format of artifacts metadata from text to binary 0.0.1 This changes the format of metadata to handle paths, that may contain whitespace characters, new line characters and non-UTF-8 characters. Now those paths along with metadata in JSON format are stored as length-prefixed strings (uint32 prefix). Metadata file has a custom format: 1. First string field is metadata version field (string) 2. Second string field is metadata errors field (JSON strong) 3. All subsequent fields is pair of path (string) and path metadata in JSON format. Path's metadata contains all fields that where possible to extract from ZIP archive like date of modification, CRC, compressed size, uncompressed size and comment. --- app/views/projects/artifacts/_tree_file.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/artifacts/_tree_file.html.haml b/app/views/projects/artifacts/_tree_file.html.haml index 0059f845841..11ced45fe14 100644 --- a/app/views/projects/artifacts/_tree_file.html.haml +++ b/app/views/projects/artifacts/_tree_file.html.haml @@ -4,7 +4,7 @@ %span.str-truncated = file.name %td - = number_to_human_size(file.metadata[:uncompressed_size], precision: 2) + = number_to_human_size(file.metadata[:size], precision: 2) %td = link_to '', class: 'btn btn-xs btn-default' do = icon('download') -- cgit v1.2.1 From 94cf75900181f1d73840f4306ee1a1a157800744 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 11 Jan 2016 11:07:41 +0100 Subject: Attach download action to artifacts file in ZIP archive --- app/views/projects/artifacts/_tree_file.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/artifacts/_tree_file.html.haml b/app/views/projects/artifacts/_tree_file.html.haml index 11ced45fe14..881a844a02d 100644 --- a/app/views/projects/artifacts/_tree_file.html.haml +++ b/app/views/projects/artifacts/_tree_file.html.haml @@ -6,5 +6,6 @@ %td = number_to_human_size(file.metadata[:size], precision: 2) %td - = link_to '', class: 'btn btn-xs btn-default' do + = link_to file_namespace_project_build_artifacts_path(path: file.path), + class: 'btn btn-xs btn-default' do = icon('download') -- cgit v1.2.1 From 487b0a026f9efe2d8214c19a7b95b391708ba3f4 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 12 Jan 2016 11:02:15 +0100 Subject: Improvements, readability for artifacts browser --- app/views/admin/builds/_build.html.haml | 2 +- app/views/projects/builds/show.html.haml | 2 +- app/views/projects/commit_statuses/_commit_status.html.haml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views') diff --git a/app/views/admin/builds/_build.html.haml b/app/views/admin/builds/_build.html.haml index 26cdb162b76..c395bd908c3 100644 --- a/app/views/admin/builds/_build.html.haml +++ b/app/views/admin/builds/_build.html.haml @@ -60,7 +60,7 @@ %td .pull-right - - if current_user && can?(current_user, :download_build_artifacts, project) && build.artifacts? + - if current_user && can?(current_user, :read_build_artifacts, project) && build.artifacts? = link_to build.artifacts_download_url, title: 'Download artifacts' do %i.fa.fa-download - if current_user && can?(current_user, :manage_builds, build.project) diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 7cc127244dc..f393d818656 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -89,7 +89,7 @@ Test coverage %h1 #{@build.coverage}% - - if current_user && can?(current_user, :download_build_artifacts, @project) && @build.artifacts? + - if current_user && can?(current_user, :read_build_artifacts, @project) && @build.artifacts? .build-widget.artifacts %h4.title Build artifacts diff --git a/app/views/projects/commit_statuses/_commit_status.html.haml b/app/views/projects/commit_statuses/_commit_status.html.haml index 7872eec72b0..1736dccaf3c 100644 --- a/app/views/projects/commit_statuses/_commit_status.html.haml +++ b/app/views/projects/commit_statuses/_commit_status.html.haml @@ -66,7 +66,7 @@ %td .pull-right - - if current_user && can?(current_user, :download_build_artifacts, commit_status.project) && commit_status.artifacts? + - if current_user && can?(current_user, :read_build_artifacts, commit_status.project) && commit_status.artifacts? = link_to commit_status.artifacts_download_url, title: 'Download artifacts' do %i.fa.fa-download - if current_user && can?(current_user, :manage_builds, commit_status.project) -- cgit v1.2.1 From 6d7a77074fcdd57ccdc33e3cb39146da4afdc0f4 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Tue, 12 Jan 2016 15:16:16 +0100 Subject: Add specs for endpoint meant to be accelerated by workhorse --- app/views/projects/artifacts/_tree_file.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/artifacts/_tree_file.html.haml b/app/views/projects/artifacts/_tree_file.html.haml index 881a844a02d..1d3d9306aa6 100644 --- a/app/views/projects/artifacts/_tree_file.html.haml +++ b/app/views/projects/artifacts/_tree_file.html.haml @@ -7,5 +7,5 @@ = number_to_human_size(file.metadata[:size], precision: 2) %td = link_to file_namespace_project_build_artifacts_path(path: file.path), - class: 'btn btn-xs btn-default' do + class: 'btn btn-xs btn-default artifact-download' do = icon('download') -- cgit v1.2.1 From 6b0a43aff36f0bbb9050b3c04155a3ccd9c1a75b Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Wed, 13 Jan 2016 21:17:28 +0100 Subject: Improve readability of artifacts browser `Entry` related code --- app/views/projects/artifacts/browse.html.haml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'app/views') diff --git a/app/views/projects/artifacts/browse.html.haml b/app/views/projects/artifacts/browse.html.haml index fc161be2ffc..1add7ef6bfb 100644 --- a/app/views/projects/artifacts/browse.html.haml +++ b/app/views/projects/artifacts/browse.html.haml @@ -1,11 +1,11 @@ -- page_title "#{@build.name} (##{@build.id})", 'Build artifacts' -- header_title project_title(@project, "Build artifacts", namespace_project_build_path(@project.namespace, @project, @build)) +- page_title 'Artifacts', "#{@build.name} (##{@build.id})", 'Builds' += render 'projects/builds/header_title' #tree-holder.tree-holder .gray-content-block.top-block.clearfix .pull-right = link_to download_namespace_project_build_artifacts_path(@project.namespace, @project, @build), - class: 'btn btn-default', method: :get do + class: 'btn btn-default' do = icon('download') Download artifacts archive @@ -17,8 +17,8 @@ %th Name %th Size %th Download - = render partial: 'tree_directory', collection: @path.directories!, as: :directory - = render partial: 'tree_file', collection: @path.files, as: :file + = render partial: 'tree_directory', collection: @entry.directories(parent: true), as: :directory + = render partial: 'tree_file', collection: @entry.files, as: :file -- if @path.children.empty? +- if @entry.empty? .center Empty -- cgit v1.2.1 From be764a3a20c7cecce2a047ddd46aff954c33b306 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Thu, 14 Jan 2016 12:12:05 +0100 Subject: Minor improvements in build arfifacts browser Added also a `Gitlab::Ci::Build::Artifacts::Metadata::ParserError` exception class. --- app/views/projects/artifacts/_tree_file.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/projects/artifacts/_tree_file.html.haml b/app/views/projects/artifacts/_tree_file.html.haml index 1d3d9306aa6..92c1648f726 100644 --- a/app/views/projects/artifacts/_tree_file.html.haml +++ b/app/views/projects/artifacts/_tree_file.html.haml @@ -6,6 +6,6 @@ %td = number_to_human_size(file.metadata[:size], precision: 2) %td - = link_to file_namespace_project_build_artifacts_path(path: file.path), + = link_to file_namespace_project_build_artifacts_path(@project.namespace, @project, @build, path: file.path), class: 'btn btn-xs btn-default artifact-download' do = icon('download') -- cgit v1.2.1