From 8eacb0a26ee0ab818a7f89eddc4026990e25ad9e Mon Sep 17 00:00:00 2001 From: Nicolas Beiro LeBeau Date: Tue, 17 Mar 2020 16:44:52 -0400 Subject: [PATCH 01/38] table library first pass --- app/views/grants/_index_table.html.haml | 169 +++++++++++++++++------- 1 file changed, 121 insertions(+), 48 deletions(-) diff --git a/app/views/grants/_index_table.html.haml b/app/views/grants/_index_table.html.haml index bd7bd77a..fc352ff6 100644 --- a/app/views/grants/_index_table.html.haml +++ b/app/views/grants/_index_table.html.haml @@ -2,7 +2,28 @@ table_dom_id = SecureRandom.hex show_actions ||= 0 + def get_row(grant, row) + # row = [ + # grant.object_key, + # (link_to grant.grant_num) + ' ,' + grant_path(grant), + # grant.sourceable.funding_source_type, + # grant.funding_source, + # grant.fy_year, + # grant.owner, + # grant.has_multiple_contributors ? 'Multiple' : (grant.contributor.nil? ? 'Other' : grant.contributor), + # grant.legislative_authorization, + # format_as_date(grant.award_date), + # format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)), + # grant.state.titleize, + # grant.updater, + # format_as_date_time(grant.updated_at)] + end + :css + html { + max-width: 100%; + overflow-x: hidden; + } #subheader-label h2 { border-bottom: 1px solid #e5e5e5; } @@ -20,55 +41,107 @@ %legend.asset-subheader %span #{params[:state] == "all" ? "All" : "Filtered"} -#grants_table_actions.row - - if show_actions == 1 - = render :partial => "grants/index_actions" -.table-responsive - %table.table.table-hover{:id => table_dom_id, :data => {:toggle => 'table', - :pagination => 'true', - :show_pagination_switch => 'false', - :page_number => '1', - :page_list => "[10, 20, 50, 100, 200]", - :page_size => current_user.num_table_rows, - :search => 'false', - :export_types => "['csv', 'txt', 'excel']", - :show_export => 'false', - :show_columns => 'false', - :cookie => 'true', - :cookie_id_table => "grants_id", - :cookie_expire => "1y"}} - %thead - %tr - %th.left{:data => {:visible => 'false'}} Object Key - %th.left{:data => {:sortable => 'true'}} Grant Number - %th.left{:data => {:sortable => 'true'}} Source - %th.left{:data => {:sortable => 'true'}} Program - %th.left{:data => {:sortable => 'true'}} Grant Year - %th.left{:data => {:sortable => 'true'}} Owner - %th.left{:data => {:sortable => 'true'}} Contributor - %th.left{:data => {:sortable => 'true'}} Legislative Authorization - %th.left{:data => {:sortable => 'true'}} Date of Award - %th.left{:data => {:sortable => 'true'}} Date of Most Recent Amendment - %th.left{:data => {:sortable => 'true'}} Status - %th.left{:data => {:sortable => 'true'}} Last Update By - %th.left{:data => {:sortable => 'true'}} Last Update Date - %tbody - - grants.each do |grant| - %tr{:id => grant.object_key} - %td.left= grant.object_key - %td.left= link_to grant.grant_num, grant_path(grant) - %td.left= grant.sourceable.funding_source_type - %td.left= grant.funding_source - %td.left= grant.fy_year - %td.left= grant.owner - %td.left= grant.has_multiple_contributors ? 'Multiple' : (grant.contributor.nil? ? 'Other' : grant.contributor) - %td.left= grant.legislative_authorization - %td.left= format_as_date(grant.award_date) - %td.left= format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)) - %td.left= grant.state.titleize - %td.left= grant.updater - %td.left= format_as_date_time(grant.updated_at) +.library-table + %table.elbat{:id => table_dom_id, + :use => 'true', + :data => {:use => 'true', + :pagination => 'client', + :current_page => '0', + :current_page_size => '10', + :page_sizes => "10,20,50,100,200", + :search => 'client', + :export => "['csv', 'txt', 'excel']", + :columns => "Object Key,10%, + Grant Number,12%, + Source,5%, + Program,8%, + Grant Year,5%, + Owner,5%, + Contributor,8%, + Legislative Authorization,8%, + Date of Award,8%, + Date of Most Recent Amendment,8%, + Status,5%, + Last Update By,10%, + Last Update Date,12%,", + :cookies => "true", + :sort => 'client', + :sort_params => @params, + :filter => "[]", + :data_source => 'client', + :url => ''}} + - grants.each do |grant| + + :javascript + add_row('#{table_dom_id}', + [ + '#{h grant.object_key }', + '#{h link_to grant.grant_num, grant_path(grant) }', + '#{h grant.sourceable.funding_source_type }', + '#{h grant.funding_source }', + '#{h grant.fy_year }', + '#{h grant.owner }', + '#{h grant.has_multiple_contributors ? 'Multiple' : (grant.contributor.nil? ? 'Other' : grant.contributor) }', + '#{h grant.legislative_authorization }', + '#{h format_as_date(grant.award_date) }', + '#{h format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)) }', + '#{h grant.state.titleize}', + '#{h grant.updater }', + '#{h format_as_date_time(grant.updated_at) }' + ]); + + +-##grants_table_actions.row +-# - if show_actions == 1 +-# = render :partial => "grants/index_actions", :sourceable => @sourceable +-# +-#.table-responsive +-# %table.table.table-hover{:id => table_dom_id, :data => {:toggle => 'table', +-# :pagination => 'true', +-# :show_pagination_switch => 'false', +-# :page_number => '1', +-# :page_list => "[10, 20, 50, 100, 200]", +-# :page_size => current_user.num_table_rows, +-# :search => 'false', +-# :export_types => "['csv', 'txt', 'excel']", +-# :show_export => 'false', +-# :show_columns => 'false', +-# :cookie => 'true', +-# :cookie_id_table => "grants_id", +-# :cookie_expire => "1y"}} +-# %thead +-# %tr +-# %th.left{:data => {:visible => 'false'}} Object Key +-# %th.left{:data => {:sortable => 'true'}} Grant Number +-# %th.left{:data => {:sortable => 'true'}} Source +-# %th.left{:data => {:sortable => 'true'}} Program +-# %th.left{:data => {:sortable => 'true'}} Grant Year +-# %th.left{:data => {:sortable => 'true'}} Owner +-# %th.left{:data => {:sortable => 'true'}} Contributor +-# %th.left{:data => {:sortable => 'true'}} Legislative Authorization +-# %th.left{:data => {:sortable => 'true'}} Date of Award +-# %th.left{:data => {:sortable => 'true'}} Date of Most Recent Amendment +-# %th.left{:data => {:sortable => 'true'}} Status +-# %th.left{:data => {:sortable => 'true'}} Last Update By +-# %th.left{:data => {:sortable => 'true'}} Last Update Date +-# +-# %tbody +-# - grants.each do |grant| +-# %tr{:id => grant.object_key} +-# %td.left= grant.object_key +-# %td.left= link_to grant.grant_num, grant_path(grant) +-# %td.left= grant.sourceable.funding_source_type +-# %td.left= grant.funding_source +-# %td.left= grant.fy_year +-# %td.left= grant.owner +-# %td.left= grant.has_multiple_contributors ? 'Multiple' : (grant.contributor.nil? ? 'Other' : grant.contributor) +-# %td.left= grant.legislative_authorization +-# %td.left= format_as_date(grant.award_date) +-# %td.left= format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)) +-# %td.left= grant.state.titleize +-# %td.left= grant.updater +-# %td.left= format_as_date_time(grant.updated_at) = render :partial => 'shared/table_scripts', :locals => {:table_id => table_dom_id, :path_pattern => grant_path("xxx")} \ No newline at end of file From 75475a6cb624382a370037fd0f5bab8d6b27b56b Mon Sep 17 00:00:00 2001 From: Nicolas Beiro LeBeau Date: Tue, 14 Apr 2020 17:32:29 -0400 Subject: [PATCH 02/38] new font awesome, new columns format --- app/views/grants/_index_table.html.haml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/app/views/grants/_index_table.html.haml b/app/views/grants/_index_table.html.haml index fc352ff6..f967ae63 100644 --- a/app/views/grants/_index_table.html.haml +++ b/app/views/grants/_index_table.html.haml @@ -42,12 +42,12 @@ %span #{params[:state] == "all" ? "All" : "Filtered"} - + = javascript_include_tag "https://kit.fontawesome.com/#{ENV['FONT_AWESOME']}.js" .library-table %table.elbat{:id => table_dom_id, :use => 'true', :data => {:use => 'true', - :pagination => 'client', + :side => 'client', :current_page => '0', :current_page_size => '10', :page_sizes => "10,20,50,100,200", @@ -66,18 +66,30 @@ Status,5%, Last Update By,10%, Last Update Date,12%,", + :selected_columns => "Grant Number, + Source, + Program, + Grant Year, + Owner, + Contributor, + Legislative Authorization, + Date of Award, + Date of Most Recent Amendment, + Status, + Last Update By, + Last Update Date", :cookies => "true", :sort => 'client', :sort_params => @params, :filter => "[]", :data_source => 'client', :url => ''}} - - grants.each do |grant| + - grants.each_with_index do |grant, index| :javascript add_row('#{table_dom_id}', [ - '#{h grant.object_key }', + // '#{h grant.object_key }', '#{h link_to grant.grant_num, grant_path(grant) }', '#{h grant.sourceable.funding_source_type }', '#{h grant.funding_source }', @@ -90,7 +102,7 @@ '#{h grant.state.titleize}', '#{h grant.updater }', '#{h format_as_date_time(grant.updated_at) }' - ]); + ], #{index}); -##grants_table_actions.row From 6eb8347aa937a9e28218d243bde8317972137981 Mon Sep 17 00:00:00 2001 From: Derek Edwards Date: Tue, 28 Apr 2020 16:13:10 -0400 Subject: [PATCH 03/38] 2.10.0 (#75) * Update version. * Update version. Co-authored-by: Lydia Chang --- lib/transam_accounting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/transam_accounting/version.rb b/lib/transam_accounting/version.rb index f4e4b8ca..a12acfd3 100644 --- a/lib/transam_accounting/version.rb +++ b/lib/transam_accounting/version.rb @@ -1,3 +1,3 @@ module TransamAccounting - VERSION = "2.9.1" + VERSION = "2.10.0-rc.2" end From eae672fea29cb9ff7d872f124e65d69aec903be7 Mon Sep 17 00:00:00 2001 From: Nicolas Beiro LeBeau Date: Tue, 5 May 2020 15:39:56 -0400 Subject: [PATCH 04/38] new column styling on grants --- app/views/grants/_index_table.html.haml | 116 ++++++++++++++---------- 1 file changed, 69 insertions(+), 47 deletions(-) diff --git a/app/views/grants/_index_table.html.haml b/app/views/grants/_index_table.html.haml index f967ae63..b0cffecd 100644 --- a/app/views/grants/_index_table.html.haml +++ b/app/views/grants/_index_table.html.haml @@ -2,22 +2,6 @@ table_dom_id = SecureRandom.hex show_actions ||= 0 - def get_row(grant, row) - # row = [ - # grant.object_key, - # (link_to grant.grant_num) + ' ,' + grant_path(grant), - # grant.sourceable.funding_source_type, - # grant.funding_source, - # grant.fy_year, - # grant.owner, - # grant.has_multiple_contributors ? 'Multiple' : (grant.contributor.nil? ? 'Other' : grant.contributor), - # grant.legislative_authorization, - # format_as_date(grant.award_date), - # format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)), - # grant.state.titleize, - # grant.updater, - # format_as_date_time(grant.updated_at)] - end :css html { @@ -36,13 +20,52 @@ position:relative; } + .col-item:nth-child(1){ + width:10%; + } + .col-item:nth-child(2){ + width:12%; + } + .col-item:nth-child(3){ + width:5%; + } + .col-item:nth-child(4){ + width:8%; + } + .col-item:nth-child(5){ + width:5%; + } + .col-item:nth-child(6){ + width:5%; + } + .col-item:nth-child(7){ + width:8%; + } + .col-item:nth-child(8){ + width:8%; + } + .col-item:nth-child(9){ + width:8%; + } + .col-item:nth-child(10){ + width:8%; + } + .col-item:nth-child(11){ + width:5%; + } + .col-item:nth-child(12){ + width:10%; + } + .col-item:nth-child(13){ + width:12%; + } + #subheader-label %h2 Grants %legend.asset-subheader %span #{params[:state] == "all" ? "All" : "Filtered"} - - = javascript_include_tag "https://kit.fontawesome.com/#{ENV['FONT_AWESOME']}.js" += javascript_include_tag "https://kit.fontawesome.com/#{ENV['FONT_AWESOME']}.js" .library-table %table.elbat{:id => table_dom_id, :use => 'true', @@ -53,19 +76,19 @@ :page_sizes => "10,20,50,100,200", :search => 'client', :export => "['csv', 'txt', 'excel']", - :columns => "Object Key,10%, - Grant Number,12%, - Source,5%, - Program,8%, - Grant Year,5%, - Owner,5%, - Contributor,8%, - Legislative Authorization,8%, - Date of Award,8%, - Date of Most Recent Amendment,8%, - Status,5%, - Last Update By,10%, - Last Update Date,12%,", + :columns => "Object Key,drilldown-link, + Grant Number,, + Source,, + Program,, + Grant Year,, + Owner,, + Contributor,, + Legislative Authorization,, + Date of Award,, + Date of Most Recent Amendment,, + Status,, + Last Update By,, + Last Update Date,,", :selected_columns => "Grant Number, Source, Program, @@ -80,7 +103,7 @@ Last Update Date", :cookies => "true", :sort => 'client', - :sort_params => @params, + :params => "{}", :filter => "[]", :data_source => 'client', :url => ''}} @@ -88,21 +111,20 @@ :javascript add_row('#{table_dom_id}', - [ - // '#{h grant.object_key }', - '#{h link_to grant.grant_num, grant_path(grant) }', - '#{h grant.sourceable.funding_source_type }', - '#{h grant.funding_source }', - '#{h grant.fy_year }', - '#{h grant.owner }', - '#{h grant.has_multiple_contributors ? 'Multiple' : (grant.contributor.nil? ? 'Other' : grant.contributor) }', - '#{h grant.legislative_authorization }', - '#{h format_as_date(grant.award_date) }', - '#{h format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)) }', - '#{h grant.state.titleize}', - '#{h grant.updater }', - '#{h format_as_date_time(grant.updated_at) }' - ], #{index}); + { + "Grant Number": '#{h link_to grant.grant_num, grant_path(grant) }', + "Source": '#{h grant.sourceable.funding_source_type }', + "Program": '#{h grant.funding_source }', + "Grant Year": '#{h grant.fy_year }', + "Owner": '#{h grant.owner }', + "Contributor": '#{h grant.has_multiple_contributors ? 'Multiple' : (grant.contributor.nil? ? 'Other' : grant.contributor) }', + "Legislative Authorization": '#{h grant.legislative_authorization }', + "Date of Award": '#{h format_as_date(grant.award_date) }', + "Date of Most Recent Amendment": '#{h format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)) }', + "Status": '#{h grant.state.titleize}', + "Last Update By": '#{h grant.updater }', + "Last Update Date": '#{h format_as_date_time(grant.updated_at) }', + }, #{index}); -##grants_table_actions.row From 3c1d3bc6727353266f7e62fff967cb7d5316058c Mon Sep 17 00:00:00 2001 From: Derek Edwards Date: Tue, 5 May 2020 16:32:57 -0400 Subject: [PATCH 05/38] Update version. --- lib/transam_accounting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/transam_accounting/version.rb b/lib/transam_accounting/version.rb index a12acfd3..118bb757 100644 --- a/lib/transam_accounting/version.rb +++ b/lib/transam_accounting/version.rb @@ -1,3 +1,3 @@ module TransamAccounting - VERSION = "2.10.0-rc.2" + VERSION = "2.11.0-rc.X" end From f05a1a1558db8f8ff83a3fda9ba19b6e455aeec0 Mon Sep 17 00:00:00 2001 From: NJBL Date: Thu, 7 May 2020 19:47:51 -0400 Subject: [PATCH 06/38] programs --- .../funding_sources/_index_table.html.haml | 256 ++++++++++++------ 1 file changed, 180 insertions(+), 76 deletions(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index ce74b093..8e762be3 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -6,86 +6,190 @@ #programs_table_actions.btn-toolbar = render :partial => "funding_sources/index_actions" -.table-responsive - %table.table.table-hover{:id => table_dom_id, :data => {:toggle => 'table', - :pagination => 'true', - :show_pagination_switch => 'false', - :page_list => "5, 10, 20, 50, 100, 200, 10000]", - :page_size => current_user.num_table_rows, - :search => 'false', - :toolbar => "#programs_table_actions", - :export_types => "['csv', 'txt', 'excel']", - :show_export => 'true', - :show_columns => 'true', - :cookie => 'true', - :cookie_id_table => "funding_sources_id", - :cookie_expire => "1y"}} - - %thead - %tr - %th.center{:data => {:visible => 'false'}} Object Key - %th.center{:data => {:visible => 'false', :sortable => 'true'}} External ID - %th.center{:data => {:sortable => 'true'}} Name - %th.center{:data => {:sortable => 'true'}} Source - - %th.center{:data => {:sortable => 'true'}} Type - %th.center{:data => {:sortable => 'true', :formatter => 'percentage_formatter'}} Inflation Rate - - %th.center{:data => {:sortable => 'true'}} Life of $ (yrs) - %th.center{:data => {:sortable => 'true', :formatter => 'percentage_formatter'}} Pcnt Match - - %th.center{:data => {:sortable => 'true'}} Valid From - %th.center{:data => {:sortable => 'true'}} Valid To - - %th - - %tbody - - funding_sources.each do |f| - %tr{:id => f.object_key, :class => 'action-path'} - %td.left= f.object_key - %td.left= f.external_id - =# add whitespace so always read as text and not number. JS plugin trims later - %td.left{data: {tableexport: {msonumberformat: "\\@", value: "#{f.name} "}}} - = f.name - %td.left= f.funding_source_type - - %td.center= f.formula_fund.present? ? 'Formula' : (f.discretionary_fund.present? ? 'Discretionary' : 'Unknown') - %td.right= f.inflation_rate.present? ? f.inflation_rate : '' - - %td.center= format_as_integer(f.life_in_years) - %td.right= f.match_required - - %td.center= format_as_fiscal_year(f.fy_start) - %td.center= format_as_fiscal_year(f.fy_end) - - %td.center.nowrap{:data => {:field => 'action-cell'}} - %a.transam-popover{data: {placement: 'left', toggle: 'popover', html: 'true', content: "#{f.description}
#{f.details}"}, title: 'Details', tabindex: '0'} - %i.fa.fa-info-circle - - if can? :update, f - = link_to edit_funding_source_path(f), :class => "button btn-xs", :title => "Edit program" do - %i.fa.fa-edit.fa-1-5x.text-success - - if (can? :destroy, f) && f.deleteable? - = link_to funding_source_path(f), :method => :delete, :data => {:confirm => "Are you sure? The action cannot be undone."} do - %i.fa.fa-trash-o.fa-fw.text-danger + +:css + + .col-item:nth-child(1){ + width:5%; + } + .col-item:nth-child(2){ + width:10%; + } + .col-item:nth-child(3){ + width:5%; + } + .col-item:nth-child(4){ + width:8%; + } + .col-item:nth-child(5){ + width:5%; + } + .col-item:nth-child(6){ + width:5%; + } + .col-item:nth-child(7){ + width:8%; + } + .col-item:nth-child(8){ + width:8%; + } + .col-item:nth-child(9){ + width:8%; + } + .col-item:nth-child(10){ + width:8%; + } + .col-item:nth-child(11){ + width:5%; + } + .col-item:nth-child(12){ + width:10%; + } + .col-item:nth-child(13){ + width:12%; + } + += javascript_include_tag "https://kit.fontawesome.com/#{ENV['FONT_AWESOME']}.js" +.library-table + %table.elbat{:id => table_dom_id, + :use => 'true', + :data => {:use => 'true', + :side => 'client', + :current_page => '0', + :current_page_size => '10', + :page_sizes => "10,20,50,100,200", + :search => 'client', + :export => "['csv', 'txt', 'excel']", + :columns => "Program Name,drilldown-link, + Source, + Program Type, + Inflation Rate, + Life of $ (yrs), + % Match, + Valid From, + Valid To, + Description, + Details, + External ID, + Object Key,", + :selected_columns => "Program Name, + Source, + Program Type, + Inflation Rate, + Life of $ (yrs), + % Match, + Valid From, + Valid To", + :cookies => "true", + :sort => 'client', + :params => "{}", + :filter => "[]", + :data_source => 'client', + :url => ''}} + - funding_sources.each_with_index do |f, index| + + :javascript + add_row('#{table_dom_id}', + { + "Program Name": '#{h link_to f.name, funding_sources_path(f) }', + "Source": '#{h f.funding_source_type }', + "Program Type": '#{h f.formula_fund.present? ? "Formula" : (f.discretionary_fund.present? ? "Discretionary" : "Unknown") }', + "Inflation Rate": '#{h f.inflation_rate.present? ? f.inflation_rate : "" }', + "Life of $ (yrs)": '#{h format_as_integer(f.life_in_years) }', + "% Match": '#{h f.match_required }', + "Valid From": '#{h format_as_fiscal_year(f.fy_start) }', + "Valid To": '#{h format_as_fiscal_year(f.fy_end) }', + "Description": '#{h f.description }', + "Details": '#{h f.details }', + "External ID": '#{h f.external_id }', + "Object Key": '#{h f.object_key }', + }, #{index}); + + + + + + +-# .table-responsive +-# %table.table.table-hover{:id => table_dom_id, :data => {:toggle => 'table', +-# :pagination => 'true', +-# :show_pagination_switch => 'false', +-# :page_list => "5, 10, 20, 50, 100, 200, 10000]", +-# :page_size => current_user.num_table_rows, +-# :search => 'false', +-# :toolbar => "#programs_table_actions", +-# :export_types => "['csv', 'txt', 'excel']", +-# :show_export => 'true', +-# :show_columns => 'true', +-# :cookie => 'true', +-# :cookie_id_table => "funding_sources_id", +-# :cookie_expire => "1y"}} + +-# %thead +-# %tr +-# %th.center{:data => {:visible => 'false'}} Object Key +-# %th.center{:data => {:visible => 'false', :sortable => 'true'}} External ID +-# %th.center{:data => {:sortable => 'true'}} Name +-# %th.center{:data => {:sortable => 'true'}} Source + +-# %th.center{:data => {:sortable => 'true'}} Type +-# %th.center{:data => {:sortable => 'true', :formatter => 'percentage_formatter'}} Inflation Rate + +-# %th.center{:data => {:sortable => 'true'}} Life of $ (yrs) +-# %th.center{:data => {:sortable => 'true', :formatter => 'percentage_formatter'}} Pcnt Match + +-# %th.center{:data => {:sortable => 'true'}} Valid From +-# %th.center{:data => {:sortable => 'true'}} Valid To + +-# %th + +-# %tbody +-# - funding_sources.each do |f| +-# %tr{:id => f.object_key, :class => 'action-path'} +-# %td.left= f.object_key +-# %td.left= f.external_id +-# =# add whitespace so always read as text and not number. JS plugin trims later +-# %td.left{data: {tableexport: {msonumberformat: "\\@", value: "#{f.name} "}}} +-# = f.name +-# %td.left= f.funding_source_type + +-# %td.center= f.formula_fund.present? ? 'Formula' : (f.discretionary_fund.present? ? 'Discretionary' : 'Unknown') +-# %td.right= f.inflation_rate.present? ? f.inflation_rate : '' + +-# %td.center= format_as_integer(f.life_in_years) +-# %td.right= f.match_required + +-# %td.center= format_as_fiscal_year(f.fy_start) +-# %td.center= format_as_fiscal_year(f.fy_end) + +-# %td.center.nowrap{:data => {:field => 'action-cell'}} +-# %a.transam-popover{data: {placement: 'left', toggle: 'popover', html: 'true', content: "#{f.description}
#{f.details}"}, title: 'Details', tabindex: '0'} +-# %i.fa.fa-info-circle +-# - if can? :update, f +-# = link_to edit_funding_source_path(f), :class => "button btn-xs", :title => "Edit program" do +-# %i.fa.fa-edit.fa-1-5x.text-success +-# - if (can? :destroy, f) && f.deleteable? +-# = link_to funding_source_path(f), :method => :delete, :data => {:confirm => "Are you sure? The action cannot be undone."} do +-# %i.fa.fa-trash-o.fa-fw.text-danger = render 'shared/table_formatters' -:javascript +-# :javascript - $('#' + '#{table_dom_id}').on('post-body.bs.table', function () { - $('.transam-popover').popover({ - trigger: 'hover' - }); +-# $('#' + '#{table_dom_id}').on('post-body.bs.table', function () { +-# $('.transam-popover').popover({ +-# trigger: 'hover' +-# }); - $('.transam-tooltip').tooltip(); - }); +-# $('.transam-tooltip').tooltip(); +-# }); - $('#' + '#{table_dom_id}').on('click', 'td', function () { - var path = "#{funding_source_path('xxx')}"; - var row = $(this).parent('tr').attr('id'); +-# $('#' + '#{table_dom_id}').on('click', 'td', function () { +-# var path = "#{funding_source_path('xxx')}"; +-# var row = $(this).parent('tr').attr('id'); - if ($(this).attr('data-field') != 'action-cell') { - var url = path.replace("xxx", row); - document.location.href = url; - } - }); \ No newline at end of file +-# if ($(this).attr('data-field') != 'action-cell') { +-# var url = path.replace("xxx", row); +-# document.location.href = url; +-# } +-# }); \ No newline at end of file From 2bd08d36edd550ca577a13b052d5012faaddafeb Mon Sep 17 00:00:00 2001 From: NJBL Date: Thu, 14 May 2020 10:06:16 -0400 Subject: [PATCH 07/38] 1) return index actions 2) redistribute column widths --- app/views/grants/_index_table.html.haml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/grants/_index_table.html.haml b/app/views/grants/_index_table.html.haml index b0cffecd..c78685eb 100644 --- a/app/views/grants/_index_table.html.haml +++ b/app/views/grants/_index_table.html.haml @@ -2,6 +2,9 @@ table_dom_id = SecureRandom.hex show_actions ||= 0 +#grants_table_actions.row + - if show_actions == 1 + = render :partial => "grants/index_actions", :sourceable => @sourceable :css html { @@ -21,7 +24,7 @@ } .col-item:nth-child(1){ - width:10%; + width:12%; } .col-item:nth-child(2){ width:12%; @@ -42,13 +45,13 @@ width:8%; } .col-item:nth-child(8){ - width:8%; + width:10%; } .col-item:nth-child(9){ width:8%; } .col-item:nth-child(10){ - width:8%; + width:11%; } .col-item:nth-child(11){ width:5%; From 27036848316e9afc252837f85ea924f43ead70a9 Mon Sep 17 00:00:00 2001 From: NJBL Date: Thu, 14 May 2020 16:42:37 -0400 Subject: [PATCH 08/38] grants 1) index actions 2) corrected drilldown link column 3)right align date --- app/views/grants/_index_table.html.haml | 42 +++++++++++++------------ 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/app/views/grants/_index_table.html.haml b/app/views/grants/_index_table.html.haml index c78685eb..2c3b4fa6 100644 --- a/app/views/grants/_index_table.html.haml +++ b/app/views/grants/_index_table.html.haml @@ -2,9 +2,6 @@ table_dom_id = SecureRandom.hex show_actions ||= 0 -#grants_table_actions.row - - if show_actions == 1 - = render :partial => "grants/index_actions", :sourceable => @sourceable :css html { @@ -27,7 +24,7 @@ width:12%; } .col-item:nth-child(2){ - width:12%; + width:8%; } .col-item:nth-child(3){ width:5%; @@ -45,7 +42,7 @@ width:8%; } .col-item:nth-child(8){ - width:10%; + width:12%; } .col-item:nth-child(9){ width:8%; @@ -54,13 +51,13 @@ width:11%; } .col-item:nth-child(11){ - width:5%; + width:7%; } .col-item:nth-child(12){ width:10%; } .col-item:nth-child(13){ - width:12%; + width:8%; } #subheader-label @@ -68,6 +65,11 @@ %legend.asset-subheader %span #{params[:state] == "all" ? "All" : "Filtered"} + +#grants_table_actions.row + - if show_actions == 1 + = render :partial => "grants/index_actions", :sourceable => @sourceable + = javascript_include_tag "https://kit.fontawesome.com/#{ENV['FONT_AWESOME']}.js" .library-table %table.elbat{:id => table_dom_id, @@ -79,19 +81,19 @@ :page_sizes => "10,20,50,100,200", :search => 'client', :export => "['csv', 'txt', 'excel']", - :columns => "Object Key,drilldown-link, - Grant Number,, - Source,, - Program,, - Grant Year,, - Owner,, - Contributor,, - Legislative Authorization,, - Date of Award,, - Date of Most Recent Amendment,, - Status,, - Last Update By,, - Last Update Date,,", + :columns => "Object Key, + Grant Number,drilldown-link, + Source, + Program, + Grant Year, + Owner, + Contributor, + Legislative Authorization, + Date of Award,right-align, + Date of Most Recent Amendment, + Status, + Last Update By, + Last Update Date,", :selected_columns => "Grant Number, Source, Program, From aadfaad314e33e11acb0b5f8d88cb8ea6e3a29b9 Mon Sep 17 00:00:00 2001 From: NJBL Date: Fri, 15 May 2020 16:59:22 -0400 Subject: [PATCH 09/38] grants date styling --- app/views/grants/_index_table.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/grants/_index_table.html.haml b/app/views/grants/_index_table.html.haml index 2c3b4fa6..68825d63 100644 --- a/app/views/grants/_index_table.html.haml +++ b/app/views/grants/_index_table.html.haml @@ -93,7 +93,7 @@ Date of Most Recent Amendment, Status, Last Update By, - Last Update Date,", + Last Update Date,right-align", :selected_columns => "Grant Number, Source, Program, From fc02abb09bcae6ddc587df543c336d4b7cc3ebf2 Mon Sep 17 00:00:00 2001 From: NJBL Date: Fri, 22 May 2020 02:37:26 -0400 Subject: [PATCH 10/38] funding sources drilldown --- app/views/funding_sources/_index_table.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 8e762be3..d1edcca0 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -91,7 +91,7 @@ :javascript add_row('#{table_dom_id}', { - "Program Name": '#{h link_to f.name, funding_sources_path(f) }', + "Program Name": '#{h link_to f.name, funding_source_path(f) }', "Source": '#{h f.funding_source_type }', "Program Type": '#{h f.formula_fund.present? ? "Formula" : (f.discretionary_fund.present? ? "Discretionary" : "Unknown") }', "Inflation Rate": '#{h f.inflation_rate.present? ? f.inflation_rate : "" }', From 933dd2ac69722ff54064cc6dd032609562812543 Mon Sep 17 00:00:00 2001 From: NJBL Date: Fri, 22 May 2020 02:38:48 -0400 Subject: [PATCH 11/38] funding sources right align dates (?) --- app/views/funding_sources/_index_table.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index d1edcca0..2d056542 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -66,8 +66,8 @@ Inflation Rate, Life of $ (yrs), % Match, - Valid From, - Valid To, + Valid From,right-align, + Valid To,right-align, Description, Details, External ID, From 8d89c8e2242593b82e493d4a67c649d5c96a81ef Mon Sep 17 00:00:00 2001 From: NJBL Date: Tue, 26 May 2020 11:48:58 -0400 Subject: [PATCH 12/38] checkbox column width --- app/views/funding_sources/_index_table.html.haml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 2d056542..0cd3d17e 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -9,9 +9,6 @@ :css - .col-item:nth-child(1){ - width:5%; - } .col-item:nth-child(2){ width:10%; } @@ -28,13 +25,13 @@ width:5%; } .col-item:nth-child(7){ - width:8%; + width:5%; } .col-item:nth-child(8){ - width:8%; + width:5%; } .col-item:nth-child(9){ - width:8%; + width:5%; } .col-item:nth-child(10){ width:8%; From 8eb18576d6de5fff8f64c5fa5b79018c905998a1 Mon Sep 17 00:00:00 2001 From: NJBL Date: Tue, 26 May 2020 13:40:31 -0400 Subject: [PATCH 13/38] Programs table actions, percentages --- .../funding_sources/_index_table.html.haml | 58 ++++++++++++------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 0cd3d17e..335f4ad5 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -46,7 +46,7 @@ width:12%; } -= javascript_include_tag "https://kit.fontawesome.com/#{ENV['FONT_AWESOME']}.js" + .library-table %table.elbat{:id => table_dom_id, :use => 'true', @@ -68,7 +68,8 @@ Description, Details, External ID, - Object Key,", + Object Key, + Actions,action-column", :selected_columns => "Program Name, Source, Program Type, @@ -76,7 +77,8 @@ Life of $ (yrs), % Match, Valid From, - Valid To", + Valid To, + Actions", :cookies => "true", :sort => 'client', :params => "{}", @@ -84,7 +86,16 @@ :data_source => 'client', :url => ''}} - funding_sources.each_with_index do |f, index| - + %div.actions + %a.transam-popover{data: {placement: 'left', toggle: 'popover', html: 'true', content: "#{f.description}
#{f.details}"}, title: 'Details', tabindex: '0'} + %i.fa.fa-info-circle + - if can? :update, f + = link_to edit_funding_source_path(f), :class => "button btn-xs", :title => "Edit program" do + %i.fa.fa-edit.fa-1-5x.text-success + - if (can? :destroy, f) && f.deleteable? + = link_to funding_source_path(f), :method => :delete, :data => {:confirm => "Are you sure? The action cannot be undone."} do + %i.fa.fa-trash-o.fa-fw.text-danger + :javascript add_row('#{table_dom_id}', { @@ -93,7 +104,7 @@ "Program Type": '#{h f.formula_fund.present? ? "Formula" : (f.discretionary_fund.present? ? "Discretionary" : "Unknown") }', "Inflation Rate": '#{h f.inflation_rate.present? ? f.inflation_rate : "" }', "Life of $ (yrs)": '#{h format_as_integer(f.life_in_years) }', - "% Match": '#{h f.match_required }', + "% Match": '#{h format_as_percentage(f.match_required) }', "Valid From": '#{h format_as_fiscal_year(f.fy_start) }', "Valid To": '#{h format_as_fiscal_year(f.fy_end) }', "Description": '#{h f.description }', @@ -101,6 +112,13 @@ "External ID": '#{h f.external_id }', "Object Key": '#{h f.object_key }', }, #{index}); + // TEMP UNTIL WE DO THIS FOR REAL + // TODO: PLEASE DON'T LET THIS GO TO PRODUCTION + // HACKY HACK IS HACKY + $(".row-item").eq(#{index}).ready(function (){ + let cell = $("##{table_dom_id} .action-column").eq(#{index}).find(".cell-text"); + $(".actions").eq(#{index}).detach().appendTo(cell); + }); @@ -171,22 +189,22 @@ = render 'shared/table_formatters' --# :javascript +:javascript --# $('#' + '#{table_dom_id}').on('post-body.bs.table', function () { --# $('.transam-popover').popover({ --# trigger: 'hover' --# }); + $('#' + '#{table_dom_id}').on('post-body.bs.table', function () { + $('.transam-popover').popover({ + trigger: 'hover' + }); --# $('.transam-tooltip').tooltip(); --# }); + $('.transam-tooltip').tooltip(); + }); --# $('#' + '#{table_dom_id}').on('click', 'td', function () { --# var path = "#{funding_source_path('xxx')}"; --# var row = $(this).parent('tr').attr('id'); + $('#' + '#{table_dom_id}').on('click', 'td', function () { + var path = "#{funding_source_path('xxx')}"; + var row = $(this).parent('tr').attr('id'); --# if ($(this).attr('data-field') != 'action-cell') { --# var url = path.replace("xxx", row); --# document.location.href = url; --# } --# }); \ No newline at end of file + if ($(this).attr('data-field') != 'action-cell') { + var url = path.replace("xxx", row); + document.location.href = url; + } + }); \ No newline at end of file From 32a6cd1fdd01476cdff7ec2e7e9382308a0ac964 Mon Sep 17 00:00:00 2001 From: NJBL Date: Mon, 1 Jun 2020 03:17:12 -0400 Subject: [PATCH 14/38] LIBRARY UPDATE: columns refernced by index, integrated col types and widths --- .../funding_sources/_index_table.html.haml | 100 +++++----------- app/views/grants/_index_table.html.haml | 107 +++++------------- 2 files changed, 55 insertions(+), 152 deletions(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 335f4ad5..81237208 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -7,44 +7,6 @@ = render :partial => "funding_sources/index_actions" -:css - - .col-item:nth-child(2){ - width:10%; - } - .col-item:nth-child(3){ - width:5%; - } - .col-item:nth-child(4){ - width:8%; - } - .col-item:nth-child(5){ - width:5%; - } - .col-item:nth-child(6){ - width:5%; - } - .col-item:nth-child(7){ - width:5%; - } - .col-item:nth-child(8){ - width:5%; - } - .col-item:nth-child(9){ - width:5%; - } - .col-item:nth-child(10){ - width:8%; - } - .col-item:nth-child(11){ - width:5%; - } - .col-item:nth-child(12){ - width:10%; - } - .col-item:nth-child(13){ - width:12%; - } .library-table @@ -54,31 +16,23 @@ :side => 'client', :current_page => '0', :current_page_size => '10', - :page_sizes => "10,20,50,100,200", + :page_sizes => "10,20,50,100", :search => 'client', :export => "['csv', 'txt', 'excel']", - :columns => "Program Name,drilldown-link, - Source, - Program Type, - Inflation Rate, - Life of $ (yrs), - % Match, - Valid From,right-align, - Valid To,right-align, - Description, - Details, - External ID, - Object Key, - Actions,action-column", - :selected_columns => "Program Name, - Source, - Program Type, - Inflation Rate, - Life of $ (yrs), - % Match, - Valid From, - Valid To, - Actions", + :columns => '{"0":{"name":"Program Name","type":"drilldown-link","width":"10%"}, + "1":{"name":"Source","width":"5%"}, + "2":{"name":"Program Type","width":"8%"}, + "3":{"name":"Inflation Rate","width":"5%"}, + "4":{"name":"Life of $ (yrs)","width":"5%"}, + "5":{"name":"% Match","width":"5%"}, + "6":{"name":"Valid From","type":"right-align","width":"5%"}, + "7":{"name":"Valid To","type":"right-align","width":"5%"}, + "8":{"name":"Description","width":"10%"}, + "9":{"name":"Details","width":"8%"}, + "10":{"name":"External ID","width":"10%"}, + "11":{"name":"Object Key","width":"12%"}, + "12":{"name":"Actions","type":"action-column","width":"10%"}}', + :selected_columns => "0,1,2,3,4,5,6,7,12", :cookies => "true", :sort => 'client', :params => "{}", @@ -99,18 +53,18 @@ :javascript add_row('#{table_dom_id}', { - "Program Name": '#{h link_to f.name, funding_source_path(f) }', - "Source": '#{h f.funding_source_type }', - "Program Type": '#{h f.formula_fund.present? ? "Formula" : (f.discretionary_fund.present? ? "Discretionary" : "Unknown") }', - "Inflation Rate": '#{h f.inflation_rate.present? ? f.inflation_rate : "" }', - "Life of $ (yrs)": '#{h format_as_integer(f.life_in_years) }', - "% Match": '#{h format_as_percentage(f.match_required) }', - "Valid From": '#{h format_as_fiscal_year(f.fy_start) }', - "Valid To": '#{h format_as_fiscal_year(f.fy_end) }', - "Description": '#{h f.description }', - "Details": '#{h f.details }', - "External ID": '#{h f.external_id }', - "Object Key": '#{h f.object_key }', + "0": '#{h link_to f.name, funding_source_path(f) }', + "1": '#{h f.funding_source_type }', + "2": '#{h f.formula_fund.present? ? "Formula" : (f.discretionary_fund.present? ? "Discretionary" : "Unknown") }', + "3": '#{h f.inflation_rate.present? ? f.inflation_rate : "" }', + "4": '#{h format_as_integer(f.life_in_years) }', + "5": '#{h format_as_percentage(f.match_required) }', + "6": '#{h format_as_fiscal_year(f.fy_start) }', + "7": '#{h format_as_fiscal_year(f.fy_end) }', + "8": '#{h f.description }', + "9": '#{h f.details }', + "10": '#{h f.external_id }', + "11": '#{h f.object_key }', }, #{index}); // TEMP UNTIL WE DO THIS FOR REAL // TODO: PLEASE DON'T LET THIS GO TO PRODUCTION diff --git a/app/views/grants/_index_table.html.haml b/app/views/grants/_index_table.html.haml index 68825d63..8c232df9 100644 --- a/app/views/grants/_index_table.html.haml +++ b/app/views/grants/_index_table.html.haml @@ -20,45 +20,6 @@ position:relative; } - .col-item:nth-child(1){ - width:12%; - } - .col-item:nth-child(2){ - width:8%; - } - .col-item:nth-child(3){ - width:5%; - } - .col-item:nth-child(4){ - width:8%; - } - .col-item:nth-child(5){ - width:5%; - } - .col-item:nth-child(6){ - width:5%; - } - .col-item:nth-child(7){ - width:8%; - } - .col-item:nth-child(8){ - width:12%; - } - .col-item:nth-child(9){ - width:8%; - } - .col-item:nth-child(10){ - width:11%; - } - .col-item:nth-child(11){ - width:7%; - } - .col-item:nth-child(12){ - width:10%; - } - .col-item:nth-child(13){ - width:8%; - } #subheader-label %h2 Grants @@ -74,38 +35,26 @@ .library-table %table.elbat{:id => table_dom_id, :use => 'true', - :data => {:use => 'true', - :side => 'client', + :data => {:side => 'client', :current_page => '0', :current_page_size => '10', - :page_sizes => "10,20,50,100,200", + :page_sizes => "10,20,50,100", :search => 'client', :export => "['csv', 'txt', 'excel']", - :columns => "Object Key, - Grant Number,drilldown-link, - Source, - Program, - Grant Year, - Owner, - Contributor, - Legislative Authorization, - Date of Award,right-align, - Date of Most Recent Amendment, - Status, - Last Update By, - Last Update Date,right-align", - :selected_columns => "Grant Number, - Source, - Program, - Grant Year, - Owner, - Contributor, - Legislative Authorization, - Date of Award, - Date of Most Recent Amendment, - Status, - Last Update By, - Last Update Date", + :columns => '{"0":{"name":"Object Key","width":"8%"}, + "1":{"name":"Grant Number","width":"8%","type":"drilldown-link"}, + "2":{"name":"Source","width":"5%"}, + "3":{"name":"Program","width":"8%"}, + "4":{"name":"Grant Year","width":"5%"}, + "5":{"name":"Owner","width":"5%"}, + "6":{"name":"Contributor","width":"8%"}, + "7":{"name":"Legislative Authorization","width":"12%"}, + "8":{"name":"Date of Award","width":"8%","type":"right-align"}, + "9":{"name":"Date of Most Recent Amendment","width":"11%"}, + "10":{"name":"Status","width":"7%"}, + "11":{"name":"Last Update By","width":"10%"}, + "12":{"name":"Last Update Date","width":"8%","type":"right-align"}}', + :selected_columns => "1,2,3,4,5,6,7,8,9,10,11,12", :cookies => "true", :sort => 'client', :params => "{}", @@ -117,18 +66,18 @@ :javascript add_row('#{table_dom_id}', { - "Grant Number": '#{h link_to grant.grant_num, grant_path(grant) }', - "Source": '#{h grant.sourceable.funding_source_type }', - "Program": '#{h grant.funding_source }', - "Grant Year": '#{h grant.fy_year }', - "Owner": '#{h grant.owner }', - "Contributor": '#{h grant.has_multiple_contributors ? 'Multiple' : (grant.contributor.nil? ? 'Other' : grant.contributor) }', - "Legislative Authorization": '#{h grant.legislative_authorization }', - "Date of Award": '#{h format_as_date(grant.award_date) }', - "Date of Most Recent Amendment": '#{h format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)) }', - "Status": '#{h grant.state.titleize}', - "Last Update By": '#{h grant.updater }', - "Last Update Date": '#{h format_as_date_time(grant.updated_at) }', + "1": '#{h link_to grant.grant_num, grant_path(grant) }', + "2": '#{h grant.sourceable.funding_source_type }', + "3": '#{h grant.funding_source }', + "4": '#{h grant.fy_year }', + "5": '#{h grant.owner }', + "6": '#{h grant.has_multiple_contributors ? "Multiple" : (grant.contributor.nil? ? "Other" : grant.contributor) }', + "7": '#{h grant.legislative_authorization }', + "8": '#{h format_as_date(grant.award_date) }', + "9": '#{h format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)) }', + "10": '#{h grant.state.titleize}', + "11": '#{h grant.updater }', + "12": '#{h format_as_date_time(grant.updated_at) }', }, #{index}); From d3b004c6068332ca2e3b52e7bb4a22a56a24ffc4 Mon Sep 17 00:00:00 2001 From: Derek Edwards Date: Tue, 2 Jun 2020 15:07:15 -0400 Subject: [PATCH 15/38] Merge develop into 2.11.0 --- Gemfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 97ea577a..b9670892 100644 --- a/Gemfile +++ b/Gemfile @@ -7,9 +7,9 @@ source "https://rubygems.org" # To use debugger # gem 'debugger' -gem 'transam_core', git: 'https://github.com/camsys/transam_core', branch: :quarter1 -gem 'transam_reporting', git: 'https://github.com/camsys/transam_reporting', branch: :quarter1 -gem 'transam_transit', git: 'https://github.com/camsys/transam_transit', branch: :quarter1 +gem 'transam_core', git: 'https://github.com/camsys/transam_core', branch: :quarter2 +gem 'transam_reporting', git: 'https://github.com/camsys/transam_reporting', branch: :quarter2 +gem 'transam_transit', git: 'https://github.com/camsys/transam_transit', branch: :quarter2 gem 'mysql2', '~> 0.5.1' # lock gem for dummy app gem "capybara", '2.6.2' # lock gem for old capybara behavior on hidden element xpath From 8408aeefe67d89d4ef55d0462e16d5540e5d4514 Mon Sep 17 00:00:00 2001 From: NJBL Date: Tue, 2 Jun 2020 15:59:16 -0400 Subject: [PATCH 16/38] include js tag --- app/views/funding_sources/_index_table.html.haml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 81237208..70b1dc7e 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -9,6 +9,7 @@ += javascript_include_tag "https://kit.fontawesome.com/#{ENV['FONT_AWESOME']}.js" .library-table %table.elbat{:id => table_dom_id, :use => 'true', From bd0a14e1ee2dacb16e4a3857e730e1cd9c3bc13d Mon Sep 17 00:00:00 2001 From: NJBL Date: Tue, 2 Jun 2020 17:41:13 -0400 Subject: [PATCH 17/38] programs column widths fix for checkbox width issue --- .../funding_sources/_index_table.html.haml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 70b1dc7e..bc829088 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -20,19 +20,19 @@ :page_sizes => "10,20,50,100", :search => 'client', :export => "['csv', 'txt', 'excel']", - :columns => '{"0":{"name":"Program Name","type":"drilldown-link","width":"10%"}, - "1":{"name":"Source","width":"5%"}, - "2":{"name":"Program Type","width":"8%"}, - "3":{"name":"Inflation Rate","width":"5%"}, - "4":{"name":"Life of $ (yrs)","width":"5%"}, - "5":{"name":"% Match","width":"5%"}, - "6":{"name":"Valid From","type":"right-align","width":"5%"}, - "7":{"name":"Valid To","type":"right-align","width":"5%"}, + :columns => '{"0":{"name":"Program Name","type":"drilldown-link","width":"25%"}, + "1":{"name":"Source","width":"12%"}, + "2":{"name":"Program Type","width":"15%"}, + "3":{"name":"Inflation Rate","width":"10%"}, + "4":{"name":"Life of $ (yrs)","width":"10%"}, + "5":{"name":"% Match","width":"10%"}, + "6":{"name":"Valid From","type":"right-align","width":"10%"}, + "7":{"name":"Valid To","type":"right-align","width":"10%"}, "8":{"name":"Description","width":"10%"}, "9":{"name":"Details","width":"8%"}, "10":{"name":"External ID","width":"10%"}, "11":{"name":"Object Key","width":"12%"}, - "12":{"name":"Actions","type":"action-column","width":"10%"}}', + "12":{"name":"Actions","type":"action-column","width":"15%"}}', :selected_columns => "0,1,2,3,4,5,6,7,12", :cookies => "true", :sort => 'client', From 2a35e02e480f7bfdb2263c1dcb08f834b2500695 Mon Sep 17 00:00:00 2001 From: NJBL Date: Wed, 3 Jun 2020 03:01:13 -0400 Subject: [PATCH 18/38] format as percent 3 decimals --- app/views/funding_sources/_index_table.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index bc829088..245b1753 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -59,7 +59,7 @@ "2": '#{h f.formula_fund.present? ? "Formula" : (f.discretionary_fund.present? ? "Discretionary" : "Unknown") }', "3": '#{h f.inflation_rate.present? ? f.inflation_rate : "" }', "4": '#{h format_as_integer(f.life_in_years) }', - "5": '#{h format_as_percentage(f.match_required) }', + "5": '#{h format_as_percentage(f.match_required, 3) }', "6": '#{h format_as_fiscal_year(f.fy_start) }', "7": '#{h format_as_fiscal_year(f.fy_end) }', "8": '#{h f.description }', From 4ec54ca0dd8270a60ba30a0acdcb7e7ac1936e7c Mon Sep 17 00:00:00 2001 From: NJBL Date: Wed, 3 Jun 2020 14:01:02 -0400 Subject: [PATCH 19/38] temp storing work --- app/views/grants/_index_table.html.haml | 44 ++++++++++++++++++------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/app/views/grants/_index_table.html.haml b/app/views/grants/_index_table.html.haml index 8c232df9..bb8faf3d 100644 --- a/app/views/grants/_index_table.html.haml +++ b/app/views/grants/_index_table.html.haml @@ -61,23 +61,43 @@ :filter => "[]", :data_source => 'client', :url => ''}} + + :ruby + sort = {0=> grants.sort_by { |grant| grant.id }, + 1=> grants.sort_by { |grant| grant.grant_num }.to_h { |grant| [ grant.id, the index here] }, + 2=> grants.sort_by { |grant| grant.sourceable.funding_source_type }, + 3=> grants.sort_by { |grant| }, + 4=> grants.sort_by { |grant| }, + 5=> grants.sort_by { |grant| }, + 6=> grants.sort_by { |grant| }, + 7=> grants.sort_by { |grant| }, + 8=> grants.sort_by { |grant| }, + 9=> grants.sort_by { |grant| }, + 10=> grants.sort_by { |grant| }, + 11=> grants.sort_by { |grant| }, + 12=> grants.sort_by { |grant| }} + + + + - grants.each_with_index do |grant, index| :javascript add_row('#{table_dom_id}', { - "1": '#{h link_to grant.grant_num, grant_path(grant) }', - "2": '#{h grant.sourceable.funding_source_type }', - "3": '#{h grant.funding_source }', - "4": '#{h grant.fy_year }', - "5": '#{h grant.owner }', - "6": '#{h grant.has_multiple_contributors ? "Multiple" : (grant.contributor.nil? ? "Other" : grant.contributor) }', - "7": '#{h grant.legislative_authorization }', - "8": '#{h format_as_date(grant.award_date) }', - "9": '#{h format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)) }', - "10": '#{h grant.state.titleize}', - "11": '#{h grant.updater }', - "12": '#{h format_as_date_time(grant.updated_at) }', + "0": {"content":'#{h grant.id }',"raw": "#{grant.id}" }, + "1": {"content":'#{h link_to grant.grant_num, grant_path(grant) }',"raw": #{grant.grant_num} }, + "2": {"content":'#{h grant.sourceable.funding_source_type }',"raw": "#{grant.sourceable.funding_source_type}" }, + "3": {"content":'#{h grant.funding_source }',"raw": #{grant.funding_source} }, + "4": {"content":'#{h grant.fy_year }',"raw":#{grant.fy_year} }, + "5": {"content":'#{h grant.owner }',"raw":"#{grant.owner}" }, + "6": {"content":'#{h grant.has_multiple_contributors ? "Multiple" : (grant.contributor.nil? ? "Other" : grant.contributor) }',"raw":"#{grant.has_multiple_contributors ? "Multiple" : (grant.contributor.nil? ? "Other" : grant.contributor)}" }, + "7": {"content":'#{h grant.legislative_authorization }',"raw":"#{grant.legislative_authorization}" }, + "8": {"content":'#{h format_as_date(grant.award_date) }',"raw":#{grant.award_date} }, + "9": {"content":'#{h format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)) }',"raw":"#{grant.grant_amendments.last.try(:created_at).try(:to_date)}" }, + "10": {"content":'#{h grant.state.titleize}',"raw":"#{grant.state.titleize}" }, + "11": {"content":'#{h grant.updater }',"raw":"#{grant.updater}" }, + "12": {"content":'#{h format_as_date_time(grant.updated_at) }',"raw":"#{grant.updated_at}" } }, #{index}); From 93f1bb2c10f1784b89b8fff39034f5abead0f765 Mon Sep 17 00:00:00 2001 From: NJBL Date: Thu, 4 Jun 2020 11:27:36 -0400 Subject: [PATCH 20/38] programs styling --- app/views/funding_sources/_index_table.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 245b1753..3965a07c 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -26,8 +26,8 @@ "3":{"name":"Inflation Rate","width":"10%"}, "4":{"name":"Life of $ (yrs)","width":"10%"}, "5":{"name":"% Match","width":"10%"}, - "6":{"name":"Valid From","type":"right-align","width":"10%"}, - "7":{"name":"Valid To","type":"right-align","width":"10%"}, + "6":{"name":"Valid From","width":"10%"}, + "7":{"name":"Valid To","width":"10%"}, "8":{"name":"Description","width":"10%"}, "9":{"name":"Details","width":"8%"}, "10":{"name":"External ID","width":"10%"}, @@ -57,7 +57,7 @@ "0": '#{h link_to f.name, funding_source_path(f) }', "1": '#{h f.funding_source_type }', "2": '#{h f.formula_fund.present? ? "Formula" : (f.discretionary_fund.present? ? "Discretionary" : "Unknown") }', - "3": '#{h f.inflation_rate.present? ? f.inflation_rate : "" }', + "3": '#{h f.inflation_rate.present? ? format_as_percentage(f.inflation_rate, 3) : "" }', "4": '#{h format_as_integer(f.life_in_years) }', "5": '#{h format_as_percentage(f.match_required, 3) }', "6": '#{h format_as_fiscal_year(f.fy_start) }', From 3010a21b97dc3327ddb291b00f66e3b5685cc756 Mon Sep 17 00:00:00 2001 From: NJBL Date: Thu, 4 Jun 2020 11:29:02 -0400 Subject: [PATCH 21/38] programs styling --- app/views/funding_sources/_index_table.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 245b1753..3965a07c 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -26,8 +26,8 @@ "3":{"name":"Inflation Rate","width":"10%"}, "4":{"name":"Life of $ (yrs)","width":"10%"}, "5":{"name":"% Match","width":"10%"}, - "6":{"name":"Valid From","type":"right-align","width":"10%"}, - "7":{"name":"Valid To","type":"right-align","width":"10%"}, + "6":{"name":"Valid From","width":"10%"}, + "7":{"name":"Valid To","width":"10%"}, "8":{"name":"Description","width":"10%"}, "9":{"name":"Details","width":"8%"}, "10":{"name":"External ID","width":"10%"}, @@ -57,7 +57,7 @@ "0": '#{h link_to f.name, funding_source_path(f) }', "1": '#{h f.funding_source_type }', "2": '#{h f.formula_fund.present? ? "Formula" : (f.discretionary_fund.present? ? "Discretionary" : "Unknown") }', - "3": '#{h f.inflation_rate.present? ? f.inflation_rate : "" }', + "3": '#{h f.inflation_rate.present? ? format_as_percentage(f.inflation_rate, 3) : "" }', "4": '#{h format_as_integer(f.life_in_years) }', "5": '#{h format_as_percentage(f.match_required, 3) }', "6": '#{h format_as_fiscal_year(f.fy_start) }', From 5ef07334eec05228d21b68b4fc9ce78f0529161a Mon Sep 17 00:00:00 2001 From: NJBL Date: Fri, 5 Jun 2020 03:24:16 -0400 Subject: [PATCH 22/38] grants first pass assigning sorting values --- app/views/grants/_index_table.html.haml | 56 +++++++++++++------------ 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/app/views/grants/_index_table.html.haml b/app/views/grants/_index_table.html.haml index bb8faf3d..f7d83003 100644 --- a/app/views/grants/_index_table.html.haml +++ b/app/views/grants/_index_table.html.haml @@ -63,41 +63,45 @@ :url => ''}} :ruby - sort = {0=> grants.sort_by { |grant| grant.id }, - 1=> grants.sort_by { |grant| grant.grant_num }.to_h { |grant| [ grant.id, the index here] }, - 2=> grants.sort_by { |grant| grant.sourceable.funding_source_type }, - 3=> grants.sort_by { |grant| }, - 4=> grants.sort_by { |grant| }, - 5=> grants.sort_by { |grant| }, - 6=> grants.sort_by { |grant| }, - 7=> grants.sort_by { |grant| }, - 8=> grants.sort_by { |grant| }, - 9=> grants.sort_by { |grant| }, - 10=> grants.sort_by { |grant| }, - 11=> grants.sort_by { |grant| }, - 12=> grants.sort_by { |grant| }} + def pre_sort(vals) + vals.map.with_index { |grant,index| { grant.id => index } } + end + sort = {"0"=> grants.sort_by { |grant| grant.id }.map.with_index { |grant,index| { grant.id => index } } , + "1"=> grants.sort_by { |grant| grant.grant_num }.map.with_index { |grant,index| { grant.id => index } } , + "2"=> grants.sort_by { |grant| grant.sourceable.funding_source_type }.map.with_index { |grant,index| { grant.id => index } }, + "3"=> grants.sort_by { |grant| grant.funding_source }.map.with_index { |grant,index| { grant.id => index } }, + "4"=> grants.sort_by { |grant| grant.fy_year }.map.with_index { |grant,index| { grant.id => index } }, + "5"=> grants.sort_by { |grant| grant.owner }.map.with_index { |grant,index| { grant.id => index } }, + "6"=> grants.sort_by { |grant| grant.has_multiple_contributors ? "Multiple" : (grant.contributor.nil? ? "Other" : grant.contributor) }.map.with_index { |grant,index| { grant.id => index } }, + "7"=> grants.sort_by { |grant| grant.legislative_authorization }.map.with_index { |grant,index| { grant.id => index } }, + "8"=> grants.sort_by { |grant| grant.award_date }.map.with_index { |grant,index| { grant.id => index } }, + "9"=> grants.sort_by { |grant| grant.grant_amendments.last.try(:created_at).try(:to_date) }.map.with_index { |grant,index| { grant.id => index } }, + "10"=> grants.sort_by { |grant| grant.state.titleize }.map.with_index { |grant,index| { grant.id => index } }, + "11"=> grants.sort_by { |grant| grant.updater }.map.with_index { |grant,index| { grant.id => index } }, + "12"=> grants.sort_by { |grant| grant.updated_at }.map.with_index { |grant,index| { grant.id => index } }} - grants.each_with_index do |grant, index| :javascript + console.log("#{sort}"); add_row('#{table_dom_id}', { - "0": {"content":'#{h grant.id }',"raw": "#{grant.id}" }, - "1": {"content":'#{h link_to grant.grant_num, grant_path(grant) }',"raw": #{grant.grant_num} }, - "2": {"content":'#{h grant.sourceable.funding_source_type }',"raw": "#{grant.sourceable.funding_source_type}" }, - "3": {"content":'#{h grant.funding_source }',"raw": #{grant.funding_source} }, - "4": {"content":'#{h grant.fy_year }',"raw":#{grant.fy_year} }, - "5": {"content":'#{h grant.owner }',"raw":"#{grant.owner}" }, - "6": {"content":'#{h grant.has_multiple_contributors ? "Multiple" : (grant.contributor.nil? ? "Other" : grant.contributor) }',"raw":"#{grant.has_multiple_contributors ? "Multiple" : (grant.contributor.nil? ? "Other" : grant.contributor)}" }, - "7": {"content":'#{h grant.legislative_authorization }',"raw":"#{grant.legislative_authorization}" }, - "8": {"content":'#{h format_as_date(grant.award_date) }',"raw":#{grant.award_date} }, - "9": {"content":'#{h format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)) }',"raw":"#{grant.grant_amendments.last.try(:created_at).try(:to_date)}" }, - "10": {"content":'#{h grant.state.titleize}',"raw":"#{grant.state.titleize}" }, - "11": {"content":'#{h grant.updater }',"raw":"#{grant.updater}" }, - "12": {"content":'#{h format_as_date_time(grant.updated_at) }',"raw":"#{grant.updated_at}" } + "0": {"content":'#{h grant.id }',"sort":'#{sort["0"][index][grant.id]}'}, + "1": {"content":'#{h link_to grant.grant_num, grant_path(grant) }',"sort":'#{sort["1"][index][grant.id]}'}, + "2": {"content":'#{h grant.sourceable.funding_source_type }',"sort":'#{sort["2"][index][grant.id]}'}, + "3": {"content":'#{h grant.funding_source }',"sort":'#{sort["3"][index][grant.id]}'}, + "4": {"content":'#{h grant.fy_year }',"sort":'#{sort["4"][index][grant.id]}'}, + "5": {"content":'#{h grant.owner }',"sort":'#{sort["5"][index][grant.id]}'}, + "6": {"content":'#{h grant.has_multiple_contributors ? "Multiple" : (grant.contributor.nil? ? "Other" : grant.contributor) }',"sort":'#{sort["6"][index][grant.id]}'}, + "7": {"content":'#{h grant.legislative_authorization }',"sort":'#{sort["7"][index][grant.id]}'}, + "8": {"content":'#{h format_as_date(grant.award_date) }',"sort":'#{sort["8"][index][grant.id]}'}, + "9": {"content":'#{h format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)) }',"sort":'#{sort["9"][index][grant.id]}'}, + "10": {"content":'#{h grant.state.titleize}',"sort":'#{sort["10"][index][grant.id]}'}, + "11": {"content":'#{h grant.updater }',"sort":'#{sort["11"][index][grant.id]}'}, + "12": {"content":'#{h format_as_date_time(grant.updated_at) }',"sort":'#{sort["12"][index][grant.id]}'} }, #{index}); From e71eaf6f9943a7e56301006e9945e05bfe162eaa Mon Sep 17 00:00:00 2001 From: Derek Edwards Date: Mon, 8 Jun 2020 11:55:45 -0400 Subject: [PATCH 23/38] Update Gemfile --- Gemfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 97ea577a..b9670892 100644 --- a/Gemfile +++ b/Gemfile @@ -7,9 +7,9 @@ source "https://rubygems.org" # To use debugger # gem 'debugger' -gem 'transam_core', git: 'https://github.com/camsys/transam_core', branch: :quarter1 -gem 'transam_reporting', git: 'https://github.com/camsys/transam_reporting', branch: :quarter1 -gem 'transam_transit', git: 'https://github.com/camsys/transam_transit', branch: :quarter1 +gem 'transam_core', git: 'https://github.com/camsys/transam_core', branch: :quarter2 +gem 'transam_reporting', git: 'https://github.com/camsys/transam_reporting', branch: :quarter2 +gem 'transam_transit', git: 'https://github.com/camsys/transam_transit', branch: :quarter2 gem 'mysql2', '~> 0.5.1' # lock gem for dummy app gem "capybara", '2.6.2' # lock gem for old capybara behavior on hidden element xpath From 8d8391a57fd500d5ec7109b42b7038101b886b3c Mon Sep 17 00:00:00 2001 From: NJBL Date: Mon, 8 Jun 2020 17:33:10 -0400 Subject: [PATCH 24/38] update grants table with new sorting table design, removing logic from the view --- app/views/grants/_index_table.html.haml | 98 ++++++++++++++++--------- 1 file changed, 64 insertions(+), 34 deletions(-) diff --git a/app/views/grants/_index_table.html.haml b/app/views/grants/_index_table.html.haml index f7d83003..d8cf311c 100644 --- a/app/views/grants/_index_table.html.haml +++ b/app/views/grants/_index_table.html.haml @@ -36,6 +36,7 @@ %table.elbat{:id => table_dom_id, :use => 'true', :data => {:side => 'client', + :table_code => 'grants', :current_page => '0', :current_page_size => '10', :page_sizes => "10,20,50,100", @@ -45,8 +46,8 @@ "1":{"name":"Grant Number","width":"8%","type":"drilldown-link"}, "2":{"name":"Source","width":"5%"}, "3":{"name":"Program","width":"8%"}, - "4":{"name":"Grant Year","width":"5%"}, - "5":{"name":"Owner","width":"5%"}, + "year":{"name":"Grant Year","width":"5%"}, + "owner":{"name":"Owner","width":"5%"}, "6":{"name":"Contributor","width":"8%"}, "7":{"name":"Legislative Authorization","width":"12%"}, "8":{"name":"Date of Award","width":"8%","type":"right-align"}, @@ -54,7 +55,7 @@ "10":{"name":"Status","width":"7%"}, "11":{"name":"Last Update By","width":"10%"}, "12":{"name":"Last Update Date","width":"8%","type":"right-align"}}', - :selected_columns => "1,2,3,4,5,6,7,8,9,10,11,12", + :selected_columns => "1,2,3,year,owner,6,7,8,9,10,11,12", :cookies => "true", :sort => 'client', :params => "{}", @@ -62,49 +63,50 @@ :data_source => 'client', :url => ''}} - :ruby + -# :ruby - def pre_sort(vals) - vals.map.with_index { |grant,index| { grant.id => index } } - end - sort = {"0"=> grants.sort_by { |grant| grant.id }.map.with_index { |grant,index| { grant.id => index } } , - "1"=> grants.sort_by { |grant| grant.grant_num }.map.with_index { |grant,index| { grant.id => index } } , - "2"=> grants.sort_by { |grant| grant.sourceable.funding_source_type }.map.with_index { |grant,index| { grant.id => index } }, - "3"=> grants.sort_by { |grant| grant.funding_source }.map.with_index { |grant,index| { grant.id => index } }, - "4"=> grants.sort_by { |grant| grant.fy_year }.map.with_index { |grant,index| { grant.id => index } }, - "5"=> grants.sort_by { |grant| grant.owner }.map.with_index { |grant,index| { grant.id => index } }, - "6"=> grants.sort_by { |grant| grant.has_multiple_contributors ? "Multiple" : (grant.contributor.nil? ? "Other" : grant.contributor) }.map.with_index { |grant,index| { grant.id => index } }, - "7"=> grants.sort_by { |grant| grant.legislative_authorization }.map.with_index { |grant,index| { grant.id => index } }, - "8"=> grants.sort_by { |grant| grant.award_date }.map.with_index { |grant,index| { grant.id => index } }, - "9"=> grants.sort_by { |grant| grant.grant_amendments.last.try(:created_at).try(:to_date) }.map.with_index { |grant,index| { grant.id => index } }, - "10"=> grants.sort_by { |grant| grant.state.titleize }.map.with_index { |grant,index| { grant.id => index } }, - "11"=> grants.sort_by { |grant| grant.updater }.map.with_index { |grant,index| { grant.id => index } }, - "12"=> grants.sort_by { |grant| grant.updated_at }.map.with_index { |grant,index| { grant.id => index } }} + -# def pre_sort(vals) + -# vals.map.with_index { |grant,index| { grant.id => index } } + -# end + -# sort = {"0"=> grants.sort_by { |grant| grant.id }.map.with_index { |grant,index| { grant.id => index } } , + -# "1"=> grants.sort_by { |grant| grant.grant_num }.map.with_index { |grant,index| { grant.id => index } } , + -# "2"=> grants.sort_by { |grant| grant.sourceable.funding_source_type }.map.with_index { |grant,index| { grant.id => index } }, + -# "3"=> grants.sort_by { |grant| grant.funding_source }.map.with_index { |grant,index| { grant.id => index } }, + -# "year"=> grants.sort_by { |grant| grant.fy_year }.map.with_index { |grant,index| { grant.id => index } }, + -# "owner"=> grants.sort_by { |grant| grant.owner }.map.with_index { |grant,index| { grant.id => index } }, + -# "6"=> grants.sort_by { |grant| grant.has_multiple_contributors ? "Multiple" : (grant.contributor.nil? ? "Other" : grant.contributor) }.map.with_index { |grant,index| { grant.id => index } }, + -# "7"=> grants.sort_by { |grant| grant.legislative_authorization }.map.with_index { |grant,index| { grant.id => index } }, + -# "8"=> grants.sort_by { |grant| grant.award_date }.map.with_index { |grant,index| { grant.id => index } }, + -# "9"=> grants.sort_by { |grant| grant.grant_amendments.last.try(:created_at).try(:to_date) }.map.with_index { |grant,index| { grant.id => index } }, + -# "10"=> grants.sort_by { |grant| grant.state.titleize }.map.with_index { |grant,index| { grant.id => index } }, + -# "11"=> grants.sort_by { |grant| grant.updater }.map.with_index { |grant,index| { grant.id => index } }, + -# "12"=> grants.sort_by { |grant| grant.updated_at }.map.with_index { |grant,index| { grant.id => index } }} - grants.each_with_index do |grant, index| :javascript - console.log("#{sort}"); add_row('#{table_dom_id}', { - "0": {"content":'#{h grant.id }',"sort":'#{sort["0"][index][grant.id]}'}, - "1": {"content":'#{h link_to grant.grant_num, grant_path(grant) }',"sort":'#{sort["1"][index][grant.id]}'}, - "2": {"content":'#{h grant.sourceable.funding_source_type }',"sort":'#{sort["2"][index][grant.id]}'}, - "3": {"content":'#{h grant.funding_source }',"sort":'#{sort["3"][index][grant.id]}'}, - "4": {"content":'#{h grant.fy_year }',"sort":'#{sort["4"][index][grant.id]}'}, - "5": {"content":'#{h grant.owner }',"sort":'#{sort["5"][index][grant.id]}'}, - "6": {"content":'#{h grant.has_multiple_contributors ? "Multiple" : (grant.contributor.nil? ? "Other" : grant.contributor) }',"sort":'#{sort["6"][index][grant.id]}'}, - "7": {"content":'#{h grant.legislative_authorization }',"sort":'#{sort["7"][index][grant.id]}'}, - "8": {"content":'#{h format_as_date(grant.award_date) }',"sort":'#{sort["8"][index][grant.id]}'}, - "9": {"content":'#{h format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)) }',"sort":'#{sort["9"][index][grant.id]}'}, - "10": {"content":'#{h grant.state.titleize}',"sort":'#{sort["10"][index][grant.id]}'}, - "11": {"content":'#{h grant.updater }',"sort":'#{sort["11"][index][grant.id]}'}, - "12": {"content":'#{h format_as_date_time(grant.updated_at) }',"sort":'#{sort["12"][index][grant.id]}'} + "0":'#{h grant.id }', + "1":'#{h link_to grant.grant_num, grant_path(grant) }', + "2":'#{h grant.sourceable.funding_source_type }', + "3":'#{h grant.funding_source }', + "year":'#{h grant.fy_year }', + "owner":'#{h grant.owner }', + "6":'#{h grant.has_multiple_contributors ? "Multiple" : (grant.contributor.nil? ? "Other" : grant.contributor) }', + "7":'#{h grant.legislative_authorization }', + "8":'#{h format_as_date(grant.award_date) }', + "9":'#{h format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)) }', + "10":'#{h grant.state.titleize}', + "11":'#{h grant.updater }', + "12":'#{h format_as_date_time(grant.updated_at) }' }, #{index}); + + -##grants_table_actions.row -# - if show_actions == 1 -# = render :partial => "grants/index_actions", :sourceable => @sourceable @@ -156,4 +158,32 @@ -# %td.left= grant.updater -# %td.left= format_as_date_time(grant.updated_at) + +-# '{"0":{"asc":"true"}, +-# "1":{"asc":"true"}, +-# "2":{"asc":"true"}, +-# "3":{"asc":"true"}, +-# "4":{"asc":"true"}, +-# "5":{"asc":"true"}, +-# "6":{"asc":"true"}, +-# "7":{"asc":"true"}, +-# "8":{"asc":"true"}, +-# "9":{"asc":"true"}, +-# "10":{"asc":"true"}, +-# "11":{"asc":"true"}, +-# "12":{"asc":"true"}}' + -# //"0": {"content":'#{h grant.id }',"sort":'#{sort["0"][index][grant.id]}'}, + -# // "1": {"content":'#{h link_to grant.grant_num, grant_path(grant) }',"sort":'#{sort["1"][index][grant.id]}'}, + -# // "2": {"content":'#{h grant.sourceable.funding_source_type }',"sort":'#{sort["2"][index][grant.id]}'}, + -# // "3": {"content":'#{h grant.funding_source }',"sort":'#{sort["3"][index][grant.id]}'}, + -# // "4": {"content":'#{h grant.fy_year }',"sort":'#{sort["4"][index][grant.id]}'}, + -# // "5": {"content":'#{h grant.owner }',"sort":'#{sort["5"][index][grant.id]}'}, + -# // "6": {"content":'#{h grant.has_multiple_contributors ? "Multiple" : (grant.contributor.nil? ? "Other" : grant.contributor) }',"sort":'#{sort["6"][index][grant.id]}'}, + -# // "7": {"content":'#{h grant.legislative_authorization }',"sort":'#{sort["7"][index][grant.id]}'}, + -# // "8": {"content":'#{h format_as_date(grant.award_date) }',"sort":'#{sort["8"][index][grant.id]}'}, + -# // "9": {"content":'#{h format_as_date(grant.grant_amendments.last.try(:created_at).try(:to_date)) }',"sort":'#{sort["9"][index][grant.id]}'}, + -# // "10": {"content":'#{h grant.state.titleize}',"sort":'#{sort["10"][index][grant.id]}'}, + -# // "11": {"content":'#{h grant.updater }',"sort":'#{sort["11"][index][grant.id]}'}, + -# // "12": {"content":'#{h format_as_date_time(grant.updated_at) }',"sort":'#{sort["12"][index][grant.id]}'} + = render :partial => 'shared/table_scripts', :locals => {:table_id => table_dom_id, :path_pattern => grant_path("xxx")} \ No newline at end of file From 510bcc3d64c9265d16b744a7e6f678b8f29b55e1 Mon Sep 17 00:00:00 2001 From: NJBL Date: Tue, 9 Jun 2020 17:37:23 -0400 Subject: [PATCH 25/38] programs added table code --- app/views/funding_sources/_index_table.html.haml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 3965a07c..9e0793b7 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -14,6 +14,7 @@ %table.elbat{:id => table_dom_id, :use => 'true', :data => {:use => 'true', + :table_code => 'programs', :side => 'client', :current_page => '0', :current_page_size => '10', @@ -70,10 +71,7 @@ // TEMP UNTIL WE DO THIS FOR REAL // TODO: PLEASE DON'T LET THIS GO TO PRODUCTION // HACKY HACK IS HACKY - $(".row-item").eq(#{index}).ready(function (){ - let cell = $("##{table_dom_id} .action-column").eq(#{index}).find(".cell-text"); - $(".actions").eq(#{index}).detach().appendTo(cell); - }); + add_aux_queue('#{table_dom_id}',()=>$(".actions").eq(#{index}).detach().appendTo($("##{table_dom_id} .action-column").eq(#{index}).find(".cell-text"))); @@ -109,7 +107,8 @@ -# %th.center{:data => {:sortable => 'true', :formatter => 'percentage_formatter'}} Pcnt Match -# %th.center{:data => {:sortable => 'true'}} Valid From --# %th.center{:data => {:sortable => 'true'}} Valid To +-# %th.center{:data => {:sortable => "content": + -# %th From 64099c3939dea3ea130221e8ed776d55bede41a5 Mon Sep 17 00:00:00 2001 From: Derek Edwards Date: Mon, 15 Jun 2020 16:52:28 -0400 Subject: [PATCH 26/38] build travis on develop and 2.x.x --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 87737e93..8e0c66c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,8 @@ branches: only: - master - /quarter\d*/ + - develop + - /2.\d*.\d*/ env: - TEST_SUITE=rspec RAILS_VERSION=4.1.9 script: From 5c24e416be7fa3bca5522c208186cf24c03decaa Mon Sep 17 00:00:00 2001 From: NJBL Date: Mon, 22 Jun 2020 10:14:21 -0400 Subject: [PATCH 27/38] programs column codes --- app/views/funding_sources/_index_table.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 9e0793b7..8518b6f9 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -21,7 +21,7 @@ :page_sizes => "10,20,50,100", :search => 'client', :export => "['csv', 'txt', 'excel']", - :columns => '{"0":{"name":"Program Name","type":"drilldown-link","width":"25%"}, + :columns => '{"name":{"name":"Program Name","type":"drilldown-link","width":"25%"}, "1":{"name":"Source","width":"12%"}, "2":{"name":"Program Type","width":"15%"}, "3":{"name":"Inflation Rate","width":"10%"}, @@ -34,7 +34,7 @@ "10":{"name":"External ID","width":"10%"}, "11":{"name":"Object Key","width":"12%"}, "12":{"name":"Actions","type":"action-column","width":"15%"}}', - :selected_columns => "0,1,2,3,4,5,6,7,12", + :selected_columns => "name,1,2,3,4,5,6,7,12", :cookies => "true", :sort => 'client', :params => "{}", @@ -55,7 +55,7 @@ :javascript add_row('#{table_dom_id}', { - "0": '#{h link_to f.name, funding_source_path(f) }', + "name": '#{h link_to f.name, funding_source_path(f) }', "1": '#{h f.funding_source_type }', "2": '#{h f.formula_fund.present? ? "Formula" : (f.discretionary_fund.present? ? "Discretionary" : "Unknown") }', "3": '#{h f.inflation_rate.present? ? format_as_percentage(f.inflation_rate, 3) : "" }', From 57f24839670b3dd609de0f5e77fde068e42d793d Mon Sep 17 00:00:00 2001 From: NJBL Date: Thu, 23 Jul 2020 17:35:40 -0400 Subject: [PATCH 28/38] navigation update --- app/views/shared/_financial_nav.html.haml | 42 +++++++++++------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/app/views/shared/_financial_nav.html.haml b/app/views/shared/_financial_nav.html.haml index db6bdf79..da994a27 100644 --- a/app/views/shared/_financial_nav.html.haml +++ b/app/views/shared/_financial_nav.html.haml @@ -48,31 +48,31 @@ - if count > 0 %li.divider - %li.text-left.dropdown-submenu + %li.text-left = link_to funding_sources_path do %i.fa.fa-book.fa-fw Programs - %ul.dropdown-menu - - FundingSourceType.all.each do |type| - - if FundingSource.where(funding_source_type_id: type.id).count > 0 - %li.text-left.dropdown-submenu - = link_to '#' do - %i.fa.fa-fw.fa-book - = type - %ul.dropdown-menu - - FundingSource.where(funding_source_type_id: type.id).each do | program | - %li.text-left - = link_to funding_source_path(program) do - %i.fa.fa-fw.fa-book - = program - - if can? :create, FundingSource - - if FundingSource.all.count > 0 - %li.divider - %li - = link_to new_funding_source_path do - %i.fa.fa-plus.fa-fw - = "Add Funding Program"; + -# %ul.dropdown-menu + -# - FundingSourceType.all.each do |type| + -# - if FundingSource.where(funding_source_type_id: type.id).count > 0 + -# %li.text-left.dropdown-submenu + -# = link_to '#' do + -# %i.fa.fa-fw.fa-book + -# = type + -# %ul.dropdown-menu + -# - FundingSource.where(funding_source_type_id: type.id).each do | program | + -# %li.text-left + -# = link_to funding_source_path(program) do + -# %i.fa.fa-fw.fa-book + -# = program + -# - if can? :create, FundingSource + -# - if FundingSource.all.count > 0 + -# %li.divider + -# %li + -# = link_to new_funding_source_path do + -# %i.fa.fa-plus.fa-fw + -# = "Add Funding Program"; - SystemConfig.transam_module_names.each do |mod| - view_component = "#{mod}_financial_nav" From 8acd32423ad592c4588eba5ce46cceaefba01f82 Mon Sep 17 00:00:00 2001 From: NJBL Date: Fri, 14 Aug 2020 00:16:53 -0400 Subject: [PATCH 29/38] programs header --- app/views/funding_sources/_index_table.html.haml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 8518b6f9..68c1e561 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -2,6 +2,9 @@ table_dom_id = SecureRandom.hex show_actions ||= 0 +#subheader-label + %h2 Programs + - if show_actions == 1 #programs_table_actions.btn-toolbar = render :partial => "funding_sources/index_actions" From 6057b5cae6f6ef5ea949da0aaff21f7ff2fcc42c Mon Sep 17 00:00:00 2001 From: mathmerized Date: Mon, 17 Aug 2020 10:16:35 -0400 Subject: [PATCH 30/38] TTPLAT-1596 add validations to xeditable --- app/controllers/grants_controller.rb | 8 +++++++- app/views/grants/show.html.haml | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/controllers/grants_controller.rb b/app/controllers/grants_controller.rb index 50b76a93..17cc8f82 100644 --- a/app/controllers/grants_controller.rb +++ b/app/controllers/grants_controller.rb @@ -136,7 +136,13 @@ def update format.json { head :no_content } else format.html { render action: 'edit' } - format.json { render json: @grant.errors, status: :unprocessable_entity } + + if params[:is_xeditable] + format.json { render json: {errors: @grant.errors}, status: :ok } + else + format.json { render json: @grant.errors, status: :unprocessable_entity } + end + end end end diff --git a/app/views/grants/show.html.haml b/app/views/grants/show.html.haml index 59d8eca4..1a26b455 100755 --- a/app/views/grants/show.html.haml +++ b/app/views/grants/show.html.haml @@ -42,6 +42,7 @@ .tab-pane.fade#details %legend Details .tab-content + #xeditable-errors = render 'details' .tab-pane.fade#apportionments %legend Apportionments From 1e9bbe7215ccbee9985f43ca0cbdfe39dd520c62 Mon Sep 17 00:00:00 2001 From: NJBL Date: Tue, 25 Aug 2020 13:46:30 -0400 Subject: [PATCH 31/38] grant remove subheader --- app/views/grants/_index_table.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/grants/_index_table.html.haml b/app/views/grants/_index_table.html.haml index d8cf311c..8b14a5a5 100644 --- a/app/views/grants/_index_table.html.haml +++ b/app/views/grants/_index_table.html.haml @@ -23,8 +23,8 @@ #subheader-label %h2 Grants - %legend.asset-subheader - %span #{params[:state] == "all" ? "All" : "Filtered"} + -# %legend.asset-subheader + -# %span #{params[:state] == "all" ? "All" : "Filtered"} #grants_table_actions.row From f802f0147357deb6153ca89de4ad92ce24c6ba92 Mon Sep 17 00:00:00 2001 From: NJBL Date: Thu, 3 Sep 2020 18:59:14 -0400 Subject: [PATCH 32/38] programs table new columns and additional info in the popup --- app/views/funding_sources/_index_table.html.haml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 68c1e561..0dff1f01 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -36,8 +36,10 @@ "9":{"name":"Details","width":"8%"}, "10":{"name":"External ID","width":"10%"}, "11":{"name":"Object Key","width":"12%"}, + "created_by":{"name":"Created By","width":"12%"}, + "status":{"name":"Status", "width":"10%"}, "12":{"name":"Actions","type":"action-column","width":"15%"}}', - :selected_columns => "name,1,2,3,4,5,6,7,12", + :selected_columns => "name,1,2,3,4,5,6,7,created_by,status,12", :cookies => "true", :sort => 'client', :params => "{}", @@ -46,7 +48,7 @@ :url => ''}} - funding_sources.each_with_index do |f, index| %div.actions - %a.transam-popover{data: {placement: 'left', toggle: 'popover', html: 'true', content: "#{f.description}
#{f.details}"}, title: 'Details', tabindex: '0'} + %a.transam-popover{data: {placement: 'left', toggle: 'popover', html: 'true', content: "Description:#{f.description}
Details:#{f.details}
Type:#{f.formula_fund.present? ? "Formula" : (f.discretionary_fund.present? ? "Discretionary" : "Unknown")}
Source:#{f.funding_source_type}
Life of $:#{format_as_integer(f.life_in_years)}
Pcnt Match:#{format_as_percentage(f.match_required, 3)}
Start:#{format_as_fiscal_year(f.fy_start)}
End:#{format_as_fiscal_year(f.fy_end)}"}, title: "#{f.name}", tabindex: '0'} %i.fa.fa-info-circle - if can? :update, f = link_to edit_funding_source_path(f), :class => "button btn-xs", :title => "Edit program" do @@ -70,6 +72,8 @@ "9": '#{h f.details }', "10": '#{h f.external_id }', "11": '#{h f.object_key }', + "status":'#{h f.active ? "Active" : "Inactive" }', + "created_by":'#{h current_user.organization.short_name }', }, #{index}); // TEMP UNTIL WE DO THIS FOR REAL // TODO: PLEASE DON'T LET THIS GO TO PRODUCTION From 36ce1a1d8cf3d63c7eef2678b41854d3159fab34 Mon Sep 17 00:00:00 2001 From: NJBL Date: Thu, 3 Sep 2020 18:59:40 -0400 Subject: [PATCH 33/38] programs remove filters and move add button over because i think it looks better there --- .../funding_sources/_index_actions.html.haml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/funding_sources/_index_actions.html.haml b/app/views/funding_sources/_index_actions.html.haml index e27aa7b3..91d8ac10 100644 --- a/app/views/funding_sources/_index_actions.html.haml +++ b/app/views/funding_sources/_index_actions.html.haml @@ -5,19 +5,19 @@ } - if can? :create, FundingSource - .btn-group + .btn-group.navbar-right = link_to new_funding_source_path, :class => 'btn btn-default' do %i.fa.fa-plus.fa-fw = "Add Funding Program"; -= form_tag funding_sources_path, :id => 'filter_form', :method => "get", :class => 'navbar-form navbar-right panel-action' do - .form-group - = select_tag(:funding_source_type_id, options_for_select(FundingSourceType.funding_program.active.map{|f| [f.to_s,f.id]}, :selected => @funding_source_type_id), :class => "form-control", :style => "width: 150px;", :prompt => "Any Source...") - .form-group - %label - = hidden_field_tag :show_active_only, '' - = check_box_tag(:show_active_only, '1', @show_active_only == '1', {:class => "form-control"}) - Show Active Programs Only +-# = form_tag funding_sources_path, :id => 'filter_form', :method => "get", :class => 'navbar-form navbar-right panel-action' do +-# .form-group +-# = select_tag(:funding_source_type_id, options_for_select(FundingSourceType.funding_program.active.map{|f| [f.to_s,f.id]}, :selected => @funding_source_type_id), :class => "form-control", :style => "width: 150px;", :prompt => "Any Source...") +-# .form-group +-# %label +-# = hidden_field_tag :show_active_only, '' +-# = check_box_tag(:show_active_only, '1', @show_active_only == '1', {:class => "form-control"}) +-# Show Active Programs Only - = button_tag :class => 'btn btn-default pull-right', :type => 'submit' do - %i.fa.fa-filter + -# = button_tag :class => 'btn btn-default pull-right', :type => 'submit' do + -# %i.fa.fa-filter From 704621684854057358da94c8f7cfddcd19f9f380 Mon Sep 17 00:00:00 2001 From: NJBL Date: Wed, 9 Sep 2020 10:07:29 -0400 Subject: [PATCH 34/38] export remove excel --- app/views/funding_sources/_index_table.html.haml | 2 +- app/views/grants/_index_table.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 0dff1f01..6ed8f7a1 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -23,7 +23,7 @@ :current_page_size => '10', :page_sizes => "10,20,50,100", :search => 'client', - :export => "['csv', 'txt', 'excel']", + :export => "['csv', 'txt']", :columns => '{"name":{"name":"Program Name","type":"drilldown-link","width":"25%"}, "1":{"name":"Source","width":"12%"}, "2":{"name":"Program Type","width":"15%"}, diff --git a/app/views/grants/_index_table.html.haml b/app/views/grants/_index_table.html.haml index 8b14a5a5..50306c5b 100644 --- a/app/views/grants/_index_table.html.haml +++ b/app/views/grants/_index_table.html.haml @@ -41,7 +41,7 @@ :current_page_size => '10', :page_sizes => "10,20,50,100", :search => 'client', - :export => "['csv', 'txt', 'excel']", + :export => "['csv', 'txt']", :columns => '{"0":{"name":"Object Key","width":"8%"}, "1":{"name":"Grant Number","width":"8%","type":"drilldown-link"}, "2":{"name":"Source","width":"5%"}, From 8ab957c7c19f085dd8835f7e36dc226653f57ade Mon Sep 17 00:00:00 2001 From: NJBL Date: Thu, 10 Sep 2020 15:34:22 -0400 Subject: [PATCH 35/38] Revert "programs table new columns and additional info in the popup" This reverts commit f802f0147357deb6153ca89de4ad92ce24c6ba92. --- app/views/funding_sources/_index_table.html.haml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 6ed8f7a1..1e27c6d6 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -36,10 +36,8 @@ "9":{"name":"Details","width":"8%"}, "10":{"name":"External ID","width":"10%"}, "11":{"name":"Object Key","width":"12%"}, - "created_by":{"name":"Created By","width":"12%"}, - "status":{"name":"Status", "width":"10%"}, "12":{"name":"Actions","type":"action-column","width":"15%"}}', - :selected_columns => "name,1,2,3,4,5,6,7,created_by,status,12", + :selected_columns => "name,1,2,3,4,5,6,7,12", :cookies => "true", :sort => 'client', :params => "{}", @@ -48,7 +46,7 @@ :url => ''}} - funding_sources.each_with_index do |f, index| %div.actions - %a.transam-popover{data: {placement: 'left', toggle: 'popover', html: 'true', content: "Description:#{f.description}
Details:#{f.details}
Type:#{f.formula_fund.present? ? "Formula" : (f.discretionary_fund.present? ? "Discretionary" : "Unknown")}
Source:#{f.funding_source_type}
Life of $:#{format_as_integer(f.life_in_years)}
Pcnt Match:#{format_as_percentage(f.match_required, 3)}
Start:#{format_as_fiscal_year(f.fy_start)}
End:#{format_as_fiscal_year(f.fy_end)}"}, title: "#{f.name}", tabindex: '0'} + %a.transam-popover{data: {placement: 'left', toggle: 'popover', html: 'true', content: "#{f.description}
#{f.details}"}, title: 'Details', tabindex: '0'} %i.fa.fa-info-circle - if can? :update, f = link_to edit_funding_source_path(f), :class => "button btn-xs", :title => "Edit program" do @@ -72,8 +70,6 @@ "9": '#{h f.details }', "10": '#{h f.external_id }', "11": '#{h f.object_key }', - "status":'#{h f.active ? "Active" : "Inactive" }', - "created_by":'#{h current_user.organization.short_name }', }, #{index}); // TEMP UNTIL WE DO THIS FOR REAL // TODO: PLEASE DON'T LET THIS GO TO PRODUCTION From 725efa8b752ff0db259a1188f7f2e5177bb359b1 Mon Sep 17 00:00:00 2001 From: NJBL Date: Thu, 10 Sep 2020 15:35:45 -0400 Subject: [PATCH 36/38] Revert "programs remove filters and move add button over because i think it looks better there" This reverts commit 36ce1a1d8cf3d63c7eef2678b41854d3159fab34. --- .../funding_sources/_index_actions.html.haml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/funding_sources/_index_actions.html.haml b/app/views/funding_sources/_index_actions.html.haml index 91d8ac10..e27aa7b3 100644 --- a/app/views/funding_sources/_index_actions.html.haml +++ b/app/views/funding_sources/_index_actions.html.haml @@ -5,19 +5,19 @@ } - if can? :create, FundingSource - .btn-group.navbar-right + .btn-group = link_to new_funding_source_path, :class => 'btn btn-default' do %i.fa.fa-plus.fa-fw = "Add Funding Program"; --# = form_tag funding_sources_path, :id => 'filter_form', :method => "get", :class => 'navbar-form navbar-right panel-action' do --# .form-group --# = select_tag(:funding_source_type_id, options_for_select(FundingSourceType.funding_program.active.map{|f| [f.to_s,f.id]}, :selected => @funding_source_type_id), :class => "form-control", :style => "width: 150px;", :prompt => "Any Source...") --# .form-group --# %label --# = hidden_field_tag :show_active_only, '' --# = check_box_tag(:show_active_only, '1', @show_active_only == '1', {:class => "form-control"}) --# Show Active Programs Only += form_tag funding_sources_path, :id => 'filter_form', :method => "get", :class => 'navbar-form navbar-right panel-action' do + .form-group + = select_tag(:funding_source_type_id, options_for_select(FundingSourceType.funding_program.active.map{|f| [f.to_s,f.id]}, :selected => @funding_source_type_id), :class => "form-control", :style => "width: 150px;", :prompt => "Any Source...") + .form-group + %label + = hidden_field_tag :show_active_only, '' + = check_box_tag(:show_active_only, '1', @show_active_only == '1', {:class => "form-control"}) + Show Active Programs Only - -# = button_tag :class => 'btn btn-default pull-right', :type => 'submit' do - -# %i.fa.fa-filter + = button_tag :class => 'btn btn-default pull-right', :type => 'submit' do + %i.fa.fa-filter From b65d63142b2d04f9545240ee29ef496db964bdf0 Mon Sep 17 00:00:00 2001 From: NJBL Date: Fri, 11 Sep 2020 14:18:42 -0400 Subject: [PATCH 37/38] remove legacy code that interferes with export on programs table --- .../funding_sources/_index_table.html.haml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/views/funding_sources/_index_table.html.haml b/app/views/funding_sources/_index_table.html.haml index 1e27c6d6..85e96686 100755 --- a/app/views/funding_sources/_index_table.html.haml +++ b/app/views/funding_sources/_index_table.html.haml @@ -156,12 +156,12 @@ $('.transam-tooltip').tooltip(); }); - $('#' + '#{table_dom_id}').on('click', 'td', function () { - var path = "#{funding_source_path('xxx')}"; - var row = $(this).parent('tr').attr('id'); - - if ($(this).attr('data-field') != 'action-cell') { - var url = path.replace("xxx", row); - document.location.href = url; - } - }); \ No newline at end of file + //$('#' + '#{table_dom_id}').on('click', 'td', function () { + // var path = "#{funding_source_path('xxx')}"; + // var row = $(this).parent('tr').attr('id'); + // + // if ($(this).attr('data-field') != 'action-cell') { + // var url = path.replace("xxx", row); + // document.location.href = url; + // } + //}); \ No newline at end of file From b2313df6989b60786c409d32d863982b7857d939 Mon Sep 17 00:00:00 2001 From: Derek Edwards Date: Fri, 18 Sep 2020 15:00:28 -0400 Subject: [PATCH 38/38] Update version. --- lib/transam_accounting/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/transam_accounting/version.rb b/lib/transam_accounting/version.rb index 118bb757..960f89d1 100644 --- a/lib/transam_accounting/version.rb +++ b/lib/transam_accounting/version.rb @@ -1,3 +1,3 @@ module TransamAccounting - VERSION = "2.11.0-rc.X" + VERSION = "2.11.0" end