diff options
Diffstat (limited to 'app/views')
58 files changed, 405 insertions, 330 deletions
diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index e3698ac1c46..bc08458312c 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -32,7 +32,7 @@ %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' + = 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 @@ -54,19 +54,19 @@ %b.caret %ul.dropdown-menu %li - = link_to admin_users_path(sort: sort_value_name) do + = 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) do + = 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) do + = 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) do + = 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) do + = 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) do + = 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) do + = 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" diff --git a/app/views/ci/admin/runners/index.html.haml b/app/views/ci/admin/runners/index.html.haml index b9d6703ff41..01ce81b4476 100644 --- a/app/views/ci/admin/runners/index.html.haml +++ b/app/views/ci/admin/runners/index.html.haml @@ -27,7 +27,7 @@ .pull-left = form_tag ci_admin_runners_path, id: 'runners-search', class: 'form-inline', method: :get do .form-group - = search_field_tag :search, params[:search], class: 'form-control', placeholder: 'Runner description or token' + = search_field_tag :search, params[:search], class: 'form-control', placeholder: 'Runner description or token', spellcheck: false = submit_tag 'Search', class: 'btn' .pull-right.light diff --git a/app/views/ci/admin/runners/show.html.haml b/app/views/ci/admin/runners/show.html.haml index 5bb442cbf92..92787b2e6ac 100644 --- a/app/views/ci/admin/runners/show.html.haml +++ b/app/views/ci/admin/runners/show.html.haml @@ -76,7 +76,7 @@ %td = form_tag ci_admin_runner_path(@runner), id: 'runner-projects-search', class: 'form-inline', method: :get do .form-group - = search_field_tag :search, params[:search], class: 'form-control' + = search_field_tag :search, params[:search], class: 'form-control', spellcheck: false = submit_tag 'Search', class: 'btn' %td diff --git a/app/views/ci/projects/_info.html.haml b/app/views/ci/projects/_info.html.haml deleted file mode 100644 index 1888e1bde93..00000000000 --- a/app/views/ci/projects/_info.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -- if no_runners_for_project?(@project) - = render 'no_runners' diff --git a/app/views/ci/projects/show.html.haml b/app/views/ci/projects/show.html.haml deleted file mode 100644 index 888b1ea41d5..00000000000 --- a/app/views/ci/projects/show.html.haml +++ /dev/null @@ -1,60 +0,0 @@ -= render 'ci/shared/guide' unless @project.setup_finished? - -- if current_user && can?(current_user, :manage_project, gl_project) && !@project.any_runners? - .alert.alert-danger - Builds for this project wont be served unless you configure runners on - = link_to "Runners page", runners_path(@project.gl_project) - -%ul.nav.nav-tabs.append-bottom-20 - %li{class: ref_tab_class} - = link_to 'All commits', ci_project_path(@project) - - @project.tracked_refs.each do |ref| - %li{class: ref_tab_class(ref)} - = link_to ref, ci_project_path(@project, ref: ref) - - - if @ref && !@project.tracked_refs.include?(@ref) - %li{class: 'active'} - = link_to @ref, ci_project_path(@project, ref: @ref) - - %li.pull-right - = link_to 'Go to project', project_path(gl_project), class: 'btn btn-sm' - -- if @ref - %p - Paste build status image for #{@ref} with next link - = link_to '#', class: 'badge-codes-toggle btn btn-default btn-xs' do - Status Badge - .badge-codes-block.bs-callout.bs-callout-info.hide - %p - Status badge for - %span.label.label-info #{@ref} - branch - %div - %label Markdown: - = text_field_tag 'badge_md', markdown_badge_code(@project, @ref), readonly: true, class: 'form-control' - %label Html: - = text_field_tag 'badge_html', html_badge_code(@project, @ref), readonly: true, class: 'form-control' - - - - -%table.table.builds - %thead - %tr - %th Status - %th Commit - %th Message - %th Branch - %th Total duration - %th Finished at - - if @project.coverage_enabled? - %th Coverage - - = render @commits - -= paginate @commits - -- if @commits.empty? - .bs-callout - %h4 No commits yet - diff --git a/app/views/dashboard/_activities.html.haml b/app/views/dashboard/_activities.html.haml index 19d919f9b6a..f98fd9f06ba 100644 --- a/app/views/dashboard/_activities.html.haml +++ b/app/views/dashboard/_activities.html.haml @@ -3,10 +3,9 @@ .gray-content-block - if current_user - %ul.nav.nav-pills.event_filter.pull-right - %li.pull-right - = link_to dashboard_projects_path(:atom, { private_token: current_user.private_token }), class: 'rss-btn' do - %i.fa.fa-rss + .pull-right + = 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' .content_list diff --git a/app/views/dashboard/projects/_projects.html.haml b/app/views/dashboard/projects/_projects.html.haml index e09e032a7f1..81a5909e2d2 100644 --- a/app/views/dashboard/projects/_projects.html.haml +++ b/app/views/dashboard/projects/_projects.html.haml @@ -1,10 +1,11 @@ .projects-list-holder .projects-search-form .input-group - = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control' + = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control', spellcheck: false - if current_user.can_create_project? %span.input-group-btn = link_to new_project_path, class: 'btn btn-green' do - New project + %i.fa.fa-plus + New Project = render 'shared/projects/list', projects: @projects, ci: true diff --git a/app/views/explore/groups/index.html.haml b/app/views/explore/groups/index.html.haml index 83d4d321c83..fcb07b04083 100644 --- a/app/views/explore/groups/index.html.haml +++ b/app/views/explore/groups/index.html.haml @@ -11,7 +11,7 @@ = form_tag explore_groups_path, method: :get, class: 'form-inline form-tiny' do |f| = hidden_field_tag :sort, @sort .form-group - = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "groups_search" + = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "groups_search", spellcheck: false .form-group = button_tag 'Search', class: "btn btn-default" diff --git a/app/views/explore/projects/_filter.html.haml b/app/views/explore/projects/_filter.html.haml index 5a3d689d1e5..2761272aa8a 100644 --- a/app/views/explore/projects/_filter.html.haml +++ b/app/views/explore/projects/_filter.html.haml @@ -1,7 +1,7 @@ .pull-left = form_tag explore_projects_filter_path, method: :get, class: 'form-inline form-tiny' do |f| .form-group - = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "projects_search" + = search_field_tag :search, params[:search], placeholder: "Filter by name", class: "form-control search-text-input", id: "projects_search", spellcheck: false .form-group = button_tag 'Search', class: "btn btn-success" diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml index 2b27a88794d..11d69977ef9 100644 --- a/app/views/groups/_projects.html.haml +++ b/app/views/groups/_projects.html.haml @@ -1,10 +1,11 @@ .panel.panel-default.projects-list-holder .panel-heading.clearfix .input-group - = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control' + = search_field_tag :filter_projects, nil, placeholder: 'Filter by name', class: 'projects-list-filter form-control', spellcheck: false - if can? current_user, :create_projects, @group %span.input-group-btn = link_to new_project_path(namespace_id: @group.id), class: 'btn btn-green' do - New project + %i.fa.fa-plus + New Project - = render 'shared/projects/list', projects: @projects, projects_limit: 20, stars: false + = render 'shared/projects/list', projects: @projects, projects_limit: 20, stars: false, skip_namespace: true diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index 3a6d07ebddf..fee4b0052b5 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -12,7 +12,7 @@ .clearfix.js-toggle-container = form_tag group_group_members_path(@group), method: :get, class: 'form-inline member-search-form' do .form-group - = search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control search-text-input' } + = search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control search-text-input', spellcheck: false } = button_tag 'Search', class: 'btn' - if current_user && current_user.can?(:admin_group_member, @group) diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index a9ba9d2ba10..dc8e81323a6 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -25,11 +25,9 @@ .hidden-xs - if current_user = render "events/event_last_push", event: @last_push - - %ul.nav.nav-pills.event_filter.pull-right - %li - = link_to group_path(@group, { format: :atom, private_token: current_user.private_token }), title: "Feed", class: 'rss-btn' do - %i.fa.fa-rss + .pull-right + = link_to group_path(@group, { format: :atom, private_token: current_user.private_token }), title: "Feed", class: 'btn rss-btn' do + %i.fa.fa-rss = render 'shared/event_filter' %hr diff --git a/app/views/help/ui.html.haml b/app/views/help/ui.html.haml index 7c89457ace3..2169a821fb2 100644 --- a/app/views/help/ui.html.haml +++ b/app/views/help/ui.html.haml @@ -15,6 +15,8 @@ %li = link_to 'Tables', '#tables' %li + = link_to 'Nav', '#nav' + %li = link_to 'Buttons', '#buttons' %li = link_to 'Panels', '#panels' @@ -30,17 +32,32 @@ %h2#blocks Blocks %h3 - %code .well + %code .gray-content-block + - .well - %h4 Something + .gray-content-block.middle-block + %h4 Normal block inside content + = lorem + + .gray-content-block.second-block + %h4 Second block = lorem %h2#lists Lists %h3 + %code .content-list + %ul.content-list + %li + One item + %li + One item + %li + One item + + %h3 %code .well-list %ul.well-list %li @@ -102,11 +119,40 @@ %td the Bird %td @twitter + %h2#navs Navigation + + %h3 + %code .center-top-menu + .example + %ul.center-top-menu + %li.active + %a Open + %li + %a Closed + + %h3 + %code .btn-group.btn-group-next + .example + %div.btn-group.btn-group-next + %a.btn.active Open + %a.btn Closed + + + %h3 + %code .nav.nav-tabs + .example + %ul.nav.nav-tabs + %li.active + %a Open + %li + %a Closed + %h2#buttons Buttons .example %button.btn.btn-default{:type => "button"} Default + %button.btn.btn-gray{:type => "button"} Gray %button.btn.btn-primary{:type => "button"} Primary %button.btn.btn-success{:type => "button"} Success %button.btn.btn-info{:type => "button"} Info diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml index 2468687b56d..1a883e20e89 100644 --- a/app/views/layouts/_page.html.haml +++ b/app/views/layouts/_page.html.haml @@ -6,7 +6,7 @@ = brand_header_logo .gitlab-text-container %h3 GitLab - + - if defined?(sidebar) && sidebar = render "layouts/nav/#{sidebar}" - elsif current_user @@ -23,6 +23,7 @@ = current_user.username .content-wrapper = render "layouts/flash" + = yield :flash_message %div{ class: container_class } .content .clearfix diff --git a/app/views/layouts/_search.html.haml b/app/views/layouts/_search.html.haml index e2d2dec7ab8..ceb64ce3157 100644 --- a/app/views/layouts/_search.html.haml +++ b/app/views/layouts/_search.html.haml @@ -1,6 +1,6 @@ .search = form_tag search_path, method: :get, class: 'navbar-form pull-left' do |f| - = search_field_tag "search", nil, placeholder: search_placeholder, class: "search-input form-control" + = search_field_tag "search", nil, placeholder: search_placeholder, class: "search-input form-control", spellcheck: false = hidden_field_tag :group_id, @group.try(:id) - if @project && @project.persisted? = hidden_field_tag :project_id, @project.id diff --git a/app/views/layouts/ci/_nav_project.html.haml b/app/views/layouts/ci/_nav_project.html.haml index 545abc23d99..f094edbfa87 100644 --- a/app/views/layouts/ci/_nav_project.html.haml +++ b/app/views/layouts/ci/_nav_project.html.haml @@ -5,17 +5,6 @@ %span Back to project %li.separate-item - = nav_link path: ['projects#show', 'commits#show', 'builds#show'] do - = link_to ci_project_path(@project) do - = icon('list-alt fw') - %span - Commits - %span.count= @project.commits.count - = nav_link path: ['services#index', 'services#edit'] do - = link_to ci_project_services_path(@project) do - = icon('share fw') - %span - Services = nav_link path: 'events#index' do = link_to ci_project_events_path(@project) do = icon('book fw') diff --git a/app/views/layouts/nav/_project.html.haml b/app/views/layouts/nav/_project.html.haml index a218ec7486c..e4c285d8023 100644 --- a/app/views/layouts/nav/_project.html.haml +++ b/app/views/layouts/nav/_project.html.haml @@ -32,7 +32,7 @@ Files - if project_nav_tab? :commits - = nav_link(controller: %w(commit commits compare repositories tags branches)) do + = nav_link(controller: %w(commit commits compare repositories tags branches builds)) do = link_to project_commits_path(@project), title: 'Commits', class: 'shortcuts-commits', data: {placement: 'right'} do = icon('history fw') %span @@ -76,13 +76,6 @@ Merge Requests %span.count.merge_counter= @project.merge_requests.opened.count - - if @project.gitlab_ci? - = nav_link(controller: [:ci, :project]) do - = link_to ci_project_path(@project.gitlab_ci_project), title: 'Continuous Integration', data: {placement: 'right'} do - = icon('building fw') - %span - Continuous Integration - - if project_nav_tab? :settings = nav_link(controller: [:project_members, :teams]) do = link_to namespace_project_project_members_path(@project.namespace, @project), title: 'Members', class: 'team-tab tab', data: {placement: 'right'} do diff --git a/app/views/layouts/nav/_project_settings.html.haml b/app/views/layouts/nav/_project_settings.html.haml index 9279a846623..954dbe5d2b9 100644 --- a/app/views/layouts/nav/_project_settings.html.haml +++ b/app/views/layouts/nav/_project_settings.html.haml @@ -60,3 +60,13 @@ = icon('building fw') %span CI Settings + = nav_link controller: 'ci_services' do + = link_to namespace_project_ci_services_path(@project.namespace, @project) do + = icon('share fw') + %span + CI Services + = nav_link path: 'events#index' do + = link_to ci_project_events_path(@project.gitlab_ci_project) do + = icon('book fw') + %span + CI Events diff --git a/app/views/profiles/keys/_key_details.html.haml b/app/views/profiles/keys/_key_details.html.haml index e0ae4d9720f..0ca8bd95157 100644 --- a/app/views/profiles/keys/_key_details.html.haml +++ b/app/views/profiles/keys/_key_details.html.haml @@ -18,5 +18,6 @@ %code.key-fingerprint= @key.fingerprint %pre.well-pre = @key.key - .pull-right - = link_to 'Remove', path_to_key(@key, is_admin), data: {confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove delete-key" + .col-md-12 + .pull-right + = link_to 'Remove', path_to_key(@key, is_admin), data: {confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove delete-key" diff --git a/app/views/projects/_activity.html.haml b/app/views/projects/_activity.html.haml index 1261f6254d7..c2683bc6219 100644 --- a/app/views/projects/_activity.html.haml +++ b/app/views/projects/_activity.html.haml @@ -1,10 +1,9 @@ = render 'projects/last_push' .gray-content-block.activity-filter-block - if current_user - %ul.nav.nav-pills.event_filter.pull-right - %li - = link_to namespace_project_path(@project.namespace, @project, format: :atom, private_token: current_user.private_token), title: "Feed", class: 'rss-btn' do - %i.fa.fa-rss + .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 + %i.fa.fa-rss = render 'shared/event_filter' .content_list{:"data-href" => activity_project_path(@project)} diff --git a/app/views/projects/blob/_blob.html.haml b/app/views/projects/blob/_blob.html.haml index b4c7d8b9b71..a1ae1397584 100644 --- a/app/views/projects/blob/_blob.html.haml +++ b/app/views/projects/blob/_blob.html.haml @@ -19,7 +19,7 @@ - blob_commit = @repository.last_commit_for_path(@commit.id, blob.path) = render blob_commit, project: @project -%div#tree-content-holder.tree-content-holder +%div#blob-content-holder.blob-content-holder %article.file-holder .file-title = blob_icon blob.mode, blob.name diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 9c3e1703c89..f1ad0c3c403 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -11,7 +11,7 @@ - if current_action?(:new) || current_action?(:create) \/ = text_field_tag 'file_name', params[:file_name], placeholder: "File name", - required: true, class: 'form-control new-file-name' + required: true, class: 'form-control new-file-name js-quick-submit' .pull-right = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'form-control' diff --git a/app/views/projects/blob/_new_dir.html.haml b/app/views/projects/blob/_new_dir.html.haml new file mode 100644 index 00000000000..cb1567a2e68 --- /dev/null +++ b/app/views/projects/blob/_new_dir.html.haml @@ -0,0 +1,25 @@ +#modal-create-new-dir.modal + .modal-dialog + .modal-content + .modal-header + %a.close{href: "#", "data-dismiss" => "modal"} × + %h3.page-title Create New Directory + .modal-body + = form_tag namespace_project_create_dir_path(@project.namespace, @project, @id), method: :post, remote: false, id: 'dir-create-form', class: 'form-horizontal' do + .form-group + = label_tag :dir_name, 'Directory Name', class: 'control-label' + .col-sm-10 + = text_field_tag :dir_name, params[:dir_name], placeholder: "Directory name", required: true, class: 'form-control' + = render 'shared/commit_message_container', params: params, placeholder: '' + - unless @project.empty_repo? + .form-group + = label_tag :branch_name, 'Branch', class: 'control-label' + .col-sm-10 + = text_field_tag 'new_branch', @ref, class: "form-control" + .form-group + .col-sm-offset-2.col-sm-10 + = submit_tag "Create directory", class: 'btn btn-primary btn-create' + = link_to "Cancel", '#', class: "btn btn-cancel", "data-dismiss" => "modal" + +:coffeescript + disableButtonIfAnyEmptyField($("#dir-create-form"), ".form-control", ".btn-create"); diff --git a/app/views/projects/blob/_upload.html.haml b/app/views/projects/blob/_upload.html.haml index 1a1df127703..e27f1707527 100644 --- a/app/views/projects/blob/_upload.html.haml +++ b/app/views/projects/blob/_upload.html.haml @@ -4,9 +4,6 @@ .modal-header %a.close{href: "#", "data-dismiss" => "modal"} × %h3.page-title #{title} - %p.light - From branch - %strong= @ref .modal-body = form_tag form_path, method: method, class: 'blob-file-upload-form-js form-horizontal' do .dropzone @@ -18,6 +15,12 @@ .dropzone-alerts{class: "alert alert-danger data", style: "display:none"} = render 'shared/commit_message_container', params: params, placeholder: placeholder + - unless @project.empty_repo? + .form-group.branch + = label_tag 'branch', class: 'control-label' do + Branch + .col-sm-10 + = text_field_tag 'new_branch', @ref, class: "form-control" .form-group .col-sm-offset-2.col-sm-10 = button_tag button_title, class: 'btn btn-small btn-primary btn-upload-file', id: 'submit-all' diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml index 1950586b112..7975137c37f 100644 --- a/app/views/projects/blob/new.html.haml +++ b/app/views/projects/blob/new.html.haml @@ -2,12 +2,7 @@ = render "header_title" .gray-content-block.top-block - Create a new file or - = link_to 'upload', '#modal-upload-blob', - { class: 'upload-link', 'data-target' => '#modal-upload-blob', 'data-toggle' => 'modal'} - an existing one - -= render 'projects/blob/upload', title: 'Upload', placeholder: 'Upload new file', button_title: 'Upload file', form_path: namespace_project_create_blob_path(@project.namespace, @project, @id), method: :post + Create a new file .file-editor = form_tag(namespace_project_create_blob_path(@project.namespace, @project, @id), method: :post, class: 'form-horizontal form-new-file js-requires-input') do @@ -20,7 +15,7 @@ = label_tag 'branch', class: 'control-label' do Branch .col-sm-10 - = text_field_tag 'new_branch', @ref, class: "form-control" + = text_field_tag 'new_branch', @ref, class: "form-control js-quick-submit" = hidden_field_tag 'content', '', id: 'file-content' = render 'projects/commit_button', ref: @ref, diff --git a/app/views/projects/builds/_build.html.haml b/app/views/projects/builds/_build.html.haml deleted file mode 100644 index 21c543b38dd..00000000000 --- a/app/views/projects/builds/_build.html.haml +++ /dev/null @@ -1,50 +0,0 @@ -- gl_project = build.project.gl_project -%tr.build - %td.status - = ci_status_with_icon(build.status) - - %td.build-link - = link_to namespace_project_build_path(gl_project.namespace, gl_project, build) do - %strong Build ##{build.id} - - - if defined?(ref) - %td - = build.ref - - %td - = build.stage - - %td - = build.name - .pull-right - - if build.tags.any? - - build.tag_list.each do |tag| - %span.label.label-primary - = tag - - if build.trigger_request - %span.label.label-info triggered - - if build.allow_failure - %span.label.label-danger allowed to fail - - %td.duration - - if build.duration - #{duration_in_words(build.finished_at, build.started_at)} - - %td.timestamp - - if build.finished_at - %span #{time_ago_in_words build.finished_at} ago - - - if build.project.coverage_enabled? - %td.coverage - - if build.coverage - #{build.coverage}% - - %td - - if defined?(controls) && current_user && can?(current_user, :manage_builds, gl_project) - .pull-right - - if build.active? - = link_to cancel_ci_project_build_path(build.project, build, return_to: request.original_url), title: 'Cancel build' do - %i.fa.fa-remove.cred - - elsif build.commands.present? - = link_to retry_ci_project_build_path(build.project, build, return_to: request.original_url), method: :post, title: 'Retry build' do - %i.fa.fa-repeat diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 93cd4dcfd93..91c1b16c9f6 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -9,7 +9,7 @@ #up-build-trace - if @commit.matrix_for_ref?(@build.ref) %ul.center-top-menu.build-top-menu - - @commit.builds_without_retry_for_ref(@build.ref).each do |build| + - @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 = ci_icon_for_status(build.status) @@ -20,12 +20,12 @@ = build.id - - unless @commit.builds_without_retry_for_ref(@build.ref).include?(@build) + - unless @commit.latest_builds_for_ref(@build.ref).include?(@build) %li.active %a Build ##{@build.id} · - %i.fa.fa-warning-sign + %i.fa.fa-warning This build was retried. .gray-content-block.second-block @@ -39,6 +39,27 @@ .pull-right = @build.updated_at.stamp('19:00 Aug 27') + - if @build.show_warning? + - unless @build.any_runners_online? + .bs-callout.bs-callout-warning + %p + - if no_runners_for_project?(@build.project) + This build is stuck, because the project doesn't have runners assigned. + - elsif @build.tags.any? + This build is stuck. + %br + This build is stuck, because you don't have any active runners online with these tags assigned to the project: + - @build.tags.each do |tag| + %span.label.label-primary + = tag + - else + This build is stuck, because you don't have any active runners online that can run this build. + + %br + Go to + = link_to namespace_project_runners_path(@build.gl_project.namespace, @build.gl_project) do + Runners page + .row.prepend-top-default .col-md-9 .clearfix @@ -72,9 +93,9 @@ - if current_user && can?(current_user, :manage_builds, @project) .pull-right - if @build.active? - = link_to "Cancel", cancel_ci_project_build_path(@ci_project, @build), class: 'btn btn-sm btn-danger' + = link_to "Cancel", cancel_namespace_project_build_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-danger' - elsif @build.commands.present? - = link_to "Retry", retry_ci_project_build_path(@ci_project, @build), class: 'btn btn-sm btn-primary', method: :post + = link_to "Retry", retry_namespace_project_build_path(@project.namespace, @project, @build), class: 'btn btn-sm btn-primary', method: :post - if @build.duration %p diff --git a/app/views/projects/buttons/_notifications.html.haml b/app/views/projects/buttons/_notifications.html.haml index 4b69a6d7a6f..3bc2daeec4e 100644 --- a/app/views/projects/buttons/_notifications.html.haml +++ b/app/views/projects/buttons/_notifications.html.haml @@ -1,6 +1,6 @@ - return unless @membership -= form_tag profile_notifications_path, method: :put, remote: true, class: 'inline-form', id: 'notification-form' do += form_tag profile_notifications_path, method: :put, remote: true, class: 'inline', id: 'notification-form' do = hidden_field_tag :notification_type, 'project' = hidden_field_tag :notification_id, @membership.id = hidden_field_tag :notification_level diff --git a/app/views/ci/services/_form.html.haml b/app/views/projects/ci_services/_form.html.haml index 9110aaa0528..397832e56db 100644 --- a/app/views/ci/services/_form.html.haml +++ b/app/views/projects/ci_services/_form.html.haml @@ -4,13 +4,10 @@ %p= @service.description -.back-link - = link_to ci_project_services_path(@project) do - ← to services %hr -= form_for(@service, as: :service, url: ci_project_service_path(@project, @service.to_param), method: :put, html: { class: 'form-horizontal' }) do |f| += form_for(@service, as: :service, url: namespace_project_ci_service_path(@project.namespace, @project, @service.to_param), method: :put, html: { class: 'form-horizontal' }) do |f| - if @service.errors.any? .alert.alert-danger %ul @@ -54,4 +51,4 @@ = f.submit 'Save', class: 'btn btn-save' - if @service.valid? && @service.activated? && @service.can_test? - = link_to 'Test settings', test_ci_project_service_path(@project, @service.to_param), class: 'btn' + = link_to 'Test settings', test_namespace_project_ci_service_path(@project.namespace, @project, @service.to_param), class: 'btn' diff --git a/app/views/ci/services/edit.html.haml b/app/views/projects/ci_services/edit.html.haml index bcc5832792f..bcc5832792f 100644 --- a/app/views/ci/services/edit.html.haml +++ b/app/views/projects/ci_services/edit.html.haml diff --git a/app/views/ci/services/index.html.haml b/app/views/projects/ci_services/index.html.haml index 37e5723b541..c78b21884a3 100644 --- a/app/views/ci/services/index.html.haml +++ b/app/views/projects/ci_services/index.html.haml @@ -13,7 +13,7 @@ %td = boolean_to_icon service.activated? %td - = link_to edit_ci_project_service_path(@project, service.to_param) do + = link_to edit_namespace_project_ci_service_path(@project.namespace, @project, service.to_param) do %strong= service.title %td = service.description diff --git a/app/views/projects/ci_settings/_form.html.haml b/app/views/projects/ci_settings/_form.html.haml index 9f891f557a9..d711413c6b9 100644 --- a/app/views/projects/ci_settings/_form.html.haml +++ b/app/views/projects/ci_settings/_form.html.haml @@ -8,6 +8,22 @@ Edit your #{link_to ".gitlab-ci.yml using web-editor", yaml_web_editor_link(@ci_project)} +- unless @project.empty_repo? + %p + Paste build status image for #{@repository.root_ref} with next link + = link_to '#', class: 'badge-codes-toggle btn btn-default btn-xs' do + Status Badge + .badge-codes-block.bs-callout.bs-callout-info.hide + %p + Status badge for + %span.label.label-info #{@ref} + branch + %div + %label Markdown: + = text_field_tag 'badge_md', markdown_badge_code(@ci_project, @repository.root_ref), readonly: true, class: 'form-control' + %label Html: + = text_field_tag 'badge_html', html_badge_code(@ci_project, @repository.root_ref), readonly: true, class: 'form-control' + = nested_form_for @ci_project, url: namespace_project_ci_settings_path(@project.namespace, @project), html: { class: 'form-horizontal' } do |f| - if @ci_project.errors.any? #error_explanation diff --git a/app/views/ci/projects/_no_runners.html.haml b/app/views/projects/ci_settings/_no_runners.html.haml index c0a296fb17d..33038c52978 100644 --- a/app/views/ci/projects/_no_runners.html.haml +++ b/app/views/projects/ci_settings/_no_runners.html.haml @@ -4,5 +4,5 @@ %br You can add Specific runner for this project on Runners page - - if current_user.is_admin + - if current_user.admin or add Shared runner for whole application in admin are. diff --git a/app/views/projects/ci_settings/edit.html.haml b/app/views/projects/ci_settings/edit.html.haml index e9040fe4337..eedf484bf00 100644 --- a/app/views/projects/ci_settings/edit.html.haml +++ b/app/views/projects/ci_settings/edit.html.haml @@ -6,6 +6,9 @@ yaml file which is based on your old jobs. Put this file to the root of your project and name it .gitlab-ci.yml +- if no_runners_for_project?(@ci_project) + = render 'no_runners' + = render 'form' - if @ci_project.generated_yaml_config diff --git a/app/views/projects/commit/ci.html.haml b/app/views/projects/commit/ci.html.haml index f4382e88046..ca71a91af15 100644 --- a/app/views/projects/commit/ci.html.haml +++ b/app/views/projects/commit/ci.html.haml @@ -3,11 +3,6 @@ = render "commit_box" = render "ci_menu" -- if @ci_project && current_user && can?(current_user, :manage_builds, @project) - .pull-right - - if @ci_commit.builds.running_or_pending.any? - = link_to "Cancel", cancel_ci_project_commits_path(@ci_project, @ci_commit), class: 'btn btn-sm btn-danger' - - if @ci_commit.yaml_errors.present? .bs-callout.bs-callout-danger @@ -20,30 +15,39 @@ .bs-callout.bs-callout-warning \.gitlab-ci.yml not found in this commit -- @ci_commit.refs.each do |ref| - .gray-content-block.second-block - Builds for #{ref} - - if @ci_commit.duration_for_ref(ref) > 0 - %small.pull-right - %i.fa.fa-time - #{time_interval_in_words @ci_commit.duration_for_ref(ref)} +.gray-content-block.second-block + Latest builds - %table.table.builds - %thead - %tr - %th Status - %th Build ID - %th Stage - %th Name - %th Duration - %th Finished at - - if @ci_project && @ci_project.coverage_enabled? - %th Coverage - %th - = render partial: "projects/builds/build", collection: @ci_commit.builds_without_retry.for_ref(ref), controls: true + .pull-right + - if @ci_commit.duration > 0 + %i.fa.fa-time + #{time_interval_in_words @ci_commit.duration} + + + + - if @ci_project && current_user && can?(current_user, :manage_builds, @project) + - if @ci_commit.builds.running_or_pending.any? + = link_to "Cancel all", cancel_builds_namespace_project_commit_path(@project.namespace, @project, @commit.sha), class: 'btn btn-xs btn-danger' -- if @ci_commit.retried_builds.any? - %h3 +%table.table.builds + %thead + %tr + %th Status + %th Build ID + %th Ref + %th Stage + %th Name + %th Duration + %th Finished at + - if @ci_project && @ci_project.coverage_enabled? + %th Coverage + %th + - @ci_commit.refs.each do |ref| + = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.statuses.for_ref(ref).latest.ordered, + locals: { coverage: @ci_project.try(:coverage_enabled?), allow_retry: true } + +- if @ci_commit.retried.any? + .gray-content-block.second-block Retried builds %table.table.builds @@ -59,4 +63,5 @@ - if @ci_project && @ci_project.coverage_enabled? %th Coverage %th - = render partial: "projects/builds/build", collection: @ci_commit.retried_builds, ref: true + = render partial: "projects/commit_statuses/commit_status", collection: @ci_commit.retried, + locals: { coverage: @ci_project.try(:coverage_enabled?) } diff --git a/app/views/projects/commit_statuses/_commit_status.html.haml b/app/views/projects/commit_statuses/_commit_status.html.haml new file mode 100644 index 00000000000..637154f56aa --- /dev/null +++ b/app/views/projects/commit_statuses/_commit_status.html.haml @@ -0,0 +1,54 @@ +%tr.commit_status + %td.status + = ci_status_with_icon(commit_status.status) + + %td.commit_status-link + - if commit_status.target_url + = link_to commit_status.target_url do + %strong Build ##{commit_status.id} + - else + %strong Build ##{commit_status.id} + + - if commit_status.show_warning? + %i.fa.fa-warning.text-warning + + %td + = commit_status.ref + + %td + = commit_status.stage + + %td + = commit_status.name + .pull-right + - if commit_status.tags.any? + - commit_status.tags.each do |tag| + %span.label.label-primary + = tag + - if commit_status.try(:trigger_request) + %span.label.label-info triggered + - if commit_status.try(:allow_failure) + %span.label.label-danger allowed to fail + + %td.duration + - if commit_status.duration + #{duration_in_words(commit_status.finished_at, commit_status.started_at)} + + %td.timestamp + - if commit_status.finished_at + %span #{time_ago_in_words commit_status.finished_at} ago + + - if defined?(coverage) && coverage + %td.coverage + - if commit_status.try(:coverage) + #{commit_status.coverage}% + + %td + .pull-right + - if current_user && can?(current_user, :manage_builds, commit_status.gl_project) + - if commit_status.cancel_url + = link_to commit_status.cancel_url, title: 'Cancel' do + %i.fa.fa-remove.cred + - elsif defined?(allow_retry) && allow_retry && commit_status.retry_url + = link_to commit_status.retry_url, method: :post, title: 'Retry' do + %i.fa.fa-repeat diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index 4617b188150..9698921f6da 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -16,7 +16,7 @@ - if diff_file.mode_changed? %span.file-mode= "#{diff_file.diff.a_mode} → #{diff_file.diff.b_mode}" - .diff-btn-group + .diff-controls - if blob.text? = link_to '#', class: 'js-toggle-diff-comments btn btn-sm active has_tooltip', title: "Toggle comments for this file" do %i.fa.fa-comments diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 90dce739992..1882a82fba5 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -193,13 +193,13 @@ .panel.panel-default.panel.panel-danger .panel-heading Remove project .panel-body - = form_tag(namespace_project_path(@project.namespace, @project), method: :delete, html: { class: 'form-horizontal'}) do + = form_tag(namespace_project_path(@project.namespace, @project), method: :delete, class: 'form-horizontal') do %p Removing the project will delete its repository and all related resources including issues, merge requests etc. %br %strong Removed projects cannot be restored! - = link_to 'Remove project', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_project_message(@project) } + = button_to 'Remove project', '#', class: "btn btn-remove js-confirm-danger", data: { "confirm-danger-message" => remove_project_message(@project) } - else .nothing-here-block Only project owner can remove a project diff --git a/app/views/projects/forks/new.html.haml b/app/views/projects/forks/new.html.haml index cd5f3a5d39e..f0b0a11c04a 100644 --- a/app/views/projects/forks/new.html.haml +++ b/app/views/projects/forks/new.html.haml @@ -1,36 +1,41 @@ - page_title "Fork project" -%h3.page-title Fork project -%p.lead - Click to fork the project to a user or group -%hr +- if @namespaces.present? + %h3.page-title Fork project + %p.lead + Click to fork the project to a user or group + %hr -.fork-namespaces - - @namespaces.in_groups_of(6, false) do |group| - .row - - group.each do |namespace| - .col-md-2.col-sm-3 - - if fork = namespace.find_fork_of(@project) - .fork-thumbnail - = link_to project_path(fork), title: "Visit project fork", class: 'has_tooltip' do - = image_tag namespace_icon(namespace, 100) - .caption - %strong - = namespace.human_name - %div.text-primary - Already forked + .fork-namespaces + - @namespaces.in_groups_of(6, false) do |group| + .row + - group.each do |namespace| + .col-md-2.col-sm-3 + - if fork = namespace.find_fork_of(@project) + .fork-thumbnail + = link_to project_path(fork), title: "Visit project fork", class: 'has_tooltip' do + = image_tag namespace_icon(namespace, 100) + .caption + %strong + = namespace.human_name + %div.text-primary + Already forked - - else - .fork-thumbnail - = link_to namespace_project_fork_path(@project.namespace, @project, namespace_key: namespace.id), title: "Fork here", method: "POST", class: 'has_tooltip' do - = image_tag namespace_icon(namespace, 100) - .caption - %strong - = namespace.human_name + - else + .fork-thumbnail + = link_to namespace_project_fork_path(@project.namespace, @project, namespace_key: namespace.id), title: "Fork here", method: "POST", class: 'has_tooltip' do + = image_tag namespace_icon(namespace, 100) + .caption + %strong + = namespace.human_name - %p.light - Fork is a copy of a project repository. - %br - Forking a repository allows you to do changes without affecting the original project. + %p.light + Fork is a copy of a project repository. + %br + Forking a repository allows you to do changes without affecting the original project. +- else + %h3 No available namespaces to fork the project + %p.slead + You must have permission to create a project in a namespace before forking. .save-project-loader.hide .center diff --git a/app/views/projects/labels/_form.html.haml b/app/views/projects/labels/_form.html.haml index 534c545329b..4cf13492e99 100644 --- a/app/views/projects/labels/_form.html.haml +++ b/app/views/projects/labels/_form.html.haml @@ -10,7 +10,7 @@ .form-group = f.label :title, class: 'control-label' .col-sm-10 - = f.text_field :title, class: "form-control", required: true + = f.text_field :title, class: "form-control js-quick-submit", required: true .form-group = f.label :color, "Background Color", class: 'control-label' .col-sm-10 diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml index 0b0f52c653c..e7ac7a0eaa4 100644 --- a/app/views/projects/merge_requests/_show.html.haml +++ b/app/views/projects/merge_requests/_show.html.haml @@ -24,7 +24,7 @@ %ul.dropdown-menu %li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch) %li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff) - .light + .normal %span Request to merge %span.label-branch #{source_branch_with_namespace(@merge_request)} %span into @@ -34,7 +34,7 @@ = render "projects/merge_requests/widget/show.html.haml" - if @merge_request.open? && @merge_request.can_be_merged? - .light + .light.append-bottom-20 You can also accept this merge request manually using the = link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal" diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml index 74e9668052d..255ddab479f 100644 --- a/app/views/projects/milestones/_form.html.haml +++ b/app/views/projects/milestones/_form.html.haml @@ -16,13 +16,13 @@ .form-group = f.label :title, "Title", class: "control-label" .col-sm-10 - = f.text_field :title, maxlength: 255, class: "form-control", required: true + = f.text_field :title, maxlength: 255, class: "form-control js-quick-submit", required: true %p.hint Required .form-group.milestone-description = f.label :description, "Description", class: "control-label" .col-sm-10 = render layout: 'projects/md_preview', locals: { preview_class: "md-preview" } do - = render 'projects/zen', f: f, attr: :description, classes: 'description form-control' + = render 'projects/zen', f: f, attr: :description, classes: 'description form-control js-quick-submit' .hint .pull-left Milestones are parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'}. .pull-left Attach files by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }. diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index bccea21e7a8..daab2326bc7 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -8,7 +8,7 @@ = form_for @project, html: { class: 'new_project form-horizontal js-requires-input' } do |f| .form-group.project-name-holder = f.label :path, class: 'control-label' do - %strong Project path + Project path .col-sm-10 .input-group = f.text_field :path, placeholder: "my-awesome-project", class: "form-control", tabindex: 1, autofocus: true, required: true @@ -23,7 +23,6 @@ = f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'select2', tabindex: 2} - if import_sources_enabled? - %hr .project-import.js-toggle-container .form-group @@ -35,7 +34,7 @@ %i.fa.fa-github GitHub - else - = link_to '#', class: 'how_to_import_link light btn import_github' do + = link_to '#', class: 'how_to_import_link btn import_github' do %i.fa.fa-github GitHub = render 'github_import_modal' @@ -46,7 +45,7 @@ %i.fa.fa-bitbucket Bitbucket - else - = link_to status_import_bitbucket_path, class: 'how_to_import_link light btn import_bitbucket', "data-no-turbolink" => "true" do + = link_to status_import_bitbucket_path, class: 'how_to_import_link btn import_bitbucket', "data-no-turbolink" => "true" do %i.fa.fa-bitbucket Bitbucket = render 'bitbucket_import_modal' @@ -57,7 +56,7 @@ %i.fa.fa-heart GitLab.com - else - = link_to status_import_gitlab_path, class: 'how_to_import_link light btn import_gitlab' do + = link_to status_import_gitlab_path, class: 'how_to_import_link btn import_gitlab' do %i.fa.fa-heart GitLab.com = render 'gitlab_import_modal' @@ -97,7 +96,7 @@ %li To migrate an SVN repository, check out #{link_to "this document", "http://doc.gitlab.com/ce/workflow/importing/migrating_from_svn.html"}. - %hr.prepend-botton-10 + .prepend-botton-10 .form-group = f.label :description, class: 'control-label' do @@ -112,10 +111,11 @@ - if current_user.can_create_group? .pull-right - .light - Need a group for several dependent projects? - = link_to new_group_path, class: "btn btn-xs" do - Create a group + .light.inline + .space-right + Need a group for several dependent projects? + = link_to new_group_path, class: "btn" do + Create a group .save-project-loader.hide .center diff --git a/app/views/projects/notes/_edit_form.html.haml b/app/views/projects/notes/_edit_form.html.haml index a0e26f9827e..a21c019986a 100644 --- a/app/views/projects/notes/_edit_form.html.haml +++ b/app/views/projects/notes/_edit_form.html.haml @@ -2,7 +2,7 @@ = form_for note, url: namespace_project_note_path(@project.namespace, @project, note), method: :put, remote: true, authenticity_token: true do |f| = note_target_fields(note) = render layout: 'projects/md_preview', locals: { preview_class: 'md-preview' } do - = render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-task-list-field' + = render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-task-list-field js-quick-submit' = render 'projects/notes/hints' .note-form-actions diff --git a/app/views/projects/notes/_form.html.haml b/app/views/projects/notes/_form.html.haml index d99445da59a..13dfa0a1bb3 100644 --- a/app/views/projects/notes/_form.html.haml +++ b/app/views/projects/notes/_form.html.haml @@ -8,12 +8,12 @@ = f.hidden_field :noteable_type = render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do - = render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text' + = render 'projects/zen', f: f, attr: :note, classes: 'note_text js-note-text js-quick-submit' = render 'projects/notes/hints' .error-alert .note-form-actions .buttons.clearfix - = f.submit 'Add Comment', class: "btn comment-btn btn-grouped js-comment-button" + = f.submit 'Add Comment', class: "btn btn-green comment-btn btn-grouped js-comment-button" = yield(:note_actions) %a.btn.grouped.js-close-discussion-note-form Cancel diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index 9a0a824b811..82809bec5b8 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -5,7 +5,7 @@ .clearfix.js-toggle-container = form_tag namespace_project_project_members_path(@project.namespace, @project), method: :get, class: 'form-inline member-search-form' do .form-group - = search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control search-text-input' } + = search_field_tag :search, params[:search], { placeholder: 'Find existing member by name', class: 'form-control search-text-input', spellcheck: false } = button_tag 'Search', class: 'btn' - if can?(current_user, :admin_project_member, @project) diff --git a/app/views/projects/repositories/_download_archive.html.haml b/app/views/projects/repositories/_download_archive.html.haml index b9486a9b492..07c24950ee2 100644 --- a/app/views/projects/repositories/_download_archive.html.haml +++ b/app/views/projects/repositories/_download_archive.html.haml @@ -3,10 +3,10 @@ - split_button = split_button || false - if split_button == true %span.btn-group{class: btn_class} - = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn col-xs-10', rel: 'nofollow' do + = link_to archive_namespace_project_repository_path(@project.namespace, @project, ref: ref, format: 'zip'), class: 'btn btn-success col-xs-10', rel: 'nofollow' do %i.fa.fa-download %span Download zip - %a.col-xs-2.btn.dropdown-toggle{ 'data-toggle' => 'dropdown' } + %a.col-xs-2.btn.btn-success.dropdown-toggle{ 'data-toggle' => 'dropdown' } %span.caret %span.sr-only Select Archive Format diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index efa119edd5a..e95d987d74c 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -2,9 +2,10 @@ - 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") -- if current_user && can?(current_user, :download_code, @project) - = render 'shared/no_ssh' - = render 'shared/no_password' += content_for :flash_message do + - if current_user && can?(current_user, :download_code, @project) + = render 'shared/no_ssh' + = render 'shared/no_password' - if prefer_readme? = render 'projects/last_push' diff --git a/app/views/projects/tree/_readme.html.haml b/app/views/projects/tree/_readme.html.haml index f082d711865..7e9af19c8ba 100644 --- a/app/views/projects/tree/_readme.html.haml +++ b/app/views/projects/tree/_readme.html.haml @@ -1,7 +1,8 @@ -%article.readme-holder#README - = link_to '#README' do - %h4.readme-file-title - %i.fa.fa-file - = readme.name - .wiki +%article.file-holder.readme-holder#README + .file-title + = link_to '#README' do + %strong + %i.fa.fa-file + = readme.name + .file-content.wiki = render_readme(readme) diff --git a/app/views/projects/tree/_tree.html.haml b/app/views/projects/tree/_tree.html.haml index 367a87927d7..7ff48e32e60 100644 --- a/app/views/projects/tree/_tree.html.haml +++ b/app/views/projects/tree/_tree.html.haml @@ -1,51 +1,71 @@ -%ul.breadcrumb.repo-breadcrumb - %li - = link_to namespace_project_tree_path(@project.namespace, @project, @ref) do - = @project.path - - tree_breadcrumbs(tree, 6) do |title, path| +.gray-content-block + %ul.breadcrumb.repo-breadcrumb %li - - if path - = link_to truncate(title, length: 40), namespace_project_tree_path(@project.namespace, @project, path) - - else - = link_to title, '#' - - if current_user && can_push_branch?(@project, @ref) - %li - = link_to namespace_project_new_blob_path(@project.namespace, @project, @id), title: 'New file', id: 'new-file-link' do - %small - %i.fa.fa-plus + = link_to namespace_project_tree_path(@project.namespace, @project, @ref) do + = @project.path + - tree_breadcrumbs(tree, 6) do |title, path| + %li + - if path + = link_to truncate(title, length: 40), namespace_project_tree_path(@project.namespace, @project, path) + - else + = link_to title, '#' + - if allowed_tree_edit? + %li + %span.dropdown + %a.dropdown-toggle.btn.add-to-tree{href: '#', "data-toggle" => "dropdown"} + = icon('plus') + %ul.dropdown-menu + %li + = link_to namespace_project_new_blob_path(@project.namespace, @project, @id), title: 'Create file', id: 'new-file-link' do + = icon('pencil fw') + Create file + %li + = link_to '#modal-upload-blob', { 'data-target' => '#modal-upload-blob', 'data-toggle' => 'modal'} do + = icon('file fw') + Upload file + %li.divider + %li + = link_to '#modal-create-new-dir', { 'data-target' => '#modal-create-new-dir', 'data-toggle' => 'modal'} do + = icon('folder fw') + New directory -%div#tree-content-holder.tree-content-holder.prepend-top-20 - %table#tree-slider{class: "table_#{@hex_path} tree-table" } - %thead - %tr - %th Name - %th Last Update - %th.hidden-xs - .pull-left Last Commit - .last-commit.hidden-sm.pull-left - - %i.fa.fa-angle-right - - %small.light - = link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit) - – - = truncate(@commit.title, length: 50) - = link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), class: 'pull-right' +%div#tree-content-holder.tree-content-holder + .tree-table-holder + %table.table#tree-slider{class: "table_#{@hex_path} tree-table table-striped" } + %thead + %tr + %th Name + %th Last Update + %th.hidden-xs + .pull-left Last Commit + .last-commit.hidden-sm.pull-left + + %i.fa.fa-angle-right + + %small.light + = link_to @commit.short_id, namespace_project_commit_path(@project.namespace, @project, @commit) + – + = truncate(@commit.title, length: 50) + = link_to 'History', namespace_project_commits_path(@project.namespace, @project, @id), class: 'pull-right' - - if @path.present? - %tr.tree-item - %td.tree-item-file-name - = link_to "..", namespace_project_tree_path(@project.namespace, @project, up_dir_path), class: 'prepend-left-10' - %td - %td.hidden-xs + - if @path.present? + %tr.tree-item + %td.tree-item-file-name + = link_to "..", namespace_project_tree_path(@project.namespace, @project, up_dir_path), class: 'prepend-left-10' + %td + %td.hidden-xs - = render_tree(tree) + = render_tree(tree) - if tree.readme = render "projects/tree/readme", readme: tree.readme %div.tree_progress +- if allowed_tree_edit? + = render 'projects/blob/upload', title: 'Upload', placeholder: 'Upload new file', button_title: 'Upload file', form_path: namespace_project_create_blob_path(@project.namespace, @project, @id), method: :post + = render 'projects/blob/new_dir' + :javascript // Load last commit log for each file in tree $('#tree-slider').waitForImages(function() { diff --git a/app/views/projects/wikis/_form.html.haml b/app/views/projects/wikis/_form.html.haml index 05d754adbe5..261d4a92d7d 100644 --- a/app/views/projects/wikis/_form.html.haml +++ b/app/views/projects/wikis/_form.html.haml @@ -22,7 +22,7 @@ = f.label :content, class: 'control-label' .col-sm-10 = render layout: 'projects/md_preview', locals: { preview_class: "md-preview" } do - = render 'projects/zen', f: f, attr: :content, classes: 'description form-control' + = render 'projects/zen', f: f, attr: :content, classes: 'description form-control js-quick-submit' .col-sm-12.hint .pull-left Wiki content is parsed with #{link_to "GitLab Flavored Markdown", help_page_path("markdown", "markdown"), target: '_blank'} .pull-right Attach files by dragging & dropping or #{link_to "selecting them", '#', class: 'markdown-selector' }. diff --git a/app/views/projects/wikis/pages.html.haml b/app/views/projects/wikis/pages.html.haml index 03e6a522b25..d179a1abec1 100644 --- a/app/views/projects/wikis/pages.html.haml +++ b/app/views/projects/wikis/pages.html.haml @@ -3,6 +3,7 @@ = render 'nav' .gray-content-block + = render 'main_links' %h3.page-title All Pages %ul.content-list diff --git a/app/views/search/_form.html.haml b/app/views/search/_form.html.haml index 3938c545cad..17b0981f073 100644 --- a/app/views/search/_form.html.haml +++ b/app/views/search/_form.html.haml @@ -6,7 +6,7 @@ .search-holder.clearfix .input-group - = search_field_tag :search, params[:search], placeholder: "Search for projects, issues etc", class: "form-control search-text-input", id: "dashboard_search", autofocus: true + = search_field_tag :search, params[:search], placeholder: "Search for projects, issues etc", class: "form-control search-text-input", id: "dashboard_search", autofocus: true, spellcheck: false %span.input-group-btn = button_tag 'Search', class: "btn btn-primary" - unless params[:snippets].eql? 'true' diff --git a/app/views/shared/_commit_message_container.html.haml b/app/views/shared/_commit_message_container.html.haml index 5071ff640f1..cc3f1268f8b 100644 --- a/app/views/shared/_commit_message_container.html.haml +++ b/app/views/shared/_commit_message_container.html.haml @@ -6,7 +6,7 @@ .max-width-marker = text_area_tag 'commit_message', (params[:commit_message] || local_assigns[:text]), - class: 'form-control', placeholder: local_assigns[:placeholder], + class: 'form-control js-quick-submit', placeholder: local_assigns[:placeholder], required: true, rows: (local_assigns[:rows] || 3) - if local_assigns[:hint] %p.hint diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 33ec726e93c..594e54f404c 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -10,7 +10,7 @@ %strong= 'Title *' .col-sm-10 = f.text_field :title, maxlength: 255, autofocus: true, autocomplete: 'off', - class: 'form-control pad js-gfm-input', required: true + class: 'form-control pad js-gfm-input js-quick-submit', required: true - if issuable.is_a?(MergeRequest) %p.help-block @@ -26,7 +26,7 @@ = render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do = render 'projects/zen', f: f, attr: :description, - classes: 'description form-control' + classes: 'description form-control js-quick-submit' .col-sm-12.hint .pull-left Parsed with diff --git a/app/views/shared/issuable/_search_form.html.haml b/app/views/shared/issuable/_search_form.html.haml index 58c3de64b77..3a5ad00aa91 100644 --- a/app/views/shared/issuable/_search_form.html.haml +++ b/app/views/shared/issuable/_search_form.html.haml @@ -1,6 +1,6 @@ = form_tag(path, method: :get, id: "issue_search_form", class: 'pull-left issue-search-form') do .append-right-10.hidden-xs.hidden-sm - = search_field_tag :issue_search, params[:issue_search], { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input' } + = search_field_tag :issue_search, params[:issue_search], { placeholder: 'Filter by title or description', class: 'form-control issue_search search-text-input', spellcheck: false } = hidden_field_tag :state, params['state'] = hidden_field_tag :scope, params['scope'] = hidden_field_tag :assignee_id, params['assignee_id'] diff --git a/app/views/shared/projects/_list.html.haml b/app/views/shared/projects/_list.html.haml index 16e1d8421de..357cfd6a370 100644 --- a/app/views/shared/projects/_list.html.haml +++ b/app/views/shared/projects/_list.html.haml @@ -2,11 +2,12 @@ - avatar = true unless local_assigns[:avatar] == false - stars = true unless local_assigns[:stars] == false - ci = false unless local_assigns[:ci] == true +- skip_namespace = false unless local_assigns[:skip_namespace] == true %ul.projects-list - projects.each_with_index do |project, i| - css_class = (i >= projects_limit) ? 'hide' : nil - = render "shared/projects/project", project: project, + = render "shared/projects/project", project: project, skip_namespace: skip_namespace, avatar: avatar, stars: stars, css_class: css_class, ci: ci - if projects.size > projects_limit diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml index e67e5a8a638..aee839b44e7 100644 --- a/app/views/shared/projects/_project.html.haml +++ b/app/views/shared/projects/_project.html.haml @@ -1,6 +1,7 @@ - avatar = true unless local_assigns[:avatar] == false - stars = true unless local_assigns[:stars] == false - ci = false unless local_assigns[:ci] == true +- skip_namespace = false unless local_assigns[:skip_namespace] == true - css_class = '' unless local_assigns[:css_class] - css_class += " no-description" unless project.description.present? %li.project-row{ class: css_class } @@ -11,7 +12,7 @@ = project_icon(project, alt: '', class: 'avatar project-avatar s46') %span.project-full-name %span.namespace-name - - if project.namespace + - if project.namespace && !skip_namespace = project.namespace.human_name \/ %span.project-name.filter-title |