Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAndrew8xx8 <avk@8xx8.ru>2013-02-18 16:49:56 +0400
committerAndrew8xx8 <avk@8xx8.ru>2013-02-18 16:49:56 +0400
commitff94f29be5330ebaad3efe9e541360deff2b0d70 (patch)
treeee42f9112bdc481ff5ff3166726dc04e9f42740d /app
parent231d9e0426b875eda9ea70baaf5dccbcdd463dab (diff)
States events fixed
Diffstat (limited to 'app')
-rw-r--r--app/views/issues/_show.html.haml4
-rw-r--r--app/views/issues/show.html.haml4
-rw-r--r--app/views/merge_requests/show/_mr_box.html.haml16
-rw-r--r--app/views/merge_requests/show/_mr_title.html.haml3
-rw-r--r--app/views/milestones/_milestone.html.haml2
-rw-r--r--app/views/milestones/show.html.haml2
6 files changed, 16 insertions, 15 deletions
diff --git a/app/views/issues/_show.html.haml b/app/views/issues/_show.html.haml
index b078115a5f5..3d1ecd43881 100644
--- a/app/views/issues/_show.html.haml
+++ b/app/views/issues/_show.html.haml
@@ -9,9 +9,9 @@
= issue.notes.count
- if can? current_user, :modify_issue, issue
- if issue.closed?
- = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state: :reopened }, status_only: true), method: :put, class: "btn btn-small grouped reopen_issue", remote: true
+ = link_to 'Reopen', project_issue_path(issue.project, issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn btn-small grouped reopen_issue", remote: true
- else
- = link_to 'Close', project_issue_path(issue.project, issue, issue: {state: :closed }, status_only: true), method: :put, class: "btn btn-small grouped close_issue", remote: true
+ = link_to 'Close', project_issue_path(issue.project, issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn btn-small grouped close_issue", remote: true
= link_to edit_project_issue_path(issue.project, issue), class: "btn btn-small edit-issue-link grouped" do
%i.icon-edit
Edit
diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml
index ab10d619cae..f1a97e10913 100644
--- a/app/views/issues/show.html.haml
+++ b/app/views/issues/show.html.haml
@@ -8,9 +8,9 @@
%span.pull-right
- if can?(current_user, :admin_project, @project) || @issue.author == current_user
- if @issue.closed?
- = link_to 'Reopen', project_issue_path(@project, @issue, issue: {state: :reopened }, status_only: true), method: :put, class: "btn grouped reopen_issue"
+ = link_to 'Reopen', project_issue_path(@project, @issue, issue: {state_event: :reopen }, status_only: true), method: :put, class: "btn grouped reopen_issue"
- else
- = link_to 'Close', project_issue_path(@project, @issue, issue: {state: :closed }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue"
+ = link_to 'Close', project_issue_path(@project, @issue, issue: {state_event: :close }, status_only: true), method: :put, class: "btn grouped close_issue", title: "Close Issue"
- if can?(current_user, :admin_project, @project) || @issue.author == current_user
= link_to edit_project_issue_path(@project, @issue), class: "btn grouped" do
%i.icon-edit
diff --git a/app/views/merge_requests/show/_mr_box.html.haml b/app/views/merge_requests/show/_mr_box.html.haml
index fdc61a97924..3b54f613f58 100644
--- a/app/views/merge_requests/show/_mr_box.html.haml
+++ b/app/views/merge_requests/show/_mr_box.html.haml
@@ -23,12 +23,12 @@
- if @merge_request.closed?
.ui-box-bottom
- - if @merge_request.merged?
- %span
- Merged by #{link_to_member(@project, @merge_request.merge_event.author)}
- %small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago.
- - elsif @merge_request.closed_event
- %span
- Closed by #{link_to_member(@project, @merge_request.closed_event.author)}
- %small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago.
+ %span
+ Closed by #{link_to_member(@project, @merge_request.closed_event.author)}
+ %small #{time_ago_in_words(@merge_request.closed_event.created_at)} ago.
+ - if @merge_request.merged?
+ .ui-box-bottom
+ %span
+ Merged by #{link_to_member(@project, @merge_request.merge_event.author)}
+ %small #{time_ago_in_words(@merge_request.merge_event.created_at)} ago.
diff --git a/app/views/merge_requests/show/_mr_title.html.haml b/app/views/merge_requests/show/_mr_title.html.haml
index 26a8296d96b..8f1b79c831d 100644
--- a/app/views/merge_requests/show/_mr_title.html.haml
+++ b/app/views/merge_requests/show/_mr_title.html.haml
@@ -17,7 +17,8 @@
%li= link_to "Email Patches", project_merge_request_path(@project, @merge_request, format: :patch)
%li= link_to "Plain Diff", project_merge_request_path(@project, @merge_request, format: :diff)
- = link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: {closed: true }, status_only: true), method: :put, class: "btn grouped btn-close", title: "Close merge request"
+ = link_to 'Close', project_merge_request_path(@project, @merge_request, merge_request: {state_event: :close }), method: :put, class: "btn grouped btn-close", title: "Close merge request"
+ = p project_merge_request_path(@project, @merge_request, merge_request: {state_event: :close })
= link_to edit_project_merge_request_path(@project, @merge_request), class: "btn grouped" do
%i.icon-edit
diff --git a/app/views/milestones/_milestone.html.haml b/app/views/milestones/_milestone.html.haml
index a8bbd434235..8a3727c6f6a 100644
--- a/app/views/milestones/_milestone.html.haml
+++ b/app/views/milestones/_milestone.html.haml
@@ -6,7 +6,7 @@
Edit
%h4
= link_to_gfm truncate(milestone.title, length: 100), project_milestone_path(milestone.project, milestone)
- - if milestone.expired? and not milestone.closed
+ - if milestone.expired? and not milestone.closed?
%span.cred (Expired)
%small
= milestone.expires_at
diff --git a/app/views/milestones/show.html.haml b/app/views/milestones/show.html.haml
index f8ed851821e..c2b09542246 100644
--- a/app/views/milestones/show.html.haml
+++ b/app/views/milestones/show.html.haml
@@ -25,7 +25,7 @@
%hr
%p
%span All issues for this milestone are closed. You may close milestone now.
- = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state: :closed }), method: :put, class: "btn btn-small btn-remove"
+ = link_to 'Close Milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-small btn-remove"
.ui-box.ui-box-show
.ui-box-head