mirror of
https://github.com/internetee/registry.git
synced 2025-06-13 08:04:45 +02:00
Add email & nonverified color to contact show
This commit is contained in:
parent
3d444c3a04
commit
48036c660d
5 changed files with 10 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
module Concerns
|
module Concerns
|
||||||
module EmailCheckable
|
module EmailVerifable
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
||||||
def email_verification
|
def email_verification
|
|
@ -7,7 +7,7 @@ class Contact < ApplicationRecord
|
||||||
include Concerns::Contact::Transferable
|
include Concerns::Contact::Transferable
|
||||||
include Concerns::Contact::Identical
|
include Concerns::Contact::Identical
|
||||||
include Concerns::Contact::Disclosable
|
include Concerns::Contact::Disclosable
|
||||||
include Concerns::EmailCheckable
|
include Concerns::EmailVerifable
|
||||||
|
|
||||||
belongs_to :original, class_name: self.name
|
belongs_to :original, class_name: self.name
|
||||||
belongs_to :registrar, required: true
|
belongs_to :registrar, required: true
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
class Registrar < ApplicationRecord
|
class Registrar < ApplicationRecord
|
||||||
include Versions # version/registrar_version.rb
|
include Versions # version/registrar_version.rb
|
||||||
include Concerns::Registrar::BookKeeping
|
include Concerns::Registrar::BookKeeping
|
||||||
include Concerns::EmailCheckable
|
include Concerns::EmailVerifable
|
||||||
include Concerns::Registrar::LegalDoc
|
include Concerns::Registrar::LegalDoc
|
||||||
|
|
||||||
has_many :domains, dependent: :restrict_with_error
|
has_many :domains, dependent: :restrict_with_error
|
||||||
|
|
|
@ -85,7 +85,9 @@
|
||||||
%th{class: 'col-xs-2'}
|
%th{class: 'col-xs-2'}
|
||||||
= sort_link(@q, 'ident', t(:ident))
|
= sort_link(@q, 'ident', t(:ident))
|
||||||
%th{class: 'col-xs-2'}
|
%th{class: 'col-xs-2'}
|
||||||
= sort_link(@q, 'email', t(:created_at))
|
= sort_link(@q, 'email', t(:email))
|
||||||
|
%th{class: 'col-xs-2'}
|
||||||
|
= sort_link(@q, 'created_at', t(:created_at))
|
||||||
%th{class: 'col-xs-2'}
|
%th{class: 'col-xs-2'}
|
||||||
= sort_link(@q, 'registrar_name', t(:registrar_name))
|
= sort_link(@q, 'registrar_name', t(:registrar_name))
|
||||||
%tbody
|
%tbody
|
||||||
|
@ -94,6 +96,8 @@
|
||||||
%td= link_to(contact, admin_contact_path(contact))
|
%td= link_to(contact, admin_contact_path(contact))
|
||||||
%td= contact.code
|
%td= contact.code
|
||||||
%td= ident_for(contact)
|
%td= ident_for(contact)
|
||||||
|
%td{class: ('text-danger' unless contact.email_verification.success)}
|
||||||
|
= contact.email
|
||||||
%td= l(contact.created_at, format: :short)
|
%td= l(contact.created_at, format: :short)
|
||||||
%td
|
%td
|
||||||
- if contact.registrar
|
- if contact.registrar
|
||||||
|
|
|
@ -17,7 +17,8 @@
|
||||||
%dd= ident_for(@contact)
|
%dd= ident_for(@contact)
|
||||||
|
|
||||||
%dt= t(:email)
|
%dt= t(:email)
|
||||||
%dd= @contact.email
|
%dd{class: ('text-danger' unless @contact.email_verification.success)}
|
||||||
|
= @contact.email
|
||||||
|
|
||||||
%dt= t(:phone)
|
%dt= t(:phone)
|
||||||
%dd= @contact.phone
|
%dd= @contact.phone
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue