From 8006449a86c44b9425c87269a7c7706659f9a434 Mon Sep 17 00:00:00 2001 From: Julien Letessier Date: Wed, 14 May 2014 10:59:47 +0200 Subject: [PATCH] Fixes views for archival --- app/views/ideas/_action.html.haml | 8 ++++++++ app/views/ideas/actions/_archived.html.haml | 0 2 files changed, 8 insertions(+) create mode 100644 app/views/ideas/actions/_archived.html.haml diff --git a/app/views/ideas/_action.html.haml b/app/views/ideas/_action.html.haml index 1fd16cc..7803693 100644 --- a/app/views/ideas/_action.html.haml +++ b/app/views/ideas/_action.html.haml @@ -68,4 +68,12 @@ %i.fa.fa-medkit = _('Revive') + - if idea.state_machine.can_archive? + - if can?(:archive, idea) + %li + .btn-group.btn-block + = link_to idea_path(idea, idea: { state: 'archived' }), method: :put, class: 'btn btn-block', title: s_('Tooltip|Archive this idea but keep it for future reference.') do + %i.fa.fa-archive + = _('Archive') + %li.separator diff --git a/app/views/ideas/actions/_archived.html.haml b/app/views/ideas/actions/_archived.html.haml new file mode 100644 index 0000000..e69de29