From 9cf4645d5e69ea2aeb0b4cde89042bbb37f2e110 Mon Sep 17 00:00:00 2001 From: f Date: Mon, 8 Jul 2019 18:23:43 -0300 Subject: [PATCH] =?UTF-8?q?ver=20informaci=C3=B3n=20b=C3=A1sica=20sobre=20?= =?UTF-8?q?les=20usuaries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 1 + Gemfile.lock | 4 ++++ app/views/usuaries/index.haml | 7 +++++++ config/locales/en.yml | 1 + config/locales/es.yml | 1 + 5 files changed, 14 insertions(+) diff --git a/Gemfile b/Gemfile index 10313805..99ce3d8a 100644 --- a/Gemfile +++ b/Gemfile @@ -51,6 +51,7 @@ gem 'jekyll' gem 'jquery-rails' gem 'mini_magick' gem 'pundit' +gem 'rails-i18n' gem 'rails_warden' gem 'whenever', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 67cc2bcd..38aff661 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -249,6 +249,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.0.4) loofah (~> 2.2, >= 2.2.2) + rails-i18n (5.1.3) + i18n (>= 0.7, < 2) + railties (>= 5.0, < 6) rails_warden (0.6.0) warden (>= 1.2.0) railties (5.2.3) @@ -384,6 +387,7 @@ DEPENDENCIES puma (~> 3.7) pundit rails (~> 5.2) + rails-i18n rails_warden rbnacl (< 5.0) rubocop diff --git a/app/views/usuaries/index.haml b/app/views/usuaries/index.haml index f8408da6..2698cc43 100644 --- a/app/views/usuaries/index.haml +++ b/app/views/usuaries/index.haml @@ -27,9 +27,16 @@ %table.table.table-striped.table-condensed %tbody - @site.send(u).each do |cuenta| + - rol = cuenta.rol_for_site(@site) %tr -# TODO: avatares %td= cuenta.email + %td + %time{ datetime: rol.created_at } + = time_ago_in_words rol.created_at + %td + - if rol.temporal + %span.badge.badge-info= t('.invited') %td .btn-group{role: 'group', 'aria-label': t('.individual_actions')} - if @policy.demote? && @site.usuarie?(cuenta) diff --git a/config/locales/en.yml b/config/locales/en.yml index d4d2e272..28c881c7 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -291,6 +291,7 @@ en: confirm: 'Convert to user? They will gain full access to self-manage this site.' invite: text: 'Invite' + invited: Awaiting confirmation invite: title: 'Invite %{invite_as}' help: diff --git a/config/locales/es.yml b/config/locales/es.yml index 9e958dfb..234f38e7 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -292,6 +292,7 @@ es: confirm: '¿Convertir en usuarie? Ganará acceso a la gestión completa del sitio.' invite: text: 'Invitar' + invited: Esperando confirmación invite: title: 'Invitar %{invite_as}' help: