leonardo 1.3.1 → 1.4.0

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.
Files changed (38) hide show
  1. data/CHANGELOG +15 -0
  2. data/README.rdoc +40 -23
  3. data/lib/generators/erb/leosca/leosca_generator.rb +5 -2
  4. data/lib/generators/erb/leosca/templates/_form.html.erb +1 -1
  5. data/lib/generators/erb/leosca/templates/_list.erb +4 -1
  6. data/lib/generators/erb/leosca/templates/formtastic/_form.html.erb +8 -3
  7. data/lib/generators/erb/leosca/templates/index.html.erb +3 -1
  8. data/lib/generators/erb/leosca/templates/show.html.erb +17 -5
  9. data/lib/generators/leolay/leolay_generator.rb +131 -26
  10. data/lib/generators/leolay/templates/app/assets/javascripts/custom.js +2 -0
  11. data/lib/generators/leolay/templates/config/locales/en.yml +179 -2
  12. data/lib/generators/leolay/templates/config/locales/it.yml +125 -20
  13. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/Thumbs.db +0 -0
  14. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  15. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  16. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/ui-bg_flat_10_000000_40x100.png +0 -0
  17. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  18. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  19. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/ui-bg_glass_65_ffffff_1x400.png +0 -0
  20. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  21. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  22. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  23. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/ui-icons_222222_256x240.png +0 -0
  24. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/ui-icons_228ef1_256x240.png +0 -0
  25. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/ui-icons_ef8c08_256x240.png +0 -0
  26. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/ui-icons_ffd27a_256x240.png +0 -0
  27. data/lib/generators/leolay/templates/styles/cloudy/images/jquery-ui/ui-icons_ffffff_256x240.png +0 -0
  28. data/lib/generators/leolay/templates/vendor/assets/javascripts/jquery-ui/jquery.ui.datepicker-de.js +23 -0
  29. data/lib/generators/leolay/templates/vendor/assets/javascripts/jquery-ui/jquery.ui.datepicker-en.js +23 -0
  30. data/lib/generators/leolay/templates/vendor/assets/javascripts/jquery-ui/jquery.ui.datepicker-it.js +23 -0
  31. data/lib/generators/leolay/templates/vendor/assets/javascripts/vendor.js +2 -0
  32. data/lib/generators/leolay/templates/{app/assets/stylesheets → vendor/assets/stylesheets/formtastic}/formtastic.css +0 -0
  33. data/lib/generators/leolay/templates/{app/assets/stylesheets → vendor/assets/stylesheets/formtastic}/formtastic_changes.css +0 -0
  34. data/lib/generators/leolay/templates/vendor/assets/stylesheets/jquery-ui/jquery-ui-1.8.16.redcarpet.css +568 -0
  35. data/lib/generators/leolay/templates/vendor/assets/stylesheets/vendor.css +4 -0
  36. data/lib/generators/rails/leosca_controller/leosca_controller_generator.rb +17 -11
  37. data/template.rb +4 -2
  38. metadata +29 -7
@@ -0,0 +1,2 @@
1
+ // Leonardo
2
+ // Insert here your javascript
@@ -1,11 +1,188 @@
1
1
  en:
2
2
  date:
3
3
  formats:
4
+ # Use the strftime parameters for formats.
5
+ # When no format has been given, it uses default.
6
+ # You can provide other formats here if you like!
4
7
  default: "%d-%m-%Y"
5
8
  short: "%d %b"
6
9
  long: "%d %B %Y"
7
10
  only_day: "%e"
8
- order: [ :day, :month, :year ]
11
+ day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday]
12
+ abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat]
13
+ # Don't forget the nil at the beginning; there's no such thing as a 0th month
14
+ month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December]
15
+ abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec]
16
+ # Used in date_select and datetime_select.
17
+ order:
18
+ - :year
19
+ - :month
20
+ - :day
21
+ time:
22
+ formats:
23
+ default: "%a, %d %b %Y %H:%M:%S %z"
24
+ short: "%d %b %H:%M"
25
+ long: "%B %d, %Y %H:%M"
26
+ am: "am"
27
+ pm: "pm"
28
+ # Used in array.to_sentence.
29
+ support:
30
+ array:
31
+ words_connector: ", "
32
+ two_words_connector: " and "
33
+ last_word_connector: ", and "
34
+ number:
35
+ # Used in number_with_delimiter()
36
+ # These are also the defaults for 'currency', 'percentage', 'precision', and 'human'
37
+ format:
38
+ # Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
39
+ separator: "."
40
+ # Delimits thousands (e.g. 1,000,000 is a million) (always in groups of three)
41
+ delimiter: ","
42
+ # Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00)
43
+ precision: 3
44
+ # If set to true, precision will mean the number of significant digits instead
45
+ # of the number of decimal digits (1234 with precision 2 becomes 1200, 1.23543 becomes 1.2)
46
+ significant: false
47
+ # If set, the zeros after the decimal separator will always be stripped (eg.: 1.200 will be 1.2)
48
+ strip_insignificant_zeros: false
49
+
50
+ # Used in number_to_currency()
51
+ currency:
52
+ format:
53
+ # Where is the currency sign? %u is the currency unit, %n the number (default: $5.00)
54
+ format: "%u%n"
55
+ unit: "$"
56
+ # These five are to override number.format and are optional
57
+ separator: "."
58
+ delimiter: ","
59
+ precision: 2
60
+ significant: false
61
+ strip_insignificant_zeros: false
62
+
63
+ # Used in number_to_percentage()
64
+ percentage:
65
+ format:
66
+ # These five are to override number.format and are optional
67
+ # separator:
68
+ delimiter: ""
69
+ # precision:
70
+ # significant: false
71
+ # strip_insignificant_zeros: false
72
+
73
+ # Used in number_to_precision()
74
+ precision:
75
+ format:
76
+ # These five are to override number.format and are optional
77
+ # separator:
78
+ delimiter: ""
79
+ # precision:
80
+ # significant: false
81
+ # strip_insignificant_zeros: false
82
+
83
+ # Used in number_to_human_size() and number_to_human()
84
+ human:
85
+ format:
86
+ # These five are to override number.format and are optional
87
+ # separator:
88
+ delimiter: ""
89
+ precision: 3
90
+ significant: true
91
+ strip_insignificant_zeros: true
92
+ # Used in number_to_human_size()
93
+ storage_units:
94
+ # Storage units output formatting.
95
+ # %u is the storage unit, %n is the number (default: 2 MB)
96
+ format: "%n %u"
97
+ units:
98
+ byte:
99
+ one: "Byte"
100
+ other: "Bytes"
101
+ kb: "KB"
102
+ mb: "MB"
103
+ gb: "GB"
104
+ tb: "TB"
105
+ # Used in number_to_human()
106
+ decimal_units:
107
+ format: "%n %u"
108
+ # Decimal units output formatting
109
+ # By default we will only quantify some of the exponents
110
+ # but the commented ones might be defined or overridden
111
+ # by the user.
112
+ units:
113
+ # femto: Quadrillionth
114
+ # pico: Trillionth
115
+ # nano: Billionth
116
+ # micro: Millionth
117
+ # mili: Thousandth
118
+ # centi: Hundredth
119
+ # deci: Tenth
120
+ unit: ""
121
+ # ten:
122
+ # one: Ten
123
+ # other: Tens
124
+ # hundred: Hundred
125
+ thousand: "Thousand"
126
+ million: "Million"
127
+ billion: "Billion"
128
+ trillion: "Trillion"
129
+ quadrillion: "Quadrillion"
130
+
131
+ # Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
132
+ datetime:
133
+ distance_in_words:
134
+ half_a_minute: "half a minute"
135
+ less_than_x_seconds:
136
+ one: "less than 1 second"
137
+ other: "less than %{count} seconds"
138
+ x_seconds:
139
+ one: "1 second"
140
+ other: "%{count} seconds"
141
+ less_than_x_minutes:
142
+ one: "less than a minute"
143
+ other: "less than %{count} minutes"
144
+ x_minutes:
145
+ one: "1 minute"
146
+ other: "%{count} minutes"
147
+ about_x_hours:
148
+ one: "about 1 hour"
149
+ other: "about %{count} hours"
150
+ x_days:
151
+ one: "1 day"
152
+ other: "%{count} days"
153
+ about_x_months:
154
+ one: "about 1 month"
155
+ other: "about %{count} months"
156
+ x_months:
157
+ one: "1 month"
158
+ other: "%{count} months"
159
+ about_x_years:
160
+ one: "about 1 year"
161
+ other: "about %{count} years"
162
+ over_x_years:
163
+ one: "over 1 year"
164
+ other: "over %{count} years"
165
+ almost_x_years:
166
+ one: "almost 1 year"
167
+ other: "almost %{count} years"
168
+ prompts:
169
+ year: "Year"
170
+ month: "Month"
171
+ day: "Day"
172
+ hour: "Hour"
173
+ minute: "Minute"
174
+ second: "Seconds"
175
+
176
+ helpers:
177
+ select:
178
+ # Default value for :prompt => true in FormOptionsHelper
179
+ prompt: "Please select"
180
+ # Default translation keys for submit FormHelper
181
+ submit:
182
+ create: 'Create %{model}'
183
+ update: 'Update %{model}'
184
+ submit: 'Save %{model}'
185
+
9
186
  activerecord: &activerecord
10
187
  models: &models
11
188
  attributes: &attributes
@@ -23,7 +200,7 @@ en:
23
200
  <<: *attributes
24
201
  hints:
25
202
  actions: &actions
26
- create: "Create my %{model}"
203
+ create: "Create %{model}"
27
204
  update: "Save changes"
28
205
  authentication:
29
206
  sign_in: "Sign in"
@@ -1,17 +1,23 @@
1
1
  it:
2
2
  date:
3
3
  formats:
4
+ # Use the strftime parameters for formats.
5
+ # When no format has been given, it uses default.
6
+ # You can provide other formats here if you like!
4
7
  default: "%d-%m-%Y"
5
8
  short: "%d %b"
6
9
  long: "%d %B %Y"
7
10
  only_day: "%e"
8
-
9
11
  day_names: [Domenica, Lunedì, Martedì, Mercoledì, Giovedì, Venerdì, Sabato]
10
12
  abbr_day_names: [Dom, Lun, Mar, Mer, Gio, Ven, Sab]
13
+ # Don't forget the nil at the beginning; there's no such thing as a 0th month
11
14
  month_names: [~, Gennaio, Febbraio, Marzo, Aprile, Maggio, Giugno, Luglio, Agosto, Settembre, Ottobre, Novembre, Dicembre]
12
15
  abbr_month_names: [~, Gen, Feb, Mar, Apr, Mag, Giu, Lug, Ago, Set, Ott, Nov, Dic]
13
- order: [ :day, :month, :year ]
14
-
16
+ # Used in date_select and datetime_select.
17
+ order:
18
+ - :year
19
+ - :month
20
+ - :day
15
21
  time:
16
22
  formats:
17
23
  default: "%a %d %b %Y, %H:%M:%S %z"
@@ -19,14 +25,111 @@ it:
19
25
  short: "%d %b %H:%M"
20
26
  long: "%d %B %Y %H:%M"
21
27
  only_second: "%S"
22
-
23
28
  datetime:
24
29
  formats:
25
30
  default: "%d-%m-%YT%H:%M:%S%Z"
26
-
27
31
  am: 'am'
28
32
  pm: 'pm'
33
+ # Used in array.to_sentence.
34
+ support:
35
+ array:
36
+ words_connector: ", "
37
+ two_words_connector: " e "
38
+ last_word_connector: ", e "
39
+ number:
40
+ # Used in number_with_delimiter()
41
+ # These are also the defaults for 'currency', 'percentage', 'precision', and 'human'
42
+ format:
43
+ # Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
44
+ separator: ","
45
+ # Delimits thousands (e.g. 1,000,000 is a million) (always in groups of three)
46
+ delimiter: "."
47
+ # Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00)
48
+ precision: 3
49
+ # If set to true, precision will mean the number of significant digits instead
50
+ # of the number of decimal digits (1234 with precision 2 becomes 1200, 1.23543 becomes 1.2)
51
+ significant: false
52
+ # If set, the zeros after the decimal separator will always be stripped (eg.: 1.200 will be 1.2)
53
+ strip_insignificant_zeros: false
54
+ currency:
55
+ format:
56
+ # Where is the currency sign? %u is the currency unit, %n the number (default: $5.00)
57
+ format: "%n %u"
58
+ unit: "€"
59
+ # These five are to override number.format and are optional
60
+ separator: "."
61
+ delimiter: ","
62
+ precision: 2
63
+ significant: false
64
+ strip_insignificant_zeros: false
65
+ # Used in number_to_percentage()
66
+ percentage:
67
+ format:
68
+ # These five are to override number.format and are optional
69
+ # separator:
70
+ delimiter: ""
71
+ # precision:
72
+ # significant: false
73
+ # strip_insignificant_zeros: false
74
+
75
+ # Used in number_to_precision()
76
+ precision:
77
+ format:
78
+ # These five are to override number.format and are optional
79
+ # separator:
80
+ delimiter: ""
81
+ # precision:
82
+ # significant: false
83
+ # strip_insignificant_zeros: false
29
84
 
