mensa 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/gem-push.yml +1 -0
- data/.shipkit.yml +1 -1
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/app/components/mensa/table/component.html.erb +4 -0
- data/app/tables/mensa/base.rb +11 -0
- data/app/views/mensa/exports/_dialog.html.erb +1 -1
- data/config/locales/nl.yml +1 -1
- data/lib/mensa/configuration.rb +2 -0
- data/lib/mensa/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 850adf070dcceffb710d8e36e4bad1eba36081c080bcad336951533cd312e234
|
|
4
|
+
data.tar.gz: d96ce5e7bb9712de9535925efb66f96e814228071454ab9557c8483e23ce3d7b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6eb9003575e4dc5e5827340ff8bba70571271f2b49ab024cab7b4ef04c6ee6902d91e8136675346a5d2869102ee71fcf1d30b7194149bd807c914c3f6814e25d
|
|
7
|
+
data.tar.gz: d275ccf1f6d298edbcaab11acc756dba72db8537cabcab3378e3a52129714571fb0a4be6de8b6063bdddf5de9528e33d690e1657aba7b7036fdf9afdebdcaead
|
data/.shipkit.yml
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
---
|
|
2
|
-
previous_version: 0.
|
|
2
|
+
previous_version: 0.10.0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.1
|
|
4
|
+
|
|
5
|
+
- The export dialog names a table by its model's name in the plural
|
|
6
|
+
("Export automations"), not by the table's own name humanized ("Export agito
|
|
7
|
+
automations"). Dutch: "Exporteer automatiseringen".
|
|
8
|
+
- `Mensa.config.tour = false` switches off the table tour.
|
|
9
|
+
|
|
3
10
|
## 0.10.0
|
|
4
11
|
|
|
5
12
|
- Batch actions can work on every row matching the current search and filters:
|
data/Gemfile.lock
CHANGED
|
@@ -5,8 +5,12 @@
|
|
|
5
5
|
data-mensa-table-save-view-url-value="<%= table.path_with_params(helpers.mensa.table_views_path(table.name)) %>"
|
|
6
6
|
data-mensa-table-views-url-value="<%= table.path_with_params(helpers.mensa.table_views_path(table.name)) %>"
|
|
7
7
|
data-mensa-table-exports-url-value="<%= table.path_with_params(helpers.mensa.table_exports_path(table.name)) %>"
|
|
8
|
+
<% if Mensa.config.tour %>
|
|
8
9
|
data-controller="mensa-table mensa-tour"
|
|
9
10
|
data-mensa-tour-texts-value="<%= I18n.t("mensa.tour").to_json %>"
|
|
11
|
+
<% else %>
|
|
12
|
+
data-controller="mensa-table"
|
|
13
|
+
<% end %>
|
|
10
14
|
data-mensa-table-storage-key-value="<%= table.storage_key %>"
|
|
11
15
|
data-action="click@document->mensa-table#saveDropdownOutsideHandler"
|
|
12
16
|
data-mensa-table-mensa-filter-pill-list-outlet="#mensa-filter-pill-list-<%= table.table_id %>"
|
data/app/tables/mensa/base.rb
CHANGED
|
@@ -33,6 +33,17 @@ module Mensa
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
# The table's name for people, in a sentence: its model's, in the plural
|
|
37
|
+
# ("automations" for agito_automations), else its own name humanized
|
|
38
|
+
def human_name
|
|
39
|
+
return name.to_s.humanize.downcase unless model.respond_to?(:model_name)
|
|
40
|
+
|
|
41
|
+
name = model.model_name
|
|
42
|
+
# Without a translation human gives the singular, whatever the count
|
|
43
|
+
translated = model.respond_to?(:i18n_scope) && I18n.exists?("#{model.i18n_scope}.models.#{name.i18n_key}")
|
|
44
|
+
(translated ? name.human(count: 2) : name.human.pluralize).downcase_first
|
|
45
|
+
end
|
|
46
|
+
|
|
36
47
|
def column_order
|
|
37
48
|
order = config[:column_order].presence || config[:columns]&.keys
|
|
38
49
|
order = order&.map(&:to_sym)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<dialog class="mensa-table__export-dialog" data-mensa-table-target="exportDialog" data-action="click->mensa-table#exportDialogBackdrop">
|
|
4
4
|
<div class="mensa-table__export-dialog__panel">
|
|
5
5
|
<header class="mensa-table__export-dialog__header">
|
|
6
|
-
<h2 class="mensa-table__export-dialog__title"><%= t("mensa.exports.title", default: "Export %{table}", table: table.
|
|
6
|
+
<h2 class="mensa-table__export-dialog__title"><%= t("mensa.exports.title", default: "Export %{table}", table: table.human_name) %></h2>
|
|
7
7
|
<button class="mensa-table__export-dialog__close" type="button" data-action="mensa-table#cancelExport" aria-label="<%= t("mensa.exports.close", default: "Close") %>">
|
|
8
8
|
<i class="<%= Mensa.config.icons[:exports_dialog_close] %>"></i>
|
|
9
9
|
</button>
|
data/config/locales/nl.yml
CHANGED
|
@@ -110,7 +110,7 @@ nl:
|
|
|
110
110
|
view_description_placeholder: Optionele notities over deze weergave
|
|
111
111
|
view_name_required: Vul een naam in voor deze weergave.
|
|
112
112
|
exports:
|
|
113
|
-
title: "%{table}
|
|
113
|
+
title: "Exporteer %{table}"
|
|
114
114
|
close: Sluiten
|
|
115
115
|
available_downloads: Beschikbare downloads
|
|
116
116
|
empty: Je hebt nog geen downloads. Maak er hieronder een aan.
|
data/lib/mensa/configuration.rb
CHANGED
|
@@ -150,6 +150,8 @@ module Mensa
|
|
|
150
150
|
option :row_actions_position, default: :back
|
|
151
151
|
# It's either :basic or :fuzzy, for fuzzy search you need to have `pg_trgm` extension installed
|
|
152
152
|
option :search, default: :basic
|
|
153
|
+
# Explain the table's features the first time a user sees them (and on ?)
|
|
154
|
+
option :tour, default: true
|
|
153
155
|
# Default options for Mensa::Verifier (and so `rails mensa:verify`), called
|
|
154
156
|
# with the table class. Return a hash with any of user:, account:,
|
|
155
157
|
# context: (Current attributes), params: and label:, or an array of them
|
data/lib/mensa/version.rb
CHANGED