From da9e7c63663a978c92f88da42efe9e81464baa39 Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Fri, 18 Sep 2026 16:46:55 +0300 Subject: [PATCH] add send menu --- app/models/template.rb | 2 +- app/views/templates/_template.html.erb | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/models/template.rb b/app/models/template.rb index c023ae89a..cb0d7a05d 100644 --- a/app/models/template.rb +++ b/app/models/template.rb @@ -81,7 +81,7 @@ class Template < ApplicationRecord scope :active, -> { where(archived_at: nil) } scope :archived, -> { where.not(archived_at: nil) } - scope :select_for_list, -> { select(:id, :name, :author_id, :account_id, :created_at, :archived_at, :folder_id) } + scope :select_for_list, -> { select(:id, :name, :author_id, :account_id, :created_at, :archived_at, :folder_id, :submitters) } def application_key external_id diff --git a/app/views/templates/_template.html.erb b/app/views/templates/_template.html.erb index 074a919a3..00b483628 100644 --- a/app/views/templates/_template.html.erb +++ b/app/views/templates/_template.html.erb @@ -68,12 +68,22 @@ <% end %> - <% if !template.archived_at? && (can?(:update, template) || can?(:create, template) || can?(:destroy, template)) %> + <% if !template.archived_at? && (can?(:create, Submission) || can?(:update, template) || can?(:create, template) || can?(:destroy, template)) %>