From d7e653b1f10132d1a35e6b76dfaab9705a9050e2 Mon Sep 17 00:00:00 2001 From: iozeey Date: Mon, 13 Nov 2023 12:04:48 +0500 Subject: [PATCH] loading button --- app/javascript/template_builder/upload.vue | 130 ++++++++++----------- app/views/templates/_title.html.erb | 21 +++- 2 files changed, 84 insertions(+), 67 deletions(-) diff --git a/app/javascript/template_builder/upload.vue b/app/javascript/template_builder/upload.vue index f34f1049..bb44256a 100644 --- a/app/javascript/template_builder/upload.vue +++ b/app/javascript/template_builder/upload.vue @@ -10,24 +10,15 @@ width="20" class="animate-spin" /> - - - Uploading... - - - Processing... - - - Add Document - + + Uploading... + Processing... + Add Document - diff --git a/app/views/templates/_title.html.erb b/app/views/templates/_title.html.erb index 92993b3c..9aaffb01 100644 --- a/app/views/templates/_title.html.erb +++ b/app/views/templates/_title.html.erb @@ -33,15 +33,34 @@ <% end %> <% end %> <% if !template.deleted_at? && can?(:update, template) %> - <%= link_to edit_template_path(template), class: 'btn btn-outline btn-sm' do %> + <%= link_to edit_template_path(template), class: 'btn btn-outline btn-sm', id: 'edit-template-link' do %> <%= svg_icon('pencil', class: 'w-6 h-6') %> Edit <% end %> <% end %> + + + <% if template.deleted_at? && can?(:create, template) %> <%= button_to button_title(title: 'Restore', disabled_with: 'Restoring', icon: svg_icon('rotate', class: 'w-6 h-6')), template_restore_index_path(template), class: 'btn btn-outline btn-sm' %> <% end %> + +