mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
114554395-param_changes
This commit is contained in:
parent
9e9d0a305a
commit
b73ef11cc3
7 changed files with 32 additions and 12 deletions
|
@ -45,8 +45,15 @@ class Admin::AccountActivitiesController < AdminController
|
|||
def set_default_dates
|
||||
params[:q] ||= {}
|
||||
|
||||
if params[:q][:created_at_gteq].nil? && params[:q][:created_at_lteq].nil? && params[:clear_fields].nil?
|
||||
params[:q][:created_at_gteq] = Time.now.strftime("%Y-%m-%d")
|
||||
if params[:q][:created_at_gteq].nil? && params[:q][:created_at_lteq].nil? && params[:created_after].present?
|
||||
|
||||
default_date = params[:created_after]
|
||||
|
||||
if !['today', 'tomorrow', 'yesterday'].include?(default_date)
|
||||
default_date = 'today'
|
||||
end
|
||||
|
||||
params[:q][:created_at_gteq] = Date.send(default_date).strftime("%Y-%m-%d")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -15,8 +15,14 @@ class Admin::EppLogsController < AdminController
|
|||
def set_default_dates
|
||||
params[:q] ||= {}
|
||||
|
||||
if params[:q][:created_at_gteq].nil? && params[:q][:created_at_lteq].nil? && params[:clear_fields].nil?
|
||||
params[:q][:created_at_gteq] = Time.now.strftime("%Y-%m-%d")
|
||||
if params[:q][:created_at_gteq].nil? && params[:q][:created_at_lteq].nil? && params[:created_after].present?
|
||||
default_date = params[:created_after]
|
||||
|
||||
if !['today', 'tomorrow', 'yesterday'].include?(default_date)
|
||||
default_date = 'today'
|
||||
end
|
||||
|
||||
params[:q][:created_at_gteq] = Date.send(default_date).strftime("%Y-%m-%d")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -15,8 +15,15 @@ class Admin::ReppLogsController < AdminController
|
|||
def set_default_dates
|
||||
params[:q] ||= {}
|
||||
|
||||
if params[:q][:created_at_gteq].nil? && params[:q][:created_at_lteq].nil? && params[:clear_fields].nil?
|
||||
params[:q][:created_at_gteq] = Time.now.strftime("%Y-%m-%d")
|
||||
if params[:q][:created_at_gteq].nil? && params[:q][:created_at_lteq].nil? && params[:created_after].present?
|
||||
|
||||
default_date = params[:created_after]
|
||||
|
||||
if !['today', 'tomorrow', 'yesterday'].include?(default_date)
|
||||
default_date = 'today'
|
||||
end
|
||||
|
||||
params[:q][:created_at_gteq] = Date.send(default_date).strftime("%Y-%m-%d")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -91,4 +91,4 @@
|
|||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{admin_account_activities_path(clear_fields: true)}"
|
||||
window.location = "#{admin_account_activities_path}"
|
||||
|
|
|
@ -72,4 +72,4 @@
|
|||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{admin_epp_logs_path(clear_fields: true)}"
|
||||
window.location = "#{admin_epp_logs_path}"
|
||||
|
|
|
@ -71,4 +71,4 @@
|
|||
:coffee
|
||||
$(".js-reset-form").on "click", (e) ->
|
||||
e.preventDefault();
|
||||
window.location = "#{admin_repp_logs_path(clear_fields: true)}"
|
||||
window.location = "#{admin_repp_logs_path}"
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
%li= link_to t(:pricelists), admin_pricelists_path
|
||||
%li= link_to t(:bank_statements), admin_bank_statements_path
|
||||
%li= link_to t(:invoices), admin_invoices_path
|
||||
%li= link_to t(:account_activities), admin_account_activities_path
|
||||
%li= link_to t(:account_activities), admin_account_activities_path(created_after: 'today')
|
||||
%li.divider
|
||||
%li.dropdown-header= t(:system)
|
||||
%li= link_to t(:settings), admin_settings_path
|
||||
|
@ -64,8 +64,8 @@
|
|||
%li= link_to t(:reserved_domains), admin_reserved_domains_path
|
||||
%li= link_to t(:mail_templates), admin_mail_templates_path
|
||||
-# %li= link_to t(:domains_history), admin_domain_versions_path
|
||||
%li= link_to t(:epp_logs), admin_epp_logs_path
|
||||
%li= link_to t(:repp_logs), admin_repp_logs_path
|
||||
%li= link_to t(:epp_logs), admin_epp_logs_path(created_after: 'today')
|
||||
%li= link_to t(:repp_logs), admin_repp_logs_path(created_after: 'today')
|
||||
%li= link_to t(:que), '/admin/que'
|
||||
|
||||
- if signed_in?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue