diff --git a/Gemfile b/Gemfile index 1031380..99ce3d8 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 67cc2bc..38aff66 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 f8408da..2698cc4 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 d4d2e27..28c881c 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 9e958df..234f38e 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: