Working on dashboard restyle and events refactoring
This commit is contained in:
parent
a6f58b9c43
commit
d23022c6f6
11 changed files with 194 additions and 170 deletions
|
@ -2,7 +2,7 @@
|
|||
%li.commit
|
||||
%p
|
||||
= link_to commit.short_id(8), project_commit_path(project, id: commit.id), class: "commit_short_id"
|
||||
%strong.cdark= commit.author_name
|
||||
%span= commit.author_name
|
||||
–
|
||||
= image_tag gravatar_icon(commit.author_email), class: "avatar", width: 16
|
||||
= gfm escape_once(truncate(commit.title, length: 50)) rescue "--broken encoding"
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
- if event.allowed?
|
||||
- if event.issue?
|
||||
.event_feed
|
||||
%div.event-item
|
||||
- if event.issue?
|
||||
= render "events/event_issue", event: event
|
||||
|
||||
- elsif event.merge_request?
|
||||
.event_feed
|
||||
- elsif event.merge_request?
|
||||
= render "events/event_merge_request", event: event
|
||||
|
||||
- elsif event.push?
|
||||
.event_feed
|
||||
- elsif event.push?
|
||||
= render "events/event_push", event: event
|
||||
|
||||
- elsif event.membership_changed?
|
||||
.event_feed
|
||||
- elsif event.membership_changed?
|
||||
= render "events/event_membership_changed", event: event
|
||||
|
||||
%span.cgray.right
|
||||
= time_ago_in_words(event.created_at)
|
||||
ago.
|
||||
.clearfix
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
= image_tag gravatar_icon(event.author_email), class: "avatar"
|
||||
%strong #{event.author_name}
|
||||
%span.event_label{class: event.action_name}= event.action_name
|
||||
issue
|
||||
= link_to project_issue_path(event.project, event.issue) do
|
||||
%strong= truncate event.issue_title
|
||||
at
|
||||
%strong= link_to event.project.name, event.project
|
||||
%span.cgray
|
||||
= time_ago_in_words(event.created_at)
|
||||
ago.
|
||||
.event-title
|
||||
%strong.author_name #{event.author_name}
|
||||
%span.event_label{class: event.action_name}= event.action_name
|
||||
issue
|
||||
= link_to project_issue_path(event.project, event.issue) do
|
||||
%strong= truncate event.issue_title
|
||||
at
|
||||
%strong= link_to event.project.name, event.project
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
= image_tag gravatar_icon(event.author_email), class: "avatar"
|
||||
%strong #{event.author_name}
|
||||
%span.event_label{class: event.action_name}= event.action_name
|
||||
project
|
||||
%strong= link_to event.project_name, event.project
|
||||
%span.cgray
|
||||
= time_ago_in_words(event.created_at)
|
||||
ago.
|
||||
.event-title
|
||||
%strong.author_name #{event.author_name}
|
||||
%span.event_label{class: event.action_name}= event.action_name
|
||||
project
|
||||
%strong= link_to event.project_name, event.project
|
||||
%span.cgray
|
||||
= time_ago_in_words(event.created_at)
|
||||
ago.
|
||||
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
- if event.action_name == "merged"
|
||||
.event_icon= image_tag "event_mr_merged.png"
|
||||
= image_tag gravatar_icon(event.author_email), class: "avatar"
|
||||
%strong #{event.author_name}
|
||||
%span.event_label{class: event.action_name}= event.action_name
|
||||
merge request
|
||||
= link_to project_merge_request_path(event.project, event.merge_request) do
|
||||
%strong= truncate event.merge_request_title
|
||||
at
|
||||
%strong= link_to event.project.name, event.project
|
||||
%span.cgray
|
||||
= time_ago_in_words(event.created_at)
|
||||
ago.
|
||||
%br
|
||||
%span= event.merge_request.source_branch
|
||||
→
|
||||
%span= event.merge_request.target_branch
|
||||
.event-title
|
||||
%strong.author_name #{event.author_name}
|
||||
%span.event_label{class: event.action_name}= event.action_name
|
||||
merge request
|
||||
= link_to project_merge_request_path(event.project, event.merge_request) do
|
||||
%strong= truncate event.merge_request_title
|
||||
at
|
||||
%strong= link_to event.project.name, event.project
|
||||
.event-body
|
||||
%span= event.merge_request.source_branch
|
||||
→
|
||||
%span= event.merge_request.target_branch
|
||||
|
||||
|
|
|
@ -1,30 +1,31 @@
|
|||
%div
|
||||
.event_icon= image_tag "event_push.png"
|
||||
= image_tag gravatar_icon(event.author_email), class: "avatar"
|
||||
%strong #{event.author_name}
|
||||
%span.event_label.pushed= event.push_action_name
|
||||
= event.ref_type
|
||||
= link_to project_commits_path(event.project, ref: event.ref_name) do
|
||||
%strong= event.ref_name
|
||||
at
|
||||
%strong= link_to event.project.name, event.project
|
||||
%span.cgray
|
||||
= time_ago_in_words(event.created_at)
|
||||
ago.
|
||||
|
||||
.event-title
|
||||
%strong.author_name #{event.author_name}
|
||||
%span.event_label.pushed= event.push_action_name
|
||||
= event.ref_type
|
||||
= link_to project_commits_path(event.project, ref: event.ref_name) do
|
||||
%strong= event.ref_name
|
||||
at
|
||||
%strong= link_to event.project.name, event.project
|
||||
- if event.push_with_commits?
|
||||
- if event.commits_count > 1
|
||||
= link_to compare_project_commits_path(event.project, from: event.parent_commit.id, to: event.last_commit.id) do
|
||||
%strong #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]}
|
||||
|
||||
- if event.push_with_commits?
|
||||
- if event.commits_count > 1
|
||||
= link_to compare_project_commits_path(event.project, from: event.parent_commit.id, to: event.last_commit.id) do
|
||||
%strong #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]}
|
||||
- project = event.project
|
||||
%ul.unstyled.event_commits
|
||||
- if event.commits_count > 3
|
||||
- event.commits[0...2].each do |commit|
|
||||
= render "events/commit", commit: commit, project: project
|
||||
%li
|
||||
%br
|
||||
\... and #{event.commits_count - 2} more commits
|
||||
- else
|
||||
- event.commits.each do |commit|
|
||||
= render "events/commit", commit: commit, project: project
|
||||
|
||||
.event-body
|
||||
%ul.unstyled.event_commits
|
||||
- if event.commits_count > 3
|
||||
- event.commits[0...2].each do |commit|
|
||||
= render "events/commit", commit: commit, project: project
|
||||
%li
|
||||
%br
|
||||
\... and #{event.commits_count - 2} more commits
|
||||
- else
|
||||
- event.commits.each do |commit|
|
||||
= render "events/commit", commit: commit, project: project
|
||||
.clearfix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue