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
|
@ -185,36 +185,6 @@ span.update-author {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.event_label {
|
|
||||||
@extend .label;
|
|
||||||
background-color: #999;
|
|
||||||
|
|
||||||
&.pushed {
|
|
||||||
background-color: #4A97BD;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.opened {
|
|
||||||
background-color: #469847;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.closed {
|
|
||||||
background-color: #B94A48;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.merged {
|
|
||||||
background-color: #2A2;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.joined {
|
|
||||||
background-color: #1ca9dd;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.left {
|
|
||||||
background-color: #888;
|
|
||||||
float:none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
form {
|
form {
|
||||||
@extend .form-horizontal;
|
@extend .form-horizontal;
|
||||||
|
|
||||||
|
@ -355,41 +325,6 @@ p.time {
|
||||||
border:2px solid #ddd;
|
border:2px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.event_feed {
|
|
||||||
min-height:40px;
|
|
||||||
border-bottom:1px solid #ddd;
|
|
||||||
.avatar {
|
|
||||||
width:32px;
|
|
||||||
}
|
|
||||||
.event_icon {
|
|
||||||
float:right;
|
|
||||||
margin-right:2px;
|
|
||||||
img {
|
|
||||||
width:20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ul {
|
|
||||||
margin-left:50px;
|
|
||||||
margin-bottom:5px;
|
|
||||||
.avatar {
|
|
||||||
width:24px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
padding: 15px 5px;
|
|
||||||
&:last-child { border:none }
|
|
||||||
.wll:hover { background:none }
|
|
||||||
|
|
||||||
.event_commits {
|
|
||||||
margin-top: 5px;
|
|
||||||
|
|
||||||
li.commit {
|
|
||||||
background: transparent;
|
|
||||||
padding:5px;
|
|
||||||
border:none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.ico {
|
.ico {
|
||||||
background: url("images.png") no-repeat -85px -77px;
|
background: url("images.png") no-repeat -85px -77px;
|
||||||
|
@ -639,22 +574,6 @@ li.note {
|
||||||
background:#fff;
|
background:#fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Push event widget
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
.event_lp {
|
|
||||||
@extend .ui-box;
|
|
||||||
color:#777;
|
|
||||||
margin-bottom:20px;
|
|
||||||
padding:8px;
|
|
||||||
@include border-radius(4px);
|
|
||||||
min-height:22px;
|
|
||||||
|
|
||||||
.avatar {
|
|
||||||
width:24px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.supp_diff_link,
|
.supp_diff_link,
|
||||||
.mr_show_all_commits {
|
.mr_show_all_commits {
|
||||||
|
|
|
@ -143,6 +143,7 @@ $hover: #fdf5d9;
|
||||||
@import "sections/projects.scss";
|
@import "sections/projects.scss";
|
||||||
@import "sections/merge_requests.scss";
|
@import "sections/merge_requests.scss";
|
||||||
@import "sections/graph.scss";
|
@import "sections/graph.scss";
|
||||||
|
@import "sections/events.scss";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This scss file redefine chozen selectbox styles for
|
* This scss file redefine chozen selectbox styles for
|
||||||
|
|
105
app/assets/stylesheets/sections/events.scss
Normal file
105
app/assets/stylesheets/sections/events.scss
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
/**
|
||||||
|
* Events labels
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
.event_label {
|
||||||
|
/*@extend .label;*/
|
||||||
|
/*background-color: #999;*/
|
||||||
|
|
||||||
|
/*&.pushed {*/
|
||||||
|
/*background-color: #4A97BD;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
/*&.opened {*/
|
||||||
|
/*background-color: #469847;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
/*&.closed {*/
|
||||||
|
/*background-color: #B94A48;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
/*&.merged {*/
|
||||||
|
/*background-color: #2A2;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
/*&.joined {*/
|
||||||
|
/*background-color: #1ca9dd;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
/*&.left {*/
|
||||||
|
/*background-color: #888;*/
|
||||||
|
/*float:none;*/
|
||||||
|
/*}*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dashboard events feed
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
.event-item {
|
||||||
|
min-height:40px;
|
||||||
|
border-bottom:1px solid #eee;
|
||||||
|
.event-title {
|
||||||
|
color:#333;
|
||||||
|
font-weight: bold;
|
||||||
|
.author_name {
|
||||||
|
color:#777;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.event-body {
|
||||||
|
p {
|
||||||
|
color:#666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.avatar {
|
||||||
|
width:32px;
|
||||||
|
}
|
||||||
|
.event_icon {
|
||||||
|
float: right;
|
||||||
|
border: 1px solid #EEE;
|
||||||
|
padding: 5px;
|
||||||
|
@include border-radius(5px);
|
||||||
|
background: #F9F9F9;
|
||||||
|
img {
|
||||||
|
width:20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ul {
|
||||||
|
margin-left:50px;
|
||||||
|
margin-bottom:5px;
|
||||||
|
.avatar {
|
||||||
|
width:22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
padding: 15px 5px;
|
||||||
|
&:last-child { border:none }
|
||||||
|
.wll:hover { background:none }
|
||||||
|
|
||||||
|
.event_commits {
|
||||||
|
margin-top: 5px;
|
||||||
|
|
||||||
|
li.commit {
|
||||||
|
background: transparent;
|
||||||
|
padding:5px;
|
||||||
|
border:none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Push event widget
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
.event_lp {
|
||||||
|
@extend .ui-box;
|
||||||
|
color:#777;
|
||||||
|
margin-bottom:20px;
|
||||||
|
padding:8px;
|
||||||
|
@include border-radius(4px);
|
||||||
|
min-height:22px;
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
width:24px;
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,7 +2,7 @@
|
||||||
%li.commit
|
%li.commit
|
||||||
%p
|
%p
|
||||||
= link_to commit.short_id(8), project_commit_path(project, id: commit.id), class: "commit_short_id"
|
= 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
|
= image_tag gravatar_icon(commit.author_email), class: "avatar", width: 16
|
||||||
= gfm escape_once(truncate(commit.title, length: 50)) rescue "--broken encoding"
|
= gfm escape_once(truncate(commit.title, length: 50)) rescue "--broken encoding"
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
- if event.allowed?
|
- if event.allowed?
|
||||||
|
%div.event-item
|
||||||
- if event.issue?
|
- if event.issue?
|
||||||
.event_feed
|
|
||||||
= render "events/event_issue", event: event
|
= render "events/event_issue", event: event
|
||||||
|
|
||||||
- elsif event.merge_request?
|
- elsif event.merge_request?
|
||||||
.event_feed
|
|
||||||
= render "events/event_merge_request", event: event
|
= render "events/event_merge_request", event: event
|
||||||
|
|
||||||
- elsif event.push?
|
- elsif event.push?
|
||||||
.event_feed
|
|
||||||
= render "events/event_push", event: event
|
= render "events/event_push", event: event
|
||||||
|
|
||||||
- elsif event.membership_changed?
|
- elsif event.membership_changed?
|
||||||
.event_feed
|
|
||||||
= render "events/event_membership_changed", event: event
|
= 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"
|
= image_tag gravatar_icon(event.author_email), class: "avatar"
|
||||||
%strong #{event.author_name}
|
.event-title
|
||||||
|
%strong.author_name #{event.author_name}
|
||||||
%span.event_label{class: event.action_name}= event.action_name
|
%span.event_label{class: event.action_name}= event.action_name
|
||||||
issue
|
issue
|
||||||
= link_to project_issue_path(event.project, event.issue) do
|
= link_to project_issue_path(event.project, event.issue) do
|
||||||
%strong= truncate event.issue_title
|
%strong= truncate event.issue_title
|
||||||
at
|
at
|
||||||
%strong= link_to event.project.name, event.project
|
%strong= link_to event.project.name, event.project
|
||||||
%span.cgray
|
|
||||||
= time_ago_in_words(event.created_at)
|
|
||||||
ago.
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
= image_tag gravatar_icon(event.author_email), class: "avatar"
|
= image_tag gravatar_icon(event.author_email), class: "avatar"
|
||||||
%strong #{event.author_name}
|
.event-title
|
||||||
|
%strong.author_name #{event.author_name}
|
||||||
%span.event_label{class: event.action_name}= event.action_name
|
%span.event_label{class: event.action_name}= event.action_name
|
||||||
project
|
project
|
||||||
%strong= link_to event.project_name, event.project
|
%strong= link_to event.project_name, event.project
|
||||||
|
|
|
@ -1,17 +1,15 @@
|
||||||
- if event.action_name == "merged"
|
- if event.action_name == "merged"
|
||||||
.event_icon= image_tag "event_mr_merged.png"
|
.event_icon= image_tag "event_mr_merged.png"
|
||||||
= image_tag gravatar_icon(event.author_email), class: "avatar"
|
= image_tag gravatar_icon(event.author_email), class: "avatar"
|
||||||
%strong #{event.author_name}
|
.event-title
|
||||||
|
%strong.author_name #{event.author_name}
|
||||||
%span.event_label{class: event.action_name}= event.action_name
|
%span.event_label{class: event.action_name}= event.action_name
|
||||||
merge request
|
merge request
|
||||||
= link_to project_merge_request_path(event.project, event.merge_request) do
|
= link_to project_merge_request_path(event.project, event.merge_request) do
|
||||||
%strong= truncate event.merge_request_title
|
%strong= truncate event.merge_request_title
|
||||||
at
|
at
|
||||||
%strong= link_to event.project.name, event.project
|
%strong= link_to event.project.name, event.project
|
||||||
%span.cgray
|
.event-body
|
||||||
= time_ago_in_words(event.created_at)
|
|
||||||
ago.
|
|
||||||
%br
|
|
||||||
%span= event.merge_request.source_branch
|
%span= event.merge_request.source_branch
|
||||||
→
|
→
|
||||||
%span= event.merge_request.target_branch
|
%span= event.merge_request.target_branch
|
||||||
|
|
|
@ -1,22 +1,23 @@
|
||||||
%div
|
%div
|
||||||
.event_icon= image_tag "event_push.png"
|
.event_icon= image_tag "event_push.png"
|
||||||
= image_tag gravatar_icon(event.author_email), class: "avatar"
|
= image_tag gravatar_icon(event.author_email), class: "avatar"
|
||||||
%strong #{event.author_name}
|
|
||||||
|
.event-title
|
||||||
|
%strong.author_name #{event.author_name}
|
||||||
%span.event_label.pushed= event.push_action_name
|
%span.event_label.pushed= event.push_action_name
|
||||||
= event.ref_type
|
= event.ref_type
|
||||||
= link_to project_commits_path(event.project, ref: event.ref_name) do
|
= link_to project_commits_path(event.project, ref: event.ref_name) do
|
||||||
%strong= event.ref_name
|
%strong= event.ref_name
|
||||||
at
|
at
|
||||||
%strong= link_to event.project.name, event.project
|
%strong= link_to event.project.name, event.project
|
||||||
%span.cgray
|
|
||||||
= time_ago_in_words(event.created_at)
|
|
||||||
ago.
|
|
||||||
|
|
||||||
- if event.push_with_commits?
|
- if event.push_with_commits?
|
||||||
- if event.commits_count > 1
|
- if event.commits_count > 1
|
||||||
= link_to compare_project_commits_path(event.project, from: event.parent_commit.id, to: event.last_commit.id) do
|
= 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]}
|
%strong #{event.parent_commit.id[0..7]}...#{event.last_commit.id[0..7]}
|
||||||
|
|
||||||
|
- if event.push_with_commits?
|
||||||
- project = event.project
|
- project = event.project
|
||||||
|
.event-body
|
||||||
%ul.unstyled.event_commits
|
%ul.unstyled.event_commits
|
||||||
- if event.commits_count > 3
|
- if event.commits_count > 3
|
||||||
- event.commits[0...2].each do |commit|
|
- event.commits[0...2].each do |commit|
|
||||||
|
@ -27,4 +28,4 @@
|
||||||
- else
|
- else
|
||||||
- event.commits.each do |commit|
|
- event.commits.each do |commit|
|
||||||
= render "events/commit", commit: commit, project: project
|
= render "events/commit", commit: commit, project: project
|
||||||
|
.clearfix
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue