Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions layouts/shortcodes/csvtable-roles.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ $data := "" }}
{{ $p := "static/data/csv/keys-backup.csv" }}
{{ $excludedColumns := slice 0 10 11 12 13 14 15 16 17 18 }}
{{ $p := "static/data/csv/keys.csv" }}
{{ $excludedColumns := slice 0 11 12 13 14 15 16 17 18 19 20 }}

{{ if os.FileExists $p }}
{{ $opts := dict "delimiter" "," }}
Expand Down Expand Up @@ -39,6 +39,10 @@
{{ $urlPath = "roles/organization-roles" }}
{{ else if hasPrefix $sectionName "provider" }}
{{ $urlPath = "roles/#provider-admin-role" }}
{{ else if hasPrefix $sectionName "academy" }}
{{ $urlPath = "roles/academy-roles" }}
{{ else if or (hasPrefix $sectionName "learner") (hasPrefix $sectionName "leaner") }}
{{ $urlPath = "roles/academy-roles/#learner" }}
{{ else }}
{{ $urlPath = print "roles/" $sectionName | urlize }}
{{ end }}
Expand Down
8 changes: 6 additions & 2 deletions layouts/shortcodes/csvtable.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ $data := "" }}

{{ $p := "static/data/csv/keys-backup.csv" }}
{{ $p := "static/data/csv/keys.csv" }}
{{ $excludedColumns := slice "Category" "Keychain ID" "Key ID" "Inserted" "Local Provider" }} <!-- Add the names of the columns to exclude -->

{{ if os.FileExists $p }}
Expand Down Expand Up @@ -52,6 +52,10 @@ <h2>{{ $category }} Permissions</h2>
{{ $urlPath = "roles/#provider-admin-role" }}
{{ else if hasPrefix $sectionName "user" }}
{{ $urlPath = "roles/user-role" }}
{{ else if hasPrefix $sectionName "academy" }}
{{ $urlPath = "roles/academy-roles" }}
{{ else if or (hasPrefix $sectionName "learner") (hasPrefix $sectionName "leaner") }}
{{ $urlPath = "roles/academy-roles/#learner" }}
{{ else }}
{{ $urlPath = print "roles/" }}
{{ end }}
Expand All @@ -69,7 +73,7 @@ <h2>{{ $category }} Permissions</h2>
{{ $col := index $header $j }}
{{ if not (in $excludedColumns $col) }}
<td>
{{ if and (gt $j 2) (lt $j 10) }}
{{ if and (gt $j 2) (lt $j 11) }}
{{ if eq $cell "X" }}
{{ else if eq $cell "X*" }}
Expand Down
96 changes: 0 additions & 96 deletions static/data/csv/keys-backup.csv

This file was deleted.

Loading