diff options
author | Jose Ivan Vargas <jvargas@gitlab.com> | 2018-03-02 01:09:25 +0300 |
---|---|---|
committer | Jose Ivan Vargas <jvargas@gitlab.com> | 2018-03-07 01:32:26 +0300 |
commit | a16547e5c2d42bfe7af025556e90f0f895a97f59 (patch) | |
tree | 093a4c25545f78454fda80c681570e264aab143b /app/views | |
parent | f42397d19a735de2e5ae38725270614826ec05da (diff) |
used respond_to formats for persisting flash messages instead
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/milestones/show.html.haml | 3 | ||||
-rw-r--r-- | app/views/shared/_label.html.haml | 7 | ||||
-rw-r--r-- | app/views/shared/milestones/_milestone.html.haml | 7 |
3 files changed, 10 insertions, 7 deletions
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index baf9dd465c0..b423888c875 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -32,7 +32,8 @@ milestone_title: @milestone.title, url: promote_project_milestone_path(@milestone.project, @milestone), container: 'body' }, - disabled: true } + disabled: true, + type: 'button' } = _('Promote') #promote-milestone-modal diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml index b49be4a4376..5afbc78df53 100644 --- a/app/views/shared/_label.html.haml +++ b/app/views/shared/_label.html.haml @@ -48,15 +48,16 @@ .pull-right.hidden-xs.hidden-sm - if label.is_a?(ProjectLabel) && label.project.group && can?(current_user, :admin_label, label.project.group) - %a.js-promote-project-label-button.btn.btn-transparent.btn-action.has-tooltip{ title: _('Promote to Group Label'), + %button.js-promote-project-label-button.btn.btn-transparent.btn-action.has-tooltip{ title: _('Promote to Group Label'), + disabled: true, + type: 'button', data: { url: promote_project_label_path(label.project, label), label_title: label.title, label_color: label.color, label_text_color: label.text_color, target: '#promote-label-modal', container: 'body', - toggle: 'modal' }, - disabled: true } + toggle: 'modal' } } = sprite_icon('level-up') - if can?(current_user, :admin_label, label) = link_to edit_label_path(label), title: "Edit", class: 'btn btn-transparent btn-action', data: {toggle: "tooltip"} do diff --git a/app/views/shared/milestones/_milestone.html.haml b/app/views/shared/milestones/_milestone.html.haml index 7a23f79d8c5..fe814cbc561 100644 --- a/app/views/shared/milestones/_milestone.html.haml +++ b/app/views/shared/milestones/_milestone.html.haml @@ -51,13 +51,14 @@ \ - if @project.group - %a.js-promote-project-milestone-button.btn.btn-xs.btn-grouped.has-tooltip{ title: _('Promote to Group Milestone'), + %button.js-promote-project-milestone-button.btn.btn-xs.btn-grouped.has-tooltip{ title: _('Promote to Group Milestone'), + disabled: true, + type: 'button', data: { url: promote_project_milestone_path(milestone.project, milestone), milestone_title: milestone.title, target: '#promote-milestone-modal', container: 'body', - toggle: 'modal' }, - disabled: true } + toggle: 'modal' } } = _('Promote') = link_to 'Close Milestone', project_milestone_path(@project, milestone, milestone: {state_event: :close }), method: :put, remote: true, class: "btn btn-xs btn-close btn-grouped" |