Skip to content

Commit c8091e7

Browse files
authored
Merge pull request #5 from akpaevj/redesign
Redesign
2 parents 6101a1b + 6999c87 commit c8091e7

File tree

11 files changed

+25
-16
lines changed

11 files changed

+25
-16
lines changed

app/controllers/dashboard_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def index
1010
@statuses = getData(@selected_project_id)
1111
@projects = getProjects(@selected_project_id)
1212
end
13+
1314
end
1415

1516
private

app/views/dashboard/index.html.erb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<% content_for :header_tags do %>
22
<%= stylesheet_link_tag 'style', plugin: 'dashboard' %>
33
<%= javascript_include_tag 'script', plugin: 'dashboard' %>
4+
<%= javascript_include_tag 'Sortable.min', plugin: 'dashboard' %>
45
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
56
<% end %>
67

@@ -15,12 +16,12 @@
1516
<div class="issues_container">
1617
<% @statuses.each do |status| %>
1718
<div class="status_column" data-id="<%= status['id'] %>">
18-
<div class="status_column_header" style="background-color: <%= status["color"] %>">
19+
<div class="status_column_header" style="border-bottom-color: <%= status["color"] %>">
1920
<span> <%= status["name"] %> </span>
2021
</div>
2122
<div class="status_column_issues">
2223
<% status["issues"].each do |issue| %>
23-
<div draggable="true" class="issue_card" data-status="<%= status['id'] %>" data-id="<%= issue['id'] %>" onclick="goToIssue(<%= issue['id'] %>)">
24+
<div class="issue_card" data-status="<%= status['id'] %>" data-id="<%= issue['id'] %>" onclick="goToIssue(<%= issue['id'] %>)">
2425
<div class="issue_card_header">
2526
<span class="issue_card_header_date"><%= issue["created_at"] %></span>
2627
<div class="issue_card_header_project" style="background-color: <%= @projects[issue['project_id']]['color'] %>"><%= issue["project"] %></div>

app/views/settings/_dashboard_settings.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
<input type="color" id="settings_<%= property_name %>" value="<%= settings[property_name] %>" name="settings[<%= property_name %>]">
2626
</td>
2727
</tr>
28-
<% end %>
28+
<% end %>
2929
</tbody>
3030
</table>

assets/javascripts/script.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ function goToIssue(id) {
1515
}
1616

1717
function init() {
18+
document.querySelector('#main-menu').remove();
19+
1820
document.querySelector('[name=project]').addEventListener('change', function(e) {
1921
if (this.value == "-1") {
2022
location.search = "";

assets/stylesheets/style.css

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@
77
.status_column {
88
display: inline-flex;
99
border-radius: 5px;
10-
background-color: rgb(236, 236, 236);
1110
width: 100%;
12-
height: 100%;
13-
margin: 10px;
11+
margin-left: 3px;
12+
margin-right: 3px;
1413
flex-direction: column;
15-
box-shadow: 0px 0px 5px 0px gray;
1614
}
1715

1816
.status_column_header {
1917
display: flex;
20-
border-top-left-radius: 5px;
21-
border-top-right-radius: 5px;
22-
background-color: rgb(169, 144, 238);
2318
width: 100%;
2419
height: 50px;
2520
align-items: center;
26-
justify-content: center;
27-
color: white;
28-
font-size: large;
21+
font-size: medium;
22+
font-weight: 500;
23+
margin-bottom: 5px;
24+
border-bottom: 2px solid;
25+
}
26+
27+
.status_column_header span {
28+
margin-left: 10px;
2929
}
3030

3131
.status_column_issues {
@@ -47,7 +47,7 @@
4747
margin-top: 5px;
4848
padding-top: 5px;
4949
padding-bottom: 5px;
50-
background-color: white;
50+
background-color: rgb(240, 240, 240);
5151
margin-bottom: 5px;
5252
align-items: flex-start;
5353
flex-direction: column;
@@ -56,7 +56,7 @@
5656
}
5757

5858
.issue_card:hover {
59-
background-color: rgb(248, 248, 248);
59+
background-color: rgb(220, 220, 220);
6060
cursor: pointer;
6161
}
6262

config/locales/en.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ en:
22
top_menu_item_title: "Dashboard"
33
settings_header_statuses: "Colors of the status column header"
44
settings_header_projects: "Project colors"
5+
settings_header_other: "Other"
6+
settings_enable_drag_and_drop: 'Enable "drag and drop" status changing'
57
executor_not_set: "Not set"
68
label_all: "All"

config/locales/ru.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ ru:
22
top_menu_item_title: "Панель задач"
33
settings_header_statuses: "Цвета заголовков колонок статусов"
44
settings_header_projects: "Цвета проектов"
5+
settings_header_other: "Разное"
6+
settings_enable_drag_and_drop: 'Включить "drag and drop" изменение статуса'
57
executor_not_set: "Не установлен"
68
label_all: "Все"

config/routes.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
get 'dashboard', to: 'dashboard#index'
2+
get 'dashboard/setIssueStatus', to: 'dashboard#setIssueStatus'

dashboard.zip

8.82 KB
Binary file not shown.

init.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name 'Dashboard'
33
author "Akpaev E.A."
44
description "Plugin adds an issues dashboard to the application"
5-
version '1.0.4'
5+
version '1.0.5'
66
url 'https://github.com/akpaevj/Dashboard'
77
author_url 'https://github.com/akpaevj'
88
menu :top_menu, :dashboard, { controller: 'dashboard', action: 'index' }, caption: :top_menu_item_title, first: true

0 commit comments

Comments
 (0)