From a82b49bed78a854faf74b9e6b68285fed620a4a5 Mon Sep 17 00:00:00 2001 From: ismail Akbudak Date: Wed, 22 Jun 2016 16:31:21 +0300 Subject: [PATCH] add locales for audit and link on admin portal --- .../layouts/hq/partials/_navbar.html.haml.erb | 4 ++++ templates/config/locales/models.tr.yml | 16 +++++++++++++++- templates/config/routes.erb | 1 + 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/templates/app/views/layouts/hq/partials/_navbar.html.haml.erb b/templates/app/views/layouts/hq/partials/_navbar.html.haml.erb index bf1964c..48f40ba 100644 --- a/templates/app/views/layouts/hq/partials/_navbar.html.haml.erb +++ b/templates/app/views/layouts/hq/partials/_navbar.html.haml.erb @@ -4,6 +4,10 @@ <%= app_name %> = t('navbar.admin_portal') %ul.nav.navbar-nav.pull-right + %li + = link_to hq_audits_path do + %i.icon-cog + = t('activerecord.models.audits') %li.dropdown.user %a.dropdown-toggle{'data-toggle' => 'dropdown', href: '#'} %i.icon-user diff --git a/templates/config/locales/models.tr.yml b/templates/config/locales/models.tr.yml index da00992..b09afa3 100644 --- a/templates/config/locales/models.tr.yml +++ b/templates/config/locales/models.tr.yml @@ -11,6 +11,8 @@ tr: countries: Ülkeler city: Şehir cities: Şehirler + audit: İşlem Geçmişi + audits: İşlem Geçmişleri attributes: user: id: ID @@ -70,4 +72,16 @@ tr: country: Ülke country_id: Ülke created_at: Oluşturulma tarihi - updated_at: Güncellenme tarihi \ No newline at end of file + updated_at: Güncellenme tarihi + audits: + id: ID + user_type: İşlemi yapan kullanıcı tipi + user: İşlemi yapan kullanıcı + type: Tip + type_id: Tip ID + action: İşlem + user_id: İşlemi yapan + auditable_type: İşlem yapılan + auditable_id: İşlem yapılan ID + action: İşlem Türü + created_at: Oluşturulma tarihi \ No newline at end of file diff --git a/templates/config/routes.erb b/templates/config/routes.erb index 71fb915..6c21fda 100644 --- a/templates/config/routes.erb +++ b/templates/config/routes.erb @@ -26,6 +26,7 @@ Rails.application.routes.draw do resources :users, concerns: [:activeable] resources :countries resources :cities + resources :audits, only: [:index, :show] end # Users devise_for :users, controllers: { sessions: 'user/sessions', registrations: 'user/registrations', passwords: 'user/passwords' }, path: 'user',