thecore_ui_commons 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -28
- data/app/controllers/application_controller.rb +10 -0
- data/app/controllers/info_controller.rb +8 -0
- data/app/views/info/swagger.html.erb +28 -0
- data/app/views/layouts/swagger.html.erb +11 -0
- data/config/locales/en.yml +31 -30
- data/config/locales/it.ra_settings.yml +1 -1
- data/config/locales/it.yml +33 -33
- data/config/routes.rb +2 -0
- data/lib/thecore_ui_commons/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a194480fe002f28b8372b3b29d28c4f7419715ca4da63c90731a8d0b5748f599
|
4
|
+
data.tar.gz: 7c4dea84f3eee3a99eccd711e9c327e721113546c03730db08df000a66eaa79e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 998970a3d9bbb0d450817c1b8ab2973c1feb9f1b0a966dfb96efdcbfab52e150c6650bbeeb5cccdf4714f9486c073950d49adbe25f5622a0e94bf62a336852a1
|
7
|
+
data.tar.gz: 44d2fe193be4012cb15099dafb2b77478ea10a20f1f5e0f10bca4778b726bd65e8227e81e1df9935fe1a4d114e7ec27398f59f003d3c0faf1a53d5ffa053a889
|
data/README.md
CHANGED
@@ -1,28 +1 @@
|
|
1
|
-
|
2
|
-
Short description and motivation.
|
3
|
-
|
4
|
-
## Usage
|
5
|
-
How to use my plugin.
|
6
|
-
|
7
|
-
## Installation
|
8
|
-
Add this line to your application's Gemfile:
|
9
|
-
|
10
|
-
```ruby
|
11
|
-
gem "thecore_ui_commons"
|
12
|
-
```
|
13
|
-
|
14
|
-
And then execute:
|
15
|
-
```bash
|
16
|
-
$ bundle
|
17
|
-
```
|
18
|
-
|
19
|
-
Or install it yourself as:
|
20
|
-
```bash
|
21
|
-
$ gem install thecore_ui_commons
|
22
|
-
```
|
23
|
-
|
24
|
-
## Contributing
|
25
|
-
Contribution directions go here.
|
26
|
-
|
27
|
-
## License
|
28
|
-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
1
|
+
This is part of Thecore framework: https://github.com/gabrieletassoni/thecore/tree/release/3
|
@@ -0,0 +1,10 @@
|
|
1
|
+
class ApplicationController < ActionController::Base
|
2
|
+
before_action :setup_white_label
|
3
|
+
|
4
|
+
private
|
5
|
+
|
6
|
+
def setup_white_label
|
7
|
+
# Somewhat white label support
|
8
|
+
prepend_view_path(["vendor/custombuilds/#{ENV['COMPOSE_PROJECT_NAME']}.#{ENV['BASE_DOMAIN']}/deltas/app/views"]) if ENV['COMPOSE_PROJECT_NAME'].present? && ENV['BASE_DOMAIN'].present?
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
class InfoController < ApplicationController
|
2
|
+
# This is a model-less controller just to render che swagger page using a custom layout
|
3
|
+
layout 'swagger'
|
4
|
+
def swagger
|
5
|
+
uri = URI(request.url)
|
6
|
+
@swagger_json_url = "#{uri.scheme}://#{uri.host}#{":#{uri.port}" if uri.port.present?}/api/v2/info/swagger.json"
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/3.19.5/swagger-ui-bundle.js"> </script>
|
2
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/3.19.5/swagger-ui-standalone-preset.js"> </script>
|
3
|
+
<script>
|
4
|
+
function get(yourUrl){
|
5
|
+
var Httpreq = new XMLHttpRequest(); // a new request
|
6
|
+
Httpreq.open("GET",yourUrl,false);
|
7
|
+
Httpreq.send(null);
|
8
|
+
var json_obj = JSON.parse(Httpreq.responseText);
|
9
|
+
return json_obj;
|
10
|
+
}
|
11
|
+
window.onload = function() {
|
12
|
+
const ui = SwaggerUIBundle({
|
13
|
+
spec: get('<%= @swagger_json_url %>'),
|
14
|
+
dom_id: '#swagger-ui',
|
15
|
+
deepLinking: true,
|
16
|
+
presets: [
|
17
|
+
SwaggerUIBundle.presets.apis,
|
18
|
+
SwaggerUIStandalonePreset
|
19
|
+
],
|
20
|
+
plugins: [
|
21
|
+
SwaggerUIBundle.plugins.DownloadUrl
|
22
|
+
],
|
23
|
+
layout: "StandaloneLayout"
|
24
|
+
})
|
25
|
+
|
26
|
+
window.ui = ui
|
27
|
+
}
|
28
|
+
</script>
|
data/config/locales/en.yml
CHANGED
@@ -1,26 +1,42 @@
|
|
1
1
|
en:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
admin:
|
3
|
+
actions:
|
4
|
+
charts:
|
5
|
+
menu: Analisys
|
6
|
+
title: Charts
|
7
|
+
breadcrumb: Charts
|
8
|
+
links:
|
9
|
+
label: Links
|
10
|
+
settings:
|
11
|
+
label: Settings
|
12
|
+
advanced: Advanced
|
13
|
+
registries: Registries
|
14
|
+
operations: Operations
|
15
|
+
tools:
|
16
|
+
label: Tools
|
17
|
+
advanced: Advanced
|
18
|
+
contact: Help us
|
8
19
|
current_user: Current User
|
20
|
+
dashboard: Dashboard
|
9
21
|
devise:
|
10
22
|
sessions:
|
11
23
|
new:
|
12
24
|
login: Login
|
13
|
-
password: Password
|
14
|
-
|
15
|
-
dashboard: Dashboard
|
16
|
-
contact: Help us
|
17
|
-
manage: Manage
|
18
|
-
sign_out: Sign Out
|
19
|
-
advanced: Advanced
|
20
|
-
main_records: Registries
|
25
|
+
password: Password
|
26
|
+
dont_leve_or_drag_here: Uploading, please don't leave this page or Drag & Drop other files.
|
21
27
|
errors:
|
22
28
|
messages:
|
23
29
|
invalid: Invalid characters
|
30
|
+
file_upload: Upload description, please add a translation for the element called file_upload in your translation file.
|
31
|
+
file_upload_subtitle: Additional description, please add a translation for file_upload_subtitle to your translation file.
|
32
|
+
hello: Hello World
|
33
|
+
import_success: Import Successful!
|
34
|
+
loading: Loading
|
35
|
+
main_records: Registries
|
36
|
+
manage: Manage
|
37
|
+
please_drag_and_drop_here: Drag and Drop here the files to import
|
38
|
+
run_import: Force import
|
39
|
+
sign_out: Sign Out
|
24
40
|
tiered_times:
|
25
41
|
dd:
|
26
42
|
zero: "0 Days"
|
@@ -37,19 +53,4 @@ en:
|
|
37
53
|
ss:
|
38
54
|
zero: "0 Seconds"
|
39
55
|
one: "%{count} Second"
|
40
|
-
other: "%{count} Seconds"
|
41
|
-
admin:
|
42
|
-
links:
|
43
|
-
label: Links
|
44
|
-
tools:
|
45
|
-
label: Tools
|
46
|
-
settings:
|
47
|
-
label: Settings
|
48
|
-
advanced: Advanced
|
49
|
-
registries: Registries
|
50
|
-
operations: Operations
|
51
|
-
actions:
|
52
|
-
charts:
|
53
|
-
menu: Analisys
|
54
|
-
title: Charts
|
55
|
-
breadcrumb: Charts
|
56
|
+
other: "%{count} Seconds"
|
data/config/locales/it.yml
CHANGED
@@ -1,27 +1,42 @@
|
|
1
1
|
it:
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
2
|
+
admin:
|
3
|
+
actions:
|
4
|
+
charts:
|
5
|
+
menu: Analisi
|
6
|
+
title: Grafici
|
7
|
+
breadcrumb: Grafici
|
8
|
+
links:
|
9
|
+
label: Collegamenti
|
10
|
+
settings:
|
11
|
+
label: Impostazioni
|
12
|
+
advanced: Avanzate
|
13
|
+
registries: Anagrafiche
|
14
|
+
operations: Operatività
|
15
|
+
tools:
|
16
|
+
label: "Strumenti"
|
17
|
+
advanced: Impostazioni
|
18
|
+
contact: "Aiutaci a Migliorare"
|
19
|
+
current_user: Utente corrente
|
20
|
+
dashboard: "Pagina Iniziale"
|
17
21
|
devise:
|
18
22
|
sessions:
|
19
23
|
new:
|
20
24
|
login: Login
|
21
|
-
password: Password
|
25
|
+
password: Password
|
26
|
+
dont_leve_or_drag_here: Upload in corso, si prega di non lasciare la pagina o trascinare qui altri file.
|
22
27
|
errors:
|
23
28
|
messages:
|
24
|
-
invalid: contiene caratteri invalidi
|
29
|
+
invalid: contiene caratteri invalidi
|
30
|
+
file_upload: Descrizione della procedura, prego aggiungere una traduzione per file_upload al tuo file delle traduzioni.
|
31
|
+
file_upload_subtitle: Descrizione aggiuntiva, prego aggiungere una traduzione per file_upload_subtitle al tuo file delle traduzioni.
|
32
|
+
hello: "Ciao Mondo"
|
33
|
+
import_success: Importazione completata con successo
|
34
|
+
loading: Caricamento
|
35
|
+
main_records: Anagrafiche
|
36
|
+
manage: "Gestione"
|
37
|
+
please_drag_and_drop_here: Trascinare qui i file da importare
|
38
|
+
run_import: Forza l'importazione
|
39
|
+
sign_out: "Uscita"
|
25
40
|
tiered_times:
|
26
41
|
dd:
|
27
42
|
zero: "0 Giorni"
|
@@ -38,19 +53,4 @@ it:
|
|
38
53
|
ss:
|
39
54
|
zero: "0 Secondi"
|
40
55
|
one: "%{count} Secondo"
|
41
|
-
other: "%{count} Secondi"
|
42
|
-
admin:
|
43
|
-
links:
|
44
|
-
label: Collegamenti
|
45
|
-
tools:
|
46
|
-
label: "Strumenti"
|
47
|
-
settings:
|
48
|
-
label: Impostazioni
|
49
|
-
advanced: Avanzate
|
50
|
-
registries: Anagrafiche
|
51
|
-
operations: Operatività
|
52
|
-
actions:
|
53
|
-
charts:
|
54
|
-
menu: Analisi
|
55
|
-
title: Grafici
|
56
|
-
breadcrumb: Grafici
|
56
|
+
other: "%{count} Secondi"
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_ui_commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_backend_commons
|
@@ -119,8 +119,11 @@ files:
|
|
119
119
|
- app/assets/stylesheets/thecore_ui_commons.scss
|
120
120
|
- app/assets/stylesheets/thecore_ui_commons/alerts.scss
|
121
121
|
- app/assets/stylesheets/thecore_ui_commons/variables.scss
|
122
|
+
- app/controllers/application_controller.rb
|
123
|
+
- app/controllers/info_controller.rb
|
122
124
|
- app/helpers/thecore_helper.rb
|
123
125
|
- app/views/contact_mailer/contact_message.html.erb
|
126
|
+
- app/views/info/swagger.html.erb
|
124
127
|
- app/views/kaminari/_first_page.html.erb
|
125
128
|
- app/views/kaminari/_gap.html.erb
|
126
129
|
- app/views/kaminari/_last_page.html.erb
|
@@ -134,6 +137,7 @@ files:
|
|
134
137
|
- app/views/layouts/devise/sessions.html.erb
|
135
138
|
- app/views/layouts/mailer.html.erb
|
136
139
|
- app/views/layouts/mailer.text.erb
|
140
|
+
- app/views/layouts/swagger.html.erb
|
137
141
|
- app/views/shared/_flash.html.erb
|
138
142
|
- app/views/thecore_utils/_drag_drop_uploader.html.erb
|
139
143
|
- config/initializers/abilities.rb
|
@@ -178,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
178
182
|
- !ruby/object:Gem::Version
|
179
183
|
version: '0'
|
180
184
|
requirements: []
|
181
|
-
rubygems_version: 3.
|
185
|
+
rubygems_version: 3.5.3
|
182
186
|
signing_key:
|
183
187
|
specification_version: 4
|
184
188
|
summary: Common artifacts for the UIs.
|