Skip to content
58 changes: 58 additions & 0 deletions app/assets/stylesheets/tylium/modules/projects.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,63 @@ body.projects {
}
}
}

.tasks {
.list-group-item {
border: 1px solid $borderColor;
border-radius: 0.5rem;
margin-bottom: 1rem;
padding: 1rem;

&:active, &:focus, &:hover {
background-color: $secondaryBgColor;
}

&:last-of-type {
margin-bottom: 0;
}

.list-group-item-action {
display: flex;
flex-direction: column;
padding-bottom: 1rem;

&:active, &:focus, &:hover {
background-color: $secondaryBgColor;
}

.badge {
width: fit-content;
padding: 0.313rem;
}

&:before {
border: 3px solid;
border-radius: 0.5rem 0 0 0.5rem;
bottom: 0;
content: " ";
left: 0;
position: absolute;
top: 0;
}

&.green:before {
border-color: $green;
}

&.orange:before {
border-color: $orange;
}

&.red:before {
border-color: $red;
}

&.yellow:before {
border-color: $yellow;
}
}
}
}
}
}
5 changes: 5 additions & 0 deletions app/controllers/tasks_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class TasksController < AuthenticatedController
include ProjectScoped
layout 'tylium'
def index; end
end
5 changes: 5 additions & 0 deletions app/views/layouts/tylium/_sidebar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
<i class="fa-brands fa-trello sidebar-link-icon"></i> <span class="sidebar-link-label">Methodologies</span>
<% end %>
<% end %>
<%= content_tag :li, :class => controller_path.include?('tasks') ? 'active' : '' do %>
<%= link_to main_app.project_tasks_path(current_project), class: 'sidebar-link', data: { behavior: 'sidebar-link' } do %>
<i class="fa-solid fa-tasks sidebar-link-icon"></i> <span class="sidebar-link-label">Tasks</span>
<% end %>
<% end %>
<%= content_tag :li, :class => action_name == 'trash' ? 'active' : '' do %>
<%= link_to main_app.project_trash_path(current_project), class: 'sidebar-link', data: { behavior: 'sidebar-link' } do %>
<i class="fa-solid fa-trash sidebar-link-icon" aria-hidden="true"></i> <span class="sidebar-link-label">Trash</span>
Expand Down
3 changes: 3 additions & 0 deletions app/views/projects/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<div class="col-12 col-lg-6 col-xxl-8 p-0">
<div class="row m-0">
<div class="col-xxl-6 p-0">
<div class="content-container mt-0 mt-lg-3 ms-lg-3 mx-xxl-3">
<%= render partial: 'projects/tasks/summary' %>
</div>
<div class="content-container mt-0 mt-lg-3 ms-lg-3 mx-xxl-3">
<%= render partial: 'projects/boards/summary' %>
</div>
Expand Down
45 changes: 45 additions & 0 deletions app/views/projects/tasks/_summary.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<section class="summary-panel">
<h4 class="header-underline">My Tasks
<span class="actions pt-1">
<div class="action">
<%= link_to 'All Tasks', project_tasks_path(current_project) %>
</div>
</span>
</h4>
<h5 class="mb-2 mt-4">Due today (3/8)</h5>
<ul class="list-group tasks">
<li class="list-group-item">
<a href="#" class="list-group-item-action red">[OWASP Top 10] A2:2017 - Broken Authentication</a>
<span class="badge bg-primary">Simple OWASP checklist</span>
<span class="badge bg-secondary">In progress</span>
</li>
<li class="list-group-item">
<a href="#" class="list-group-item-action red">Step 1: Prepare the release notes</a>
<span class="badge bg-primary">Release Checklist</span>
<span class="badge bg-secondary">In progress</span>
</li>
<li class="list-group-item">
<a href="#" class="list-group-item-action red">[OWASP Top 10] A2:2017 - Broken Authentication</a>
<span class="badge bg-primary">Simple OWASP checklist</span>
<span class="badge bg-secondary">To do</span>
</li>
</ul>
<h5 class="mb-2 mt-4">Next (3/40)</h5>
<ul class="list-group tasks">
<li class="list-group-item">
<a href="#" class="list-group-item-action orange">[OWASP Top 10] A3:2017 - Sensitive Data Exchange</a>
<span class="badge bg-primary">Simple OWASP checklist</span>
<span class="badge bg-secondary">Pending</span>
</li>
<li class="list-group-item">
<a href="#" class="list-group-item-action orange">[OWASP Top 10] A4:2017 - XML External Entities (XXE)</a>
<span class="badge bg-primary">Simple OWASP checklist</span>
<span class="badge bg-secondary">In progress</span>
</li>
<li class="list-group-item">
<a href="#" class="list-group-item-action yellow">Step 3: Deal with security advisories</a>
<span class="badge bg-primary">Release Checklist</span>
<span class="badge bg-secondary">To do</span>
</li>
</ul>
</section>
6 changes: 6 additions & 0 deletions app/views/tasks/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<% content_for :title, 'My Tasks' %>

<div class="content-container mt-3">
<!--Table of user assigned tasks-->
<table class="table"></table>
</div>
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@

resources :tags, except: [:show]

resources :tasks, only: :index

namespace :qa do
resources :issues, only: [:edit, :index, :show, :update], concerns: [:multiple_update, :previewable]
end
Expand Down