Move github source to private server
This commit is contained in:
@@ -1,58 +1,53 @@
|
||||
<div id="task_<%= task.id %>" class="task <%= 'completed' if task.status == 'completed' %>">
|
||||
<div class="task-header">
|
||||
<div class="task-priority" style="color: <%= task.priority_color %>">
|
||||
<%= task.priority_icon %> <%= task.priority.humanize %>
|
||||
</div>
|
||||
<div class="task-status-badge" style="background-color: <%= task.status_badge[:color] %>">
|
||||
<%= task.status_badge[:text] %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= form_with(model: task, local: false, method: :patch, class: "toggle-form") do |form| %>
|
||||
<div class="task-content">
|
||||
<%= form.check_box :status, { checked: task.status == 'completed', onchange: "this.form.submit();" }, { class: "task-checkbox" } %>
|
||||
|
||||
<div class="task-info">
|
||||
<span class="task-title"
|
||||
title="<%= task.description&.truncate(100) || 'No description' %>"
|
||||
data-description="<%= task.description || '' %>">
|
||||
<%= task.title %>
|
||||
</span>
|
||||
<% if task.description.present? %>
|
||||
<span class="description-indicator">📝</span>
|
||||
<div id="task_<%= task.id %>" class="task-card <%= task.status %>" data-priority="<%= task.priority %>">
|
||||
<div class="task-card-header">
|
||||
<div class="task-card-title-section">
|
||||
<div class="task-checkbox-wrapper">
|
||||
<%= form_with(model: task, local: false, method: :patch) do |f| %>
|
||||
<%= f.check_box :status, { checked: task.status == 'completed', onchange: "this.form.submit();" }, "completed", "open" %>
|
||||
<% end %>
|
||||
</div>
|
||||
<h3 class="task-card-title"><%= task.title %></h3>
|
||||
<% if task.description.present? %>
|
||||
<span class="task-desc-indicator" title="Has description">📝</span>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="task-meta">
|
||||
<% if task.department %>
|
||||
<span class="department-tag">
|
||||
<%= task.department.name %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<% if task.assignee %>
|
||||
<span class="assignee-tag">
|
||||
Assigned to: <%= task.assignee.name %>
|
||||
<div class="task-card-badges">
|
||||
<span class="badge-priority" style="color: <%= task.priority_color %>; border-color: <%= task.priority_color %>22; background-color: <%= task.priority_color %>11;">
|
||||
<%= task.priority_icon %> <%= task.priority.humanize %>
|
||||
</span>
|
||||
<% end %>
|
||||
|
||||
<span class="created-tag">
|
||||
Created: <%= task.created_at.strftime('%m/%d/%Y') %>
|
||||
</span>
|
||||
<span class="badge-status" style="background-color: <%= task.status_badge[:color] %>">
|
||||
<%= task.status_badge[:text] %>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="task-actions">
|
||||
<%= link_to 'View', task, class: 'details-btn' %>
|
||||
<% if task.updateable_by?(current_user) %>
|
||||
<%= link_to 'Edit', edit_task_path(task), class: 'edit-btn' %>
|
||||
<% end %>
|
||||
<% if task.assign?(current_user) && !task.assignee %>
|
||||
<%= link_to 'Assign', assign_task_path(task), method: :patch, class: 'assign-btn' %>
|
||||
<% end %>
|
||||
<% if task.updateable_by?(current_user) || current_user.admin? %>
|
||||
<%= link_to 'Delete', task, method: :delete, data: { confirm: 'Are you sure?' }, class: 'delete-btn' %>
|
||||
<% end %>
|
||||
|
||||
<div class="task-card-body">
|
||||
<div class="task-card-info-grid">
|
||||
<div class="info-item">
|
||||
<span class="info-label">Dept</span>
|
||||
<span class="info-value"><%= task.department&.name || 'Personal' %></span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Assignee</span>
|
||||
<span class="info-value"><%= task.assignee&.name || 'Unassigned' %></span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="info-label">Created</span>
|
||||
<span class="info-value"><%= task.created_at.strftime('%b %d, %Y') %></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="task-card-footer">
|
||||
<div class="task-card-actions">
|
||||
<%= link_to 'View', task, class: 'btn-task-action' %>
|
||||
<% if task.updateable_by?(current_user) %>
|
||||
<%= link_to 'Edit', edit_task_path(task), class: 'btn-task-action' %>
|
||||
<% end %>
|
||||
<% if task.updateable_by?(current_user) || current_user.admin? %>
|
||||
<%= link_to 'Delete', task, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn-task-action action-delete' %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -119,10 +119,10 @@
|
||||
</div>
|
||||
|
||||
<div class="dashboard-actions">
|
||||
<%= link_to 'View All Tasks', tasks_path, class: 'action-btn primary' %>
|
||||
<%= link_to 'Create New Task', new_task_path, class: 'action-btn success' %>
|
||||
<%= link_to 'View All Tasks', tasks_path, class: 'btn btn-primary' %>
|
||||
<%= link_to 'Create New Task', new_task_path, class: 'btn btn-success' %>
|
||||
<% if current_user.admin? || current_user.manager? %>
|
||||
<%= link_to 'Manage Departments', departments_path, class: 'action-btn secondary' %>
|
||||
<%= link_to 'Manage Departments', departments_path, class: 'btn btn-secondary' %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
@@ -21,52 +21,38 @@
|
||||
<div class="sidebar">
|
||||
<div class="filter-section">
|
||||
<h3>Filters</h3>
|
||||
|
||||
<% if accessible_departments.count > 1 %>
|
||||
<div class="filter-group">
|
||||
<label>Department</label>
|
||||
<%= form_with(url: tasks_path, method: :get, local: true, class: "filter-form") do |f| %>
|
||||
<%= form_with(url: tasks_path, method: :get, local: true, class: "combined-filter-form") do |f| %>
|
||||
<% if accessible_departments.count > 1 %>
|
||||
<div class="filter-group">
|
||||
<label>Department</label>
|
||||
<%= f.select :department_id,
|
||||
options_for_select([[ "All Departments", "" ]] + accessible_departments.map { |d| [d.name, d.id] },
|
||||
params[:department_id]),
|
||||
{ onchange: "this.form.submit();" },
|
||||
{ class: "filter-select" } %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="filter-group">
|
||||
<label>Priority</label>
|
||||
<%= form_with(url: tasks_path, method: :get, local: true, class: "filter-form") do |f| %>
|
||||
{},
|
||||
{ class: "filter-select", onchange: "this.form.submit();" } %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="filter-group">
|
||||
<label>Priority</label>
|
||||
<%= f.select :priority,
|
||||
options_for_select([[ "All Priorities", "" ]] + Task.priorities.keys.map { |p| [p.humanize, p] },
|
||||
params[:priority]),
|
||||
{ onchange: "this.form.submit();" },
|
||||
{ class: "filter-select" } %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="filter-group">
|
||||
<label>Status</label>
|
||||
<%= form_with(url: tasks_path, method: :get, local: true, class: "filter-form") do |f| %>
|
||||
{},
|
||||
{ class: "filter-select", onchange: "this.form.submit();" } %>
|
||||
</div>
|
||||
|
||||
<div class="filter-group">
|
||||
<label>Status</label>
|
||||
<%= f.select :status,
|
||||
options_for_select([[ "All Statuses", "" ]] + Task.statuses.keys.map { |s| [s.humanize, s] },
|
||||
params[:status]),
|
||||
{ onchange: "this.form.submit();" },
|
||||
{ class: "filter-select" } %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions-section">
|
||||
<h3>Actions</h3>
|
||||
<%= link_to 'Dashboard', dashboard_path, class: 'action-btn' %>
|
||||
<%= link_to 'My Tasks', my_tasks_path, class: 'action-btn' if current_user.employee? %>
|
||||
<%= link_to 'Departments', departments_path, class: 'action-btn' if current_user.admin? || current_user.manager? %>
|
||||
<% if current_user.admin? %>
|
||||
<%= link_to 'New User', new_user_registration_path, class: 'action-btn' %>
|
||||
{},
|
||||
{ class: "filter-select", onchange: "this.form.submit();" } %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="main-content">
|
||||
|
||||
@@ -24,6 +24,15 @@
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="comments-section">
|
||||
<h2>Conversations</h2>
|
||||
<%= render 'comments/form', task: @task, comment: Comment.new %>
|
||||
|
||||
<div id="comments-list">
|
||||
<%= render partial: 'comments/comment', collection: @task.comments.order(created_at: :desc) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="task-actions">
|
||||
<%= form_with(model: @task, local: false, method: :patch, class: "toggle-status-form") do |form| %>
|
||||
<%= form.hidden_field :completed, value: !@task.completed %>
|
||||
|
||||
Reference in New Issue
Block a user