Skip to content

Commit

Permalink
Merge pull request #5 from akpaevj/redesign
Browse files Browse the repository at this point in the history
Redesign
  • Loading branch information
akpaevj authored May 17, 2021
2 parents 6101a1b + 6999c87 commit c8091e7
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 16 deletions.
1 change: 1 addition & 0 deletions app/controllers/dashboard_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ def index
@statuses = getData(@selected_project_id)
@projects = getProjects(@selected_project_id)
end

end

private
Expand Down
5 changes: 3 additions & 2 deletions app/views/dashboard/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'style', plugin: 'dashboard' %>
<%= javascript_include_tag 'script', plugin: 'dashboard' %>
<%= javascript_include_tag 'Sortable.min', plugin: 'dashboard' %>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
<% end %>

Expand All @@ -15,12 +16,12 @@
<div class="issues_container">
<% @statuses.each do |status| %>
<div class="status_column" data-id="<%= status['id'] %>">
<div class="status_column_header" style="background-color: <%= status["color"] %>">
<div class="status_column_header" style="border-bottom-color: <%= status["color"] %>">
<span> <%= status["name"] %> </span>
</div>
<div class="status_column_issues">
<% status["issues"].each do |issue| %>
<div draggable="true" class="issue_card" data-status="<%= status['id'] %>" data-id="<%= issue['id'] %>" onclick="goToIssue(<%= issue['id'] %>)">
<div class="issue_card" data-status="<%= status['id'] %>" data-id="<%= issue['id'] %>" onclick="goToIssue(<%= issue['id'] %>)">
<div class="issue_card_header">
<span class="issue_card_header_date"><%= issue["created_at"] %></span>
<div class="issue_card_header_project" style="background-color: <%= @projects[issue['project_id']]['color'] %>"><%= issue["project"] %></div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/settings/_dashboard_settings.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
<input type="color" id="settings_<%= property_name %>" value="<%= settings[property_name] %>" name="settings[<%= property_name %>]">
</td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
2 changes: 2 additions & 0 deletions assets/javascripts/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function goToIssue(id) {
}

function init() {
document.querySelector('#main-menu').remove();

document.querySelector('[name=project]').addEventListener('change', function(e) {
if (this.value == "-1") {
location.search = "";
Expand Down
24 changes: 12 additions & 12 deletions assets/stylesheets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@
.status_column {
display: inline-flex;
border-radius: 5px;
background-color: rgb(236, 236, 236);
width: 100%;
height: 100%;
margin: 10px;
margin-left: 3px;
margin-right: 3px;
flex-direction: column;
box-shadow: 0px 0px 5px 0px gray;
}

.status_column_header {
display: flex;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
background-color: rgb(169, 144, 238);
width: 100%;
height: 50px;
align-items: center;
justify-content: center;
color: white;
font-size: large;
font-size: medium;
font-weight: 500;
margin-bottom: 5px;
border-bottom: 2px solid;
}

.status_column_header span {
margin-left: 10px;
}

.status_column_issues {
Expand All @@ -47,7 +47,7 @@
margin-top: 5px;
padding-top: 5px;
padding-bottom: 5px;
background-color: white;
background-color: rgb(240, 240, 240);
margin-bottom: 5px;
align-items: flex-start;
flex-direction: column;
Expand All @@ -56,7 +56,7 @@
}

.issue_card:hover {
background-color: rgb(248, 248, 248);
background-color: rgb(220, 220, 220);
cursor: pointer;
}

Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ en:
top_menu_item_title: "Dashboard"
settings_header_statuses: "Colors of the status column header"
settings_header_projects: "Project colors"
settings_header_other: "Other"
settings_enable_drag_and_drop: 'Enable "drag and drop" status changing'
executor_not_set: "Not set"
label_all: "All"
2 changes: 2 additions & 0 deletions config/locales/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ ru:
top_menu_item_title: "Панель задач"
settings_header_statuses: "Цвета заголовков колонок статусов"
settings_header_projects: "Цвета проектов"
settings_header_other: "Разное"
settings_enable_drag_and_drop: 'Включить "drag and drop" изменение статуса'
executor_not_set: "Не установлен"
label_all: "Все"
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
get 'dashboard', to: 'dashboard#index'
get 'dashboard/setIssueStatus', to: 'dashboard#setIssueStatus'
Binary file added dashboard.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name 'Dashboard'
author "Akpaev E.A."
description "Plugin adds an issues dashboard to the application"
version '1.0.4'
version '1.0.5'
url 'https://github.com/akpaevj/Dashboard'
author_url 'https://github.com/akpaevj'
menu :top_menu, :dashboard, { controller: 'dashboard', action: 'index' }, caption: :top_menu_item_title, first: true
Expand Down
Binary file modified screenshots/screen1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c8091e7

Please sign in to comment.