diff options
Diffstat (limited to 'app/views/projects/blob')
-rw-r--r-- | app/views/projects/blob/_breadcrumb.html.haml | 8 | ||||
-rw-r--r-- | app/views/projects/blob/_editor.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/blob/_header.html.haml | 8 | ||||
-rw-r--r-- | app/views/projects/blob/_viewer_switcher.html.haml | 6 |
4 files changed, 13 insertions, 15 deletions
diff --git a/app/views/projects/blob/_breadcrumb.html.haml b/app/views/projects/blob/_breadcrumb.html.haml index 710417f90e3..e666bb237bd 100644 --- a/app/views/projects/blob/_breadcrumb.html.haml +++ b/app/views/projects/blob/_breadcrumb.html.haml @@ -23,13 +23,13 @@ - if blob.readable_text? - if blame = link_to 'Normal view', project_blob_path(@project, @id), - class: 'gl-button btn' + class: 'gl-button btn btn-default' - else = link_to 'Blame', project_blame_path(@project, @id), - class: 'gl-button btn js-blob-blame-link' unless blob.empty? + class: 'gl-button btn btn-default js-blob-blame-link' unless blob.empty? = link_to 'History', project_commits_path(@project, @id), - class: 'gl-button btn' + class: 'gl-button btn btn-default' = link_to 'Permalink', project_blob_path(@project, - tree_join(@commit.sha, @path)), class: 'gl-button btn js-data-file-blob-permalink-url' + tree_join(@commit.sha, @path)), class: 'gl-button btn btn-default js-data-file-blob-permalink-url' diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index b0317d84cdc..7d3a0c4a026 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -10,14 +10,14 @@ - if current_action?(:edit) || current_action?(:update) %span.float-left.gl-mr-3 = text_field_tag 'file_path', (params[:file_path] || @path), - class: 'form-control new-file-path js-file-path-name-input' + class: 'form-control gl-form-input new-file-path js-file-path-name-input' = render 'template_selectors' - if current_action?(:new) || current_action?(:create) %span.float-left.gl-mr-3 \/ = text_field_tag 'file_name', params[:file_name], placeholder: "File name", - required: true, class: 'form-control new-file-name js-file-path-name-input', value: params[:file_name] || (should_suggest_gitlab_ci_yml? ? '.gitlab-ci.yml' : '') + required: true, class: 'form-control gl-form-input new-file-name js-file-path-name-input', value: params[:file_name] || (should_suggest_gitlab_ci_yml? ? '.gitlab-ci.yml' : '') = render 'template_selectors' - if should_suggest_gitlab_ci_yml? .js-suggest-gitlab-ci-yml{ data: { target: '#gitlab-ci-yml-selector', @@ -36,8 +36,6 @@ %span.soft-wrap = custom_icon('icon_soft_wrap') Soft wrap - .encoding-selector - = select_tag :encoding, options_for_select([ "base64", "text" ], "text"), class: 'select2', tabindex: '-1' .file-editor.code .js-edit-mode-pane.qa-editor#editor{ data: { 'editor-loading': true } }< diff --git a/app/views/projects/blob/_header.html.haml b/app/views/projects/blob/_header.html.haml index 6d01206a128..a7f13989ca7 100644 --- a/app/views/projects/blob/_header.html.haml +++ b/app/views/projects/blob/_header.html.haml @@ -2,23 +2,23 @@ .js-file-title.file-title-flex-parent = render 'projects/blob/header_content', blob: blob - .file-actions.gl-display-flex.gl-flex-fill-1.gl-align-self-start.gl-md-justify-content-end< + .file-actions.gl-display-flex.gl-align-items-center.gl-flex-wrap.gl-md-justify-content-end< = render 'projects/blob/viewer_switcher', blob: blob unless blame - if Feature.enabled?(:consolidated_edit_button, @project) = render 'shared/web_ide_button', blob: blob - else = edit_blob_button(@project, @ref, @path, blob: blob) = ide_edit_button(@project, @ref, @path, blob: blob) - .btn-group.ml-2{ role: "group" }> + .btn-group{ role: "group", class: ("gl-ml-3" if current_user) }> = render_if_exists 'projects/blob/header_file_locks_link' - if current_user = replace_blob_link(@project, @ref, @path, blob: blob) = delete_blob_link(@project, @ref, @path, blob: blob) - .btn-group.ml-2{ role: "group" } + .btn-group.gl-ml-3{ role: "group" } = copy_blob_source_button(blob) unless blame = open_raw_blob_button(blob) = download_blob_button(blob) = view_on_environment_button(@commit.sha, @path, @environment) if @environment -= render 'projects/fork_suggestion' += render_fork_suggestion = render_if_exists 'projects/blob/header_file_locks', project: @project, path: @path diff --git a/app/views/projects/blob/_viewer_switcher.html.haml b/app/views/projects/blob/_viewer_switcher.html.haml index c6b13deaece..043b8629289 100644 --- a/app/views/projects/blob/_viewer_switcher.html.haml +++ b/app/views/projects/blob/_viewer_switcher.html.haml @@ -2,11 +2,11 @@ - simple_viewer = blob.simple_viewer - rich_viewer = blob.rich_viewer - .btn-group.js-blob-viewer-switcher.ml-2{ role: "group" }> + .btn-group.js-blob-viewer-switcher.gl-ml-3{ role: "group" }> - simple_label = "Display #{simple_viewer.switcher_title}" - %button.btn.gl-button.btn-default.btn-sm.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => simple_label, title: simple_label, data: { viewer: 'simple', container: 'body' } }> + %button.btn.gl-button.btn-default.btn-icon.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => simple_label, title: simple_label, data: { viewer: 'simple', container: 'body' } }> = sprite_icon(simple_viewer.switcher_icon) - rich_label = "Display #{rich_viewer.switcher_title}" - %button.btn.gl-button.btn-default.btn-sm.js-blob-viewer-switch-btn.gl-mr-3.has-tooltip{ 'aria-label' => rich_label, title: rich_label, data: { viewer: 'rich', container: 'body' } }> + %button.btn.gl-button.btn-default.btn-icon.js-blob-viewer-switch-btn.has-tooltip{ 'aria-label' => rich_label, title: rich_label, data: { viewer: 'rich', container: 'body' } }> = sprite_icon(rich_viewer.switcher_icon) |