mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 07:04:47 +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 EmailCheckable
|
||||
module EmailVerifable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def email_verification
|
|
@ -7,7 +7,7 @@ class Contact < ApplicationRecord
|
|||
include Concerns::Contact::Transferable
|
||||
include Concerns::Contact::Identical
|
||||
include Concerns::Contact::Disclosable
|
||||
include Concerns::EmailCheckable
|
||||
include Concerns::EmailVerifable
|
||||
|
||||
belongs_to :original, class_name: self.name
|
||||
belongs_to :registrar, required: true
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
class Registrar < ApplicationRecord
|
||||
include Versions # version/registrar_version.rb
|
||||
include Concerns::Registrar::BookKeeping
|
||||
include Concerns::EmailCheckable
|
||||
include Concerns::EmailVerifable
|
||||
include Concerns::Registrar::LegalDoc
|
||||
|
||||
has_many :domains, dependent: :restrict_with_error
|
||||
|
|
|
@ -85,7 +85,9 @@
|
|||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'ident', t(:ident))
|
||||
%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'}
|
||||
= sort_link(@q, 'registrar_name', t(:registrar_name))
|
||||
%tbody
|
||||
|
@ -94,6 +96,8 @@
|
|||
%td= link_to(contact, admin_contact_path(contact))
|
||||
%td= contact.code
|
||||
%td= ident_for(contact)
|
||||
%td{class: ('text-danger' unless contact.email_verification.success)}
|
||||
= contact.email
|
||||
%td= l(contact.created_at, format: :short)
|
||||
%td
|
||||
- if contact.registrar
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
%dd= ident_for(@contact)
|
||||
|
||||
%dt= t(:email)
|
||||
%dd= @contact.email
|
||||
%dd{class: ('text-danger' unless @contact.email_verification.success)}
|
||||
= @contact.email
|
||||
|
||||
%dt= t(:phone)
|
||||
%dd= @contact.phone
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue