From e94afe066b79379660e5f22526d8b9a95e39a35c Mon Sep 17 00:00:00 2001 From: Matt Budz Date: Fri, 8 Mar 2024 18:01:48 +0100 Subject: [PATCH 1/2] add scaffold for `my tasks` view --- app/controllers/tasks_controller.rb | 5 +++++ app/views/tasks/index.html.erb | 5 +++++ config/routes.rb | 2 ++ 3 files changed, 12 insertions(+) create mode 100644 app/controllers/tasks_controller.rb create mode 100644 app/views/tasks/index.html.erb diff --git a/app/controllers/tasks_controller.rb b/app/controllers/tasks_controller.rb new file mode 100644 index 000000000..9cda4cd90 --- /dev/null +++ b/app/controllers/tasks_controller.rb @@ -0,0 +1,5 @@ +class TasksController < AuthenticatedController + include ProjectScoped + layout 'tylium' + def index; end +end diff --git a/app/views/tasks/index.html.erb b/app/views/tasks/index.html.erb new file mode 100644 index 000000000..cc9e79e6f --- /dev/null +++ b/app/views/tasks/index.html.erb @@ -0,0 +1,5 @@ +<% content_for :title, 'My Tasks' %> + +
+

Edit me in app/views/tasks/index.html.erb

+
diff --git a/config/routes.rb b/config/routes.rb index 5cddb6b12..24f05b7ca 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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 From 636a52c8fb69894c22ab8061b933e9898ca2eaec Mon Sep 17 00:00:00 2001 From: Matt Budz Date: Fri, 8 Mar 2024 18:07:45 +0100 Subject: [PATCH 2/2] add scaffold for my tasks dashboard widget --- app/views/projects/show.html.erb | 5 +++++ app/views/projects/tasks/_summary.html.erb | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 app/views/projects/tasks/_summary.html.erb diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index b1ca4c488..5d9e7fbb3 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -10,6 +10,11 @@
+ +
+ <%= render partial: 'projects/tasks/summary' %> +
+
<%= render partial: 'projects/boards/summary' %>
diff --git a/app/views/projects/tasks/_summary.html.erb b/app/views/projects/tasks/_summary.html.erb new file mode 100644 index 000000000..9a8c63c3d --- /dev/null +++ b/app/views/projects/tasks/_summary.html.erb @@ -0,0 +1,4 @@ +
+

Edit me in app/views/projects/tasks/_summary.html.erb

+ <%= link_to 'link to my tasks view', project_tasks_path(current_project) %> +