From 74e778860aac03e42369f86c6f718b16ba004829 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Sun, 9 Oct 2016 04:45:01 +0300 Subject: [PATCH] Add a shortcut for cloning profiles --- app/views/management/personal_profiles/index.html.slim | 3 +++ config/locales/bg.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/app/views/management/personal_profiles/index.html.slim b/app/views/management/personal_profiles/index.html.slim index 158028c..5d24ff9 100644 --- a/app/views/management/personal_profiles/index.html.slim +++ b/app/views/management/personal_profiles/index.html.slim @@ -50,6 +50,9 @@ - if profile.present? = action_buttons(@conference, profile, [:show, :edit, :destroy]) - else + - if user.personal_profiles.any? + = link_to [:management, @conference, :personal_profiles, {personal_profile: {user_id: user.id}}], class: ['btn', 'btn-primary'], title: t('actions.clone.title', model: PersonalProfile.model_name.human), method: :post do + => icon('clone') = link_to [:new, :management, @conference, :personal_profile, {user_id: user.id}], class: ['btn', 'btn-primary'], title: t('actions.create.title', model: PersonalProfile.model_name.human) do => icon('user-plus') .panel-footer.text-right diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 848de07..54fa11d 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -39,6 +39,9 @@ bg: update: "Обнови кандидатурата" actions: are_you_sure: "Сигурен ли си?" + clone: + button: "Клонирай %{model}" + title: "Клониране на съществуващ %{model}" create: button: "Създай %{model}" title: "Създаване на %{model}"