mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 12:08:27 +02:00
TEMP
This commit is contained in:
parent
14675f5bb7
commit
ab6f59c09e
8 changed files with 48 additions and 2 deletions
11
app/controllers/registrant/whois_controller.rb
Normal file
11
app/controllers/registrant/whois_controller.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
class Registrant::WhoisController < RegistrantController
|
||||
def index
|
||||
authorize! :view, Registrant::Whois
|
||||
if params[:domain_name].present?
|
||||
whois_url = "#{ENV['restful_whois_url']}/v1/#{params[:domain_name]}"
|
||||
binding.pry
|
||||
page = Nokogiri::HTML(open(whois_url))
|
||||
@results = 'ee'
|
||||
end
|
||||
end
|
||||
end
|
|
@ -13,6 +13,7 @@ class Ability
|
|||
when 'ApiUser'
|
||||
epp
|
||||
registrar
|
||||
registrant # refactor
|
||||
end
|
||||
|
||||
can :show, :dashboard
|
||||
|
@ -63,6 +64,10 @@ class Ability
|
|||
can :manage, :deposit
|
||||
end
|
||||
|
||||
def registrant
|
||||
can :manage, Registrant::Whois
|
||||
end
|
||||
|
||||
def user
|
||||
can :show, :dashboard
|
||||
end
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
- active_class = %w(registrant/domains registrant/check registrant/renew registrant/tranfer registrant/keyrelays).include?(params[:controller]) ? 'active' :nil
|
||||
%li{class: active_class}= link_to t(:domains), registrant_domains_path
|
||||
|
||||
- active_class = %w(registrant/whois).include?(params[:controller]) ? 'active' :nil
|
||||
%li{class: active_class}= link_to t(:whois), registrant_whois_path
|
||||
|
||||
%ul.nav.navbar-nav.navbar-right
|
||||
- if user_signed_in?
|
||||
%li= link_to t(:log_out, user: current_user), '/registrant/logout'
|
||||
|
|
21
app/views/registrant/whois/index.haml
Normal file
21
app/views/registrant/whois/index.haml
Normal file
|
@ -0,0 +1,21 @@
|
|||
= render 'shared/title', name: t(:whois)
|
||||
|
||||
- if ENV['restful_whois_url'].blank?
|
||||
%p
|
||||
Registrant configuration issue: missing restful_whois_url
|
||||
- else
|
||||
.row
|
||||
.col-md-12{style: 'margin-bottom: -15px;'}
|
||||
= form_tag registrant_whois_path, class: 'form-horizontal', method: :get do
|
||||
.col-md-11
|
||||
.form-group
|
||||
= text_field_tag :domain_name, params[:domain_name], class: 'form-control', placeholder: t(:domain_name), autocomplete: 'off', autofocus: true
|
||||
.col-md-1.text-right.text-center-xs
|
||||
.form-group
|
||||
%button.btn.btn-default
|
||||
|
||||
%span.glyphicon.glyphicon-search
|
||||
|
||||
%hr
|
||||
- if @results
|
||||
= @results
|
Loading…
Add table
Add a link
Reference in a new issue