85
+ # Used in number_to_human_size() and number_to_human()
86
+ human:
87
+ format:
88
+ # These five are to override number.format and are optional
89
+ # separator:
90
+ delimiter: ""
91
+ precision: 3
92
+ significant: true
93
+ strip_insignificant_zeros: true
94
+ # Used in number_to_human_size()
95
+ storage_units:
96
+ # Storage units output formatting.
97
+ # %u is the storage unit, %n is the number (default: 2 MB)
98
+ format: "%n %u"
99
+ units:
100
+ byte:
101
+ one: "Byte"
102
+ other: "Bytes"
103
+ kb: "KB"
104
+ mb: "MB"
105
+ gb: "GB"
106
+ tb: "TB"
107
+ # Used in number_to_human()
108
+ decimal_units:
109
+ format: "%n %u"
110
+ # Decimal units output formatting
111
+ # By default we will only quantify some of the exponents
112
+ # but the commented ones might be defined or overridden
113
+ # by the user.
114
+ units:
115
+ # femto: Quadrillionth
116
+ # pico: Trillionth
117
+ # nano: Billionth
118
+ # micro: Millionth
119
+ # mili: Thousandth
120
+ # centi: Hundredth
121
+ # deci: Tenth
122
+ unit: ""
123
+ # ten:
124
+ # one: Ten
125
+ # other: Tens
126
+ # hundred: Hundred
127
+ thousand: "Migliaia"
128
+ million: "Milioni"
129
+ billion: "Bilioni"
130
+ trillion: "Trilioni"
131
+ quadrillion: "Quadrilioni"
132
+ # Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
30
133
  datetime:
31
134
  distance_in_words:
32
135
  half_a_minute: "mezzo minuto"
@@ -60,17 +163,23 @@ it:
60
163
  over_x_years:
61
164
  one: "oltre un anno"
62
165
  other: "oltre {{count} anni"
166
+ prompts:
167
+ year: "Anno"
168
+ month: "Mese"
169
+ day: "Giorno"
170
+ hour: "Ora"
171
+ minute: "Minuto"
172
+ second: "Secondo"
63
173
 
64
- number:
65
- format:
66
- precision: 3
67
- separator: ','
68
- delimiter: '.'
69
- currency:
70
- format:
71
- unit: ''
72
- precision: 2
73
- format: '%n %u'
174
+ helpers:
175
+ select:
176
+ # Default value for :prompt => true in FormOptionsHelper
177
+ prompt: "Seleziona ..."
178
+ # Default translation keys for submit FormHelper
179
+ submit:
180
+ create: 'Crea %{model}'
181
+ update: 'Aggiorna %{model}'
182
+ submit: 'Salva %{model}'
74
183
 
75
184
  activerecord: &activerecord
76
185
  models: &models
@@ -79,10 +188,6 @@ it:
79
188
  created_at: "Data creazione"
80
189
  updated_at: "Data modifica"
81
190
  #Attributes zone - do not remove
82
- helpers:
83
- submit:
84
- create: "Crea %{model}"
85
- update: "Modifica %{model}"
86
191
  errors:
87
192
  template:
88
193
  header:
@@ -122,7 +227,7 @@ it:
122
227
  hints:
123
228
  actions: &actions
124
229
  create: "Crea %{model}"
125
- update: "Salva le modifiche"
230
+ update: "Aggiorna"
126
231
  authentication:
127
232
  sign_in: "Accedi"
128
233
  sign_in_with: "Accedi con"
@@ -0,0 +1,23 @@
1
+ /* German initialisation for the jQuery UI date picker plugin. */
2
+ /* Written by Milian Wolff (mail@milianw.de). */
3
+ jQuery(function($){
4
+ $.datepicker.regional['de'] = {
5
+ closeText: 'schließen',
6
+ prevText: '&#x3c;zurück',
7
+ nextText: 'Vor&#x3e;',
8
+ currentText: 'heute',
9
+ monthNames: ['Januar','Februar','März','April','Mai','Juni',
10
+ 'Juli','August','September','Oktober','November','Dezember'],
11
+ monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
12
+ 'Jul','Aug','Sep','Okt','Nov','Dez'],
13
+ dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
14
+ dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
15
+ dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
16
+ weekHeader: 'Wo',
17
+ dateFormat: 'dd.mm.yy',
18
+ firstDay: 1,
19
+ isRTL: false,
20
+ showMonthAfterYear: false,
21
+ yearSuffix: ''};
22
+ $.datepicker.setDefaults($.datepicker.regional['de']);
23
+ });