summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-18 17:16:39 -0200
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-02-20 12:12:05 -0200
commit72009896758dfcf73f94146b67e7758190ce7039 (patch)
tree1a6068f166e35bbff87c96c3dc8e4e827ef74cf0 /app/views
parent8673a70f500ae5b0e93336f9213947f0aba67033 (diff)
downloadgitlab-ce-72009896758dfcf73f94146b67e7758190ce7039.tar.gz
Refactoring task queue partials
Diffstat (limited to 'app/views')
-rw-r--r--app/views/dashboard/tasks/_common.html.haml17
-rw-r--r--app/views/dashboard/tasks/_note.html.haml26
-rw-r--r--app/views/dashboard/tasks/_task.html.haml25
3 files changed, 19 insertions, 49 deletions
diff --git a/app/views/dashboard/tasks/_common.html.haml b/app/views/dashboard/tasks/_common.html.haml
deleted file mode 100644
index b6d0c3c03ac..00000000000
--- a/app/views/dashboard/tasks/_common.html.haml
+++ /dev/null
@@ -1,17 +0,0 @@
-.task-title
- %span.author_name= link_to_author task
- %span.task_label{class: task.action_name}
- = task_action_name(task)
-
- %strong= link_to "##{task.target_iid}", [task.project.namespace.becomes(Namespace), task.project, task.target]
-
- &middot; #{time_ago_with_tooltip(task.created_at)}
-
-- if task.pending?
- .task-actions.pull-right
- = link_to 'Done', [:dashboard, task], method: :delete, class: 'btn'
-
-- if task.body?
- .task-body
- .task-note
- = task.target.title
diff --git a/app/views/dashboard/tasks/_note.html.haml b/app/views/dashboard/tasks/_note.html.haml
deleted file mode 100644
index 2cfd55afccb..00000000000
--- a/app/views/dashboard/tasks/_note.html.haml
+++ /dev/null
@@ -1,26 +0,0 @@
-.task-title
- %span.author_name
- = link_to_author task
- %span.task_label{class: task.action_name}
- = task_action_name(task)
- = task_note_link_html(task)
-
- &middot; #{time_ago_with_tooltip(task.created_at)}
-
-- if task.pending?
- .task-actions.pull-right
- = link_to 'Done', [:dashboard, task], method: :delete, class: 'btn'
-
-.task-body
- .task-note
- .md
- = task_note(task.note_text, project: task.project)
- - note = task.note
- - if note.attachment.url
- - if note.attachment.image?
- = link_to note.attachment.url, target: '_blank' do
- = image_tag note.attachment.url, class: 'note-image-attach'
- - else
- = link_to note.attachment.url, target: "_blank", class: 'note-file-attach' do
- %i.fa.fa-paperclip
- = note.attachment_identifier
diff --git a/app/views/dashboard/tasks/_task.html.haml b/app/views/dashboard/tasks/_task.html.haml
index 2ca8f0dad63..d08b021f53b 100644
--- a/app/views/dashboard/tasks/_task.html.haml
+++ b/app/views/dashboard/tasks/_task.html.haml
@@ -1,8 +1,21 @@
%li{class: "task task-#{task.done? ? 'done' : 'pending'}", id: dom_id(task) }
- .task-item{class: "#{task.body? ? 'task-block' : 'task-inline' }"}
- = image_tag avatar_icon(task.author_email, 40), class: "avatar s40", alt:''
+ .task-item{class: 'task-block'}
+ = image_tag avatar_icon(task.author_email, 40), class: 'avatar s40', alt:''
- - if task.note.present?
- = render 'note', task: task
- - else
- = render 'common', task: task
+ .task-title
+ %span.author_name
+ = link_to_author task
+ %span.task_label
+ = task_action_name(task)
+ = task_target_link_html(task)
+
+ &middot; #{time_ago_with_tooltip(task.created_at)}
+
+ - if task.pending?
+ .task-actions.pull-right
+ = link_to 'Done', [:dashboard, task], method: :delete, class: 'btn'
+
+ .task-body
+ .task-note
+ .md
+ = task_body(task.body, project: task.project)