mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 14:42:32 -05:00
show archived shared templates
This commit is contained in:
1 parent
2840359396
commit
b2790776ef
8 files changed
+38
-13
No files matched your search
@@ -4,10 +4,16 @@ class TemplatesSharedController < ApplicationController
|
||||
def index
|
||||
authorize!(:read, Template)
|
||||
|
||||
@is_archived = params[:archived] == 'true'
|
||||
|
||||
@templates = Templates.shared(current_user)
|
||||
.active
|
||||
.preload(:author, :template_accesses, :template_sharings)
|
||||
.order(id: :desc)
|
||||
|
||||
@has_archived = !@is_archived && @templates.archived.exists?
|
||||
|
||||
@templates = @is_archived ? @templates.archived : @templates.active
|
||||
|
||||
@templates = @templates.preload(:author, :template_accesses, :template_sharings)
|
||||
.order(id: :desc)
|
||||
|
||||
@templates = Templates.search(current_user, @templates, params[:q])
|
||||
|
||||
|
||||
Reference in new issue
Block a user