-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
86 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,66 @@ | ||
%h2= "Assets Status" | ||
|
||
.row | ||
.col-md-1 | ||
.col-md-10 | ||
%table.table-striped.statusTable | ||
%thead | ||
%tr | ||
%th | ||
Org | ||
%th | ||
Assets Updated | ||
%tbody.searchable | ||
-current_user.viewable_organizations.each do |o| | ||
- if Rails.application.config.try(:use_new_scenarios_tool) | ||
%h2= "Assets Status" | ||
|
||
.row | ||
.col-md-1 | ||
.col-md-10 | ||
%table.table-striped.statusTable | ||
%thead | ||
%tr | ||
%td | ||
=o.short_name | ||
%td | ||
="#{OrgAuditAnalyzer.new(o).audit_complete_pcnt}%" | ||
%th | ||
Org | ||
%th | ||
Assets Updated | ||
%tbody.searchable | ||
-current_user.viewable_organizations.each do |o| | ||
%tr | ||
%td | ||
=o.short_name | ||
%td | ||
="#{OrgAuditAnalyzer.new(o).audit_complete_pcnt}%" | ||
|
||
|
||
|
||
:css | ||
table.dataTable thead .sorting, | ||
table.dataTable thead .sorting_asc, | ||
table.dataTable thead .sorting_desc { | ||
background : none; | ||
} | ||
|
||
:javascript | ||
$(document).ready(function () { | ||
$('.statusTable').DataTable(); | ||
}); | ||
|
||
- else | ||
#spinner{style: 'display:none;'}= loader_panel_tag({:message => "Updating capital plan(s)...", :size => 3, :spinner => "cog"}) | ||
|
||
.row | ||
.col-sm-12 | ||
.page-header | ||
%h2= "#{format_as_fiscal_year(current_planning_year_year)} Capital Plan Status" | ||
|
||
:css | ||
table.dataTable thead .sorting, | ||
table.dataTable thead .sorting_asc, | ||
table.dataTable thead .sorting_desc { | ||
background : none; | ||
} | ||
.row | ||
.col-md-12 | ||
- CapitalPlanType.all.each do |plan_type| | ||
- table_dom_id = SecureRandom.hex | ||
= render partial: 'capital_plans_table', locals: {capital_plan_type: plan_type, table_dom_id: table_dom_id} | ||
|
||
:javascript | ||
$(document).ready(function () { | ||
- if can? :update, CapitalPlan | ||
= render partial: 'scripts', locals: {table_dom_id: table_dom_id} | ||
|
||
$('.statusTable').DataTable(); | ||
:javascript | ||
function get_checkbox_vals(action) { | ||
checked_targets = []; | ||
unchecked_targets = []; | ||
$('input.capital-plan-action-checkbox[data-index="'+action.data('index')+'"]').each(function() { | ||
if ($(this).is(':checked')) { | ||
checked_targets.push($( this ).val()); | ||
} else{ | ||
unchecked_targets.push($( this ).val()); | ||
} | ||
}); | ||
|
||
}); | ||
return [$('tr[data-index="'+action.data('index')+'"]').data('object-key'), checked_targets.join(',')]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module TransamCpt | ||
VERSION = "2.16.1" | ||
VERSION = "2.17.0" | ||
end |