diff options
author | Felipe Artur <fcardozo@gitlab.com> | 2018-06-21 15:22:40 +0300 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2018-06-21 15:22:40 +0300 |
commit | 3e66795ef1ff1228906239763910b051d8afcc37 (patch) | |
tree | df6424d9ec008f5d1da455f8465681b371c4a11e /app/views | |
parent | 14e35ac9b19d358d84e0cfd167f74036937285b6 (diff) |
Changes tab VUE refactoring
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/issues/_discussion.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/merge_requests/show.html.haml | 35 | ||||
-rw-r--r-- | app/views/shared/notes/_note.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/notes/_notes_with_form.html.haml | 7 | ||||
-rw-r--r-- | app/views/shared/runners/show.html.haml | 14 |
5 files changed, 22 insertions, 39 deletions
diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index 816f2fa816d..665968a64e1 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -8,5 +8,6 @@ %section.js-vue-notes-event #js-vue-notes{ data: { notes_data: notes_data(@issue), noteable_data: serialize_issuable(@issue), - noteable_type: 'issue', + noteable_type: 'Issue', + target_type: 'issue', current_user_data: UserSerializer.new.represent(current_user, only_path: true).to_json } } diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 2f1877a15c2..4fe0ae17ec5 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -52,24 +52,7 @@ Changes %span.badge.badge-pill= @merge_request.diff_size - - if has_vue_discussions_cookie? - #js-vue-discussion-counter - - else - #resolve-count-app.line-resolve-all-container.prepend-top-10{ "v-cloak" => true } - %resolve-count{ "inline-template" => true, ":logged-out" => "#{current_user.nil?}" } - %div - .line-resolve-all{ "v-show" => "discussionCount > 0", - ":class" => "{ 'has-next-btn': !loggedOut && resolvedDiscussionCount !== discussionCount }" } - %span.line-resolve-btn.is-disabled{ type: "button", - ":class" => "{ 'is-active': resolvedDiscussionCount === discussionCount }" } - %template{ 'v-if' => 'resolvedDiscussionCount === discussionCount' } - = render 'shared/icons/icon_status_success_solid.svg' - %template{ 'v-else' => '' } - = render 'shared/icons/icon_resolve_discussion.svg' - %span.line-resolve-text - {{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved - = render "discussions/new_issue_for_all_discussions", merge_request: @merge_request - = render "discussions/jump_to_next" + #js-vue-discussion-counter .tab-content#diff-notes-app #notes.notes.tab-pane.voting_notes @@ -77,20 +60,20 @@ %section.col-md-12 %script.js-notes-data{ type: "application/json" }= initial_notes_data(true).to_json.html_safe .issuable-discussion.js-vue-notes-event - = render "projects/merge_requests/discussion" - - if has_vue_discussions_cookie? - #js-vue-mr-discussions{ data: { notes_data: notes_data(@merge_request), - noteable_data: serialize_issuable(@merge_request), - noteable_type: 'merge_request', - current_user_data: UserSerializer.new.represent(current_user).to_json} } + #js-vue-mr-discussions{ data: { notes_data: notes_data(@merge_request), + noteable_data: serialize_issuable(@merge_request), + noteable_type: 'MergeRequest', + target_type: 'merge_request', + current_user_data: UserSerializer.new(project: @project).represent(current_user, {}, MergeRequestUserEntity).to_json} } #commits.commits.tab-pane -# This tab is always loaded via AJAX #pipelines.pipelines.tab-pane - if @pipelines.any? = render 'projects/commit/pipelines_list', disable_initialization: true, endpoint: pipelines_project_merge_request_path(@project, @merge_request) - #diffs.diffs.tab-pane{ data: { "is-locked" => @merge_request.discussion_locked? } } - -# This tab is always loaded via AJAX + #js-diffs-app.diffs.tab-pane{ data: { "is-locked" => @merge_request.discussion_locked?, + endpoint: diffs_project_merge_request_path(@project, @merge_request, 'json', request.query_parameters), + current_user_data: UserSerializer.new(project: @project).represent(current_user, {}, MergeRequestUserEntity).to_json } } .mr-loading-status = spinner diff --git a/app/views/shared/notes/_note.html.haml b/app/views/shared/notes/_note.html.haml index 526330f4e50..d4e8f30e458 100644 --- a/app/views/shared/notes/_note.html.haml +++ b/app/views/shared/notes/_note.html.haml @@ -59,7 +59,7 @@ .note-awards = render 'award_emoji/awards_block', awardable: note, inline: false - if note.system - .system-note-commit-list-toggler + .system-note-commit-list-toggler.hide Toggle commit list %i.fa.fa-angle-down - if note.attachment.url diff --git a/app/views/shared/notes/_notes_with_form.html.haml b/app/views/shared/notes/_notes_with_form.html.haml index b98d5339d2d..e0832fd9136 100644 --- a/app/views/shared/notes/_notes_with_form.html.haml +++ b/app/views/shared/notes/_notes_with_form.html.haml @@ -1,14 +1,13 @@ - issuable = @issue || @merge_request - discussion_locked = issuable&.discussion_locked? -- unless has_vue_discussions_cookie? - %ul#notes-list.notes.main-notes-list.timeline - = render "shared/notes/notes" +%ul#notes-list.notes.main-notes-list.timeline + = render "shared/notes/notes" = render 'shared/notes/edit_form', project: @project - if can_create_note? - %ul.notes.notes-form.timeline{ :class => ('hidden' if has_vue_discussions_cookie?) } + %ul.notes.notes-form.timeline %li.timeline-entry .timeline-entry-inner .flash-container.timeline-content diff --git a/app/views/shared/runners/show.html.haml b/app/views/shared/runners/show.html.haml index e50b7fa68dd..96527fcb4f2 100644 --- a/app/views/shared/runners/show.html.haml +++ b/app/views/shared/runners/show.html.haml @@ -21,17 +21,17 @@ %th Value %tr %td Active - %td= @runner.active? ? _('Yes') : _('No') + %td= @runner.active? ? 'Yes' : 'No' %tr %td Protected - %td= @runner.ref_protected? ? _('Yes') : _('No') + %td= @runner.active? ? _('Yes') : _('No') %tr - %td= _('Can run untagged jobs') - %td= @runner.run_untagged? ? _('Yes') : _('No') + %td Can run untagged jobs + %td= @runner.run_untagged? ? 'Yes' : 'No' - unless @runner.group_type? %tr - %td= _('Locked to this project') - %td= @runner.locked? ? _('Yes') : _('No') + %td Locked to this project + %td= @runner.locked? ? 'Yes' : 'No' %tr %td Tags %td @@ -60,7 +60,7 @@ %td Description %td= @runner.description %tr - %td= _('Maximum job timeout') + %td Maximum job timeout %td= @runner.maximum_timeout_human_readable %tr %td Last contact |