mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 18:26:06 +02:00
Add scaffold for a controller & view
This commit is contained in:
parent
de37732a56
commit
ee2601b8de
8 changed files with 63 additions and 0 deletions
1
Gemfile
1
Gemfile
|
@ -80,6 +80,7 @@ gem 'directo', github: 'internetee/directo', branch: 'master'
|
|||
|
||||
|
||||
group :development, :test do
|
||||
gem 'listen'
|
||||
gem 'pry', '0.10.1'
|
||||
gem 'puma'
|
||||
end
|
||||
|
|
|
@ -250,6 +250,9 @@ GEM
|
|||
kaminari-core (= 1.2.1)
|
||||
kaminari-core (1.2.1)
|
||||
libxml-ruby (3.2.0)
|
||||
listen (3.3.3)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
logger (1.4.2)
|
||||
loofah (2.7.0)
|
||||
crass (~> 1.0.2)
|
||||
|
@ -363,6 +366,9 @@ GEM
|
|||
activesupport (>= 5.2.1)
|
||||
i18n
|
||||
polyamorous (= 2.3.2)
|
||||
rb-fsevent (0.10.4)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rbtree3 (0.6.0)
|
||||
regexp_parser (1.8.0)
|
||||
request_store (1.5.0)
|
||||
|
@ -510,6 +516,7 @@ DEPENDENCIES
|
|||
jquery-ui-rails (= 5.0.5)
|
||||
kaminari
|
||||
lhv!
|
||||
listen
|
||||
minitest (~> 5.14)
|
||||
money-rails
|
||||
nokogiri
|
||||
|
|
9
app/controllers/registrar/bulk_renew_controller.rb
Normal file
9
app/controllers/registrar/bulk_renew_controller.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
class Registrar
|
||||
class BulkRenewController < DeppController
|
||||
def index; end
|
||||
|
||||
def new
|
||||
authorize! :manage, :repp
|
||||
end
|
||||
end
|
||||
end
|
9
app/views/registrar/bulk_change/_api_errors.html.erb
Normal file
9
app/views/registrar/bulk_change/_api_errors.html.erb
Normal file
|
@ -0,0 +1,9 @@
|
|||
<% if @api_errors %>
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
<% @api_errors.each do |error| %>
|
||||
<li><%= error[:title] %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
22
app/views/registrar/bulk_change/_bulk_renew_form.html.erb
Normal file
22
app/views/registrar/bulk_change/_bulk_renew_form.html.erb
Normal file
|
@ -0,0 +1,22 @@
|
|||
<%= form_tag registrar_new_registrar_bulk_renew_path, multipart: true, class: 'form-horizontal' do %>
|
||||
<%= render 'api_errors' %>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-2 control-label">
|
||||
<%= label_tag 'expire_date', t('.expire_date') %>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<%= text_field :expire_date, params[:expire_date],
|
||||
class: 'form-control js-datepicker' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-md-4 col-md-offset-2 text-right">
|
||||
<button class="btn btn-warning">
|
||||
<%= t '.filter_btn' %>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
|
@ -19,6 +19,10 @@
|
|||
<li class="<%= 'active' if active_tab == :bulk_transfer %>">
|
||||
<a href="#bulk_transfer" data-toggle="tab"><%= t '.bulk_transfer' %></a>
|
||||
</li>
|
||||
|
||||
<li class="<%= 'active' if active_tab == :bulk_renew %>">
|
||||
<a href="#bulk_renew" data-toggle="tab"><%= t '.bulk_renew' %></a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
|
@ -34,4 +38,8 @@
|
|||
<div class="tab-pane<%= ' active' if active_tab == :bulk_transfer %>" id="bulk_transfer">
|
||||
<%= render 'bulk_transfer_form' %>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane<%= ' active' if active_tab == :bulk_renew %>" id="bulk_renew">
|
||||
<%= render 'bulk_renew_form' %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -6,6 +6,7 @@ en:
|
|||
technical_contact: Technical contact
|
||||
nameserver: Nameserver
|
||||
bulk_transfer: Bulk transfer
|
||||
bulk_renew: Bulk renew
|
||||
|
||||
tech_contact_form:
|
||||
current_contact_id: Current contact ID
|
||||
|
@ -29,3 +30,7 @@ en:
|
|||
submit_btn: Transfer
|
||||
help_btn: Toggle help
|
||||
help: Transfer domains in the csv file with correct transfer code to this registrar
|
||||
|
||||
bulk_renew_form:
|
||||
filter_btn: Filter
|
||||
expire_date: Expire date
|
||||
|
|
|
@ -133,6 +133,8 @@ Rails.application.routes.draw do
|
|||
end
|
||||
resources :domain_transfers, only: %i[new create]
|
||||
resource :bulk_change, controller: :bulk_change, only: :new
|
||||
# resource :bulk_renew, controller: :bulk_renew #, only: :index
|
||||
post '/registrar/bulk_renew/new', to: 'bulk_renew#new', as: :new_registrar_bulk_renew
|
||||
resource :tech_contacts, only: :update
|
||||
resource :nameservers, only: :update
|
||||
resources :contacts, constraints: {:id => /[^\/]+(?=#{ ActionController::Renderers::RENDERERS.map{|e| "\\.#{e}\\z"}.join("|") })|[^\/]+/} do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue