leonardo 1.3.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 (69) hide show
  1. data/CHANGELOG +58 -0
  2. data/LICENSE +20 -0
  3. data/README.rdoc +115 -0
  4. data/lib/generators/erb/leosca/leosca_generator.rb +73 -0
  5. data/lib/generators/erb/leosca/templates/_form.html.erb +23 -0
  6. data/lib/generators/erb/leosca/templates/_list.erb +47 -0
  7. data/lib/generators/erb/leosca/templates/destroy.js.erb +1 -0
  8. data/lib/generators/erb/leosca/templates/edit.html.erb +11 -0
  9. data/lib/generators/erb/leosca/templates/formtastic/_form.html.erb +10 -0
  10. data/lib/generators/erb/leosca/templates/index.html.erb +35 -0
  11. data/lib/generators/erb/leosca/templates/index.js.erb +1 -0
  12. data/lib/generators/erb/leosca/templates/new.html.erb +7 -0
  13. data/lib/generators/erb/leosca/templates/show.html.erb +13 -0
  14. data/lib/generators/leolay/USAGE +21 -0
  15. data/lib/generators/leolay/leolay_generator.rb +195 -0
  16. data/lib/generators/leolay/templates/app/assets/stylesheets/formtastic.css +145 -0
  17. data/lib/generators/leolay/templates/app/assets/stylesheets/formtastic_changes.css +16 -0
  18. data/lib/generators/leolay/templates/app/views/devise/confirmations/new.html.erb +12 -0
  19. data/lib/generators/leolay/templates/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  20. data/lib/generators/leolay/templates/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  21. data/lib/generators/leolay/templates/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  22. data/lib/generators/leolay/templates/app/views/devise/passwords/edit.html.erb +16 -0
  23. data/lib/generators/leolay/templates/app/views/devise/passwords/new.html.erb +12 -0
  24. data/lib/generators/leolay/templates/app/views/devise/registrations/edit.html.erb +25 -0
  25. data/lib/generators/leolay/templates/app/views/devise/registrations/new.html.erb +18 -0
  26. data/lib/generators/leolay/templates/app/views/devise/sessions/new.html.erb +17 -0
  27. data/lib/generators/leolay/templates/app/views/devise/shared/_links.erb +25 -0
  28. data/lib/generators/leolay/templates/app/views/devise/unlocks/new.html.erb +12 -0
  29. data/lib/generators/leolay/templates/config/locales/devise.en.yml +53 -0
  30. data/lib/generators/leolay/templates/config/locales/devise.it.yml +51 -0
  31. data/lib/generators/leolay/templates/config/locales/en.yml +79 -0
  32. data/lib/generators/leolay/templates/config/locales/it.yml +176 -0
  33. data/lib/generators/leolay/templates/config/locales/kaminari.en.yml +10 -0
  34. data/lib/generators/leolay/templates/config/locales/kaminari.it.yml +10 -0
  35. data/lib/generators/leolay/templates/config.rb +11 -0
  36. data/lib/generators/leolay/templates/layout_helper.rb +39 -0
  37. data/lib/generators/leolay/templates/lib/utility.rb +48 -0
  38. data/lib/generators/leolay/templates/styles/cloudy/images/kaminari/nav.png +0 -0
  39. data/lib/generators/leolay/templates/styles/cloudy/images/style/bg_but_gray.png +0 -0
  40. data/lib/generators/leolay/templates/styles/cloudy/images/style/bg_top.png +0 -0
  41. data/lib/generators/leolay/templates/styles/cloudy/images/style/button_170_126.png +0 -0
  42. data/lib/generators/leolay/templates/styles/cloudy/images/style/button_229_170.png +0 -0
  43. data/lib/generators/leolay/templates/styles/cloudy/images/style/ico_back.png +0 -0
  44. data/lib/generators/leolay/templates/styles/cloudy/images/style/ico_next.png +0 -0
  45. data/lib/generators/leolay/templates/styles/cloudy/images/style/ico_v.png +0 -0
  46. data/lib/generators/leolay/templates/styles/cloudy/images/style/ico_x.png +0 -0
  47. data/lib/generators/leolay/templates/styles/cloudy/images/style/input_background_bn.png +0 -0
  48. data/lib/generators/leolay/templates/styles/cloudy/images/style/logo.png +0 -0
  49. data/lib/generators/leolay/templates/styles/cloudy/images/style/msg_error.gif +0 -0
  50. data/lib/generators/leolay/templates/styles/cloudy/images/style/msg_notice.gif +0 -0
  51. data/lib/generators/leolay/templates/styles/cloudy/stylesheet.sass +341 -0
  52. data/lib/generators/leolay/templates/styles/cloudy/views/kaminari/_next_page.html.erb +5 -0
  53. data/lib/generators/leolay/templates/styles/cloudy/views/kaminari/_page.html.erb +5 -0
  54. data/lib/generators/leolay/templates/styles/cloudy/views/kaminari/_paginator.html.erb +7 -0
  55. data/lib/generators/leolay/templates/styles/cloudy/views/kaminari/_prev_page.html.erb +5 -0
  56. data/lib/generators/leolay/templates/styles/cloudy/views/layout/_layout.html.erb +38 -0
  57. data/lib/generators/leolay/templates/styles/cloudy/views/layout/_message.html.erb +3 -0
  58. data/lib/generators/leolay/templates/styles/cloudy/views/layout/_session.html.erb +10 -0
  59. data/lib/generators/leolay/templates/styles/cloudy/views/layout/application.html.erb +13 -0
  60. data/lib/generators/leosca/USAGE +23 -0
  61. data/lib/generators/leosca/install_generator.rb +15 -0
  62. data/lib/generators/rails/leosca/USAGE +41 -0
  63. data/lib/generators/rails/leosca/leosca_generator.rb +26 -0
  64. data/lib/generators/rails/leosca/templates/leosca.css +56 -0
  65. data/lib/generators/rails/leosca_controller/USAGE +23 -0
  66. data/lib/generators/rails/leosca_controller/leosca_controller_generator.rb +159 -0
  67. data/lib/generators/rails/leosca_controller/templates/controller.rb +132 -0
  68. data/template.rb +104 -0
  69. metadata +132 -0
@@ -0,0 +1,176 @@
1
+ it:
2
+ date:
3
+ formats:
4
+ default: "%d-%m-%Y"
5
+ short: "%d %b"
6
+ long: "%d %B %Y"
7
+ only_day: "%e"
8
+
9
+ day_names: [Domenica, Lunedì, Martedì, Mercoledì, Giovedì, Venerdì, Sabato]
10
+ abbr_day_names: [Dom, Lun, Mar, Mer, Gio, Ven, Sab]
11
+ month_names: [~, Gennaio, Febbraio, Marzo, Aprile, Maggio, Giugno, Luglio, Agosto, Settembre, Ottobre, Novembre, Dicembre]
12
+ abbr_month_names: [~, Gen, Feb, Mar, Apr, Mag, Giu, Lug, Ago, Set, Ott, Nov, Dic]
13
+ order: [ :day, :month, :year ]
14
+
15
+ time:
16
+ formats:
17
+ default: "%a %d %b %Y, %H:%M:%S %z"
18
+ time: "%H:%M"
19
+ short: "%d %b %H:%M"
20
+ long: "%d %B %Y %H:%M"
21
+ only_second: "%S"
22
+
23
+ datetime:
24
+ formats:
25
+ default: "%d-%m-%YT%H:%M:%S%Z"
26
+
27
+ am: 'am'
28
+ pm: 'pm'
29
+
30
+ datetime:
31
+ distance_in_words:
32
+ half_a_minute: "mezzo minuto"
33
+ less_than_x_seconds:
34
+ one: "meno di un secondo"
35
+ other: "meno di {{count} secondi"
36
+ x_seconds:
37
+ one: "1 secondo"
38
+ other: "{{count} secondi"
39
+ less_than_x_minutes:
40
+ one: "meno di un minuto"
41
+ other: "meno di {{count} minuti"
42
+ x_minutes:
43
+ one: "1 minuto"
44
+ other: "{{count} minuti"
45
+ about_x_hours:
46
+ one: "circa un'ora"
47
+ other: "circa {{count} ore"
48
+ x_days:
49
+ one: "1 giorno"
50
+ other: "{{count} giorni"
51
+ about_x_months:
52
+ one: "circa un mese"
53
+ other: "circa {{count} mesi"
54
+ x_months:
55
+ one: "1 mese"
56
+ other: "{{count} mesi"
57
+ about_x_years:
58
+ one: "circa un anno"
59
+ other: "circa {{count} anni"
60
+ over_x_years:
61
+ one: "oltre un anno"
62
+ other: "oltre {{count} anni"
63
+
64
+ number:
65
+ format:
66
+ precision: 3
67
+ separator: ','
68
+ delimiter: '.'
69
+ currency:
70
+ format:
71
+ unit: '€'
72
+ precision: 2
73
+ format: '%n %u'
74
+
75
+ activerecord: &activerecord
76
+ models: &models
77
+ attributes: &attributes
78
+ id: "Id"
79
+ created_at: "Data creazione"
80
+ updated_at: "Data modifica"
81
+ #Attributes zone - do not remove
82
+ helpers:
83
+ submit:
84
+ create: "Crea %{model}"
85
+ update: "Modifica %{model}"
86
+ errors:
87
+ template:
88
+ header:
89
+ one: "Non posso salvare questo %{model}: 1 errore"
90
+ other: "Non posso salvare questo %{model}: %{count} errori."
91
+ body: "Per favore ricontrolla i seguenti campi:"
92
+ messages:
93
+ inclusion: "non è incluso nella lista"
94
+ exclusion: "è riservato"
95
+ invalid: "non è valido"
96
+ confirmation: "non coincide con la conferma"
97
+ accepted: "deve essere accettata"
98
+ empty: "non può essere vuoto"
99
+ blank: "non può essere lasciato in bianco"
100
+ too_long: "è troppo lungo (il massimo è %{count} lettere)"
101
+ too_short: "è troppo corto (il minimo è %{count} lettere)"
102
+ wrong_length: "è della lunghezza sbagliata (deve essere di %{count} lettere)"
103
+ taken: "è già in uso"
104
+ not_a_number: "non è un numero"
105
+ greater_than: "deve essere superiore a %{count}"
106
+ greater_than_or_equal_to: "deve essere superiore o uguale a %{count}"
107
+ equal_to: "deve essere uguale a %{count}"
108
+ less_than: "deve essere meno di %{count}"
109
+ less_than_or_equal_to: "deve essere meno o uguale a %{count}"
110
+ odd: "deve essere dispari"
111
+ even: "deve essere pari"
112
+ template:
113
+ header:
114
+ one: "un errore impedisce il salvataggio di: %{model}"
115
+ other: "%{count} errori impediscono il salvataggio di: %{model}"
116
+ # The variable :count is also available
117
+ body: "Ci sono stati problemi con i seguenti campi:"
118
+ formtastic:
119
+ titles:
120
+ labels:
121
+ <<: *attributes
122
+ hints:
123
+ actions: &actions
124
+ create: "Crea %{model}"
125
+ update: "Salva le modifiche"
126
+ authentication:
127
+ sign_in: "Accedi"
128
+ sign_in_with: "Accedi con"
129
+ sign_out: "Disconnetti"
130
+ sign_up: "Registrati"
131
+ signed_in_as: "Sei connesso come"
132
+ not_you: "Non sei tu?"
133
+ remember_me: "Memorizza i miei dati"
134
+ password_confirmation: "Conferma la password"
135
+ forgot_password?: "Password dimenticata?"
136
+ didnt_receive_confirmation_instruction?: "Non hai ricevuto le istruzioni per la conferma?"
137
+ didnt_receive_unlock_instruction?: "Non hai ricevuto le istruzioni per lo sblocco?"
138
+ cancel_my_account: "Cancella il mio profilo"
139
+ send_me_reset_password_instruction: "Inviami le istruzioni per il reset password"
140
+ change_password: "Cambia la password"
141
+ current_password: "Password attuale"
142
+ new_password: "Nuova password"
143
+
144
+
145
+ unknown_request: "Spiacente, richiesta sconosciuta, non è possibile eseguirla"
146
+ generic_error: "Un errore impedisce di svolgere questa operazione"
147
+ permission_denied: "Non hai i privilegi per svolgere questa operazione."
148
+ created: "L'oggetto %{model} è stato creato correttamente."
149
+ created_ko: "Un errore ha impedito la creazione dell'oggetto %{model}."
150
+ updated: "L'oggetto %{model} è stato modificato correttamente."
151
+ updated_ko: "Un errore ha impedito la modifica dell'oggetto %{model}."
152
+ deleted: "L'oggetto %{model} è stato eliminato."
153
+
154
+ <<: *activerecord
155
+ <<: *actions
156
+
157
+ list: "Lista"
158
+ save: "Salva"
159
+ edit: "Modifica"
160
+ delete: "Cancella"
161
+ destroy: "Elimina"
162
+ new: "Nuovo"
163
+ copy: "Copia"
164
+ back: "Indietro"
165
+ back_to_list: "Torna alla Lista"
166
+ show: "Visualizza"
167
+ show_all: "Mostra tutti"
168
+ sure?: "Sei sicuro?"
169
+ add: "Aggiungi"
170
+ create: "Crea"
171
+ update: "Aggiorna"
172
+ search: "Cerca"
173
+ radio-yes: "Si"
174
+ radio-no: "No"
175
+ radio-all: "Tutto"
176
+ choose_language: "Scegli la lingua"
@@ -0,0 +1,10 @@
1
+ # Sample localization file for Kaminari. You can override these values in your app's locales file if you want.
2
+
3
+ en:
4
+ views:
5
+ pagination:
6
+ first: "&laquo; First"
7
+ last: "Last &raquo;"
8
+ previous: "&lsaquo; Prev"
9
+ next: "Next &rsaquo;"
10
+ truncate: "..."
@@ -0,0 +1,10 @@
1
+ # Sample localization file for Kaminari. You can override these values in your app's locales file if you want.
2
+
3
+ it:
4
+ views:
5
+ pagination:
6
+ first: "&laquo; Prima"
7
+ last: "Ultima &raquo;"
8
+ previous: "&lsaquo; Indietro"
9
+ next: "Avanti &rsaquo;"
10
+ truncate: "..."
@@ -0,0 +1,11 @@
1
+ # Put here application's params
2
+
3
+ CONFIG = {
4
+ :application => {
5
+ :name => "<%= app_name %>",
6
+ :version => "0.0.1",
7
+ :started_at => "<%= Time.now.strftime('%d/%m/%Y') %>",
8
+ :updated_at => "<%= Time.now.strftime('%d/%m/%Y') %>"
9
+ },
10
+ :default_style => "<%= style_name %>"
11
+ }
@@ -0,0 +1,39 @@
1
+ # These helper methods can be called in your template to set variables to be used in the layout
2
+ # This module should be included in all views globally,
3
+ # to do so you may need to add this line to your ApplicationController
4
+ # helper :layout
5
+ module LayoutHelper
6
+ def title(page_title, show_title = true)
7
+ content_for(:title) { page_title.to_s }
8
+ @show_title = show_title
9
+ end
10
+
11
+ def show_title?
12
+ @show_title
13
+ end
14
+
15
+ def secondary_navigation(*items)
16
+ outcome = '<ul>'
17
+ items.compact.each do |h|
18
+ outcome << "<li#{h[:active] ? " class='active'" : ""}>#{h[:value]}</li>"
19
+ end
20
+ outcome << '</ul>'
21
+ outcome << '<div class="clear"></div>'
22
+ content_for(:secondary_navigation) do
23
+ outcome.html_safe
24
+ end
25
+ end
26
+
27
+ def stylesheet(*args)
28
+ content_for(:head) { stylesheet_link_tag(*args) }
29
+ end
30
+
31
+ def javascript(*args)
32
+ content_for(:head) { javascript_include_tag(*args) }
33
+ end
34
+
35
+ #Search image from style path
36
+ def style_image_tag(name,args={})
37
+ image_tag("styles/#{CONFIG[:default_style]}/#{name}",args)
38
+ end
39
+ end
@@ -0,0 +1,48 @@
1
+ #Utility for general purpose
2
+ module Utility
3
+ #Exports data from a collection using fastercsv gem
4
+ def self.export(params={})
5
+ require 'fastercsv'
6
+
7
+ return "" unless params[:collection] && params[:collection].any?
8
+ collection = add_collection params[:collection]
9
+
10
+ head = params[:head]
11
+ head = collection.first.keys if !head && collection && collection.first
12
+ head = [] unless head
13
+
14
+ p18n = params[:i18n]
15
+ p18n = "activerecord.attributes.#{params[:collection].first.class.to_s.downcase.to_sym}" if p18n == true #only if boolean and equal true
16
+ p18n_generic = "activerecord.attributes.generic"
17
+
18
+ str = FasterCSV.generate(:col_sep => params[:col_sep] || ";") do |csv|
19
+ generic_fields = %w(id created_at updated_at)
20
+ head.map!{|e| generic_fields.include?(e) ? I18n.t("#{p18n_generic}.#{e}") : I18n.t("#{p18n}.#{e}")} if p18n
21
+ csv << head
22
+
23
+ collection.each do |record|
24
+ #each record is an hash
25
+ csv << record.values.map do |v|
26
+ case v.class.to_s
27
+ when 'Time', 'Date'
28
+ v.strftime "%d/%m/%Y"
29
+ else
30
+ v
31
+ end
32
+ end
33
+ end
34
+ end
35
+ str
36
+ end
37
+
38
+ protected
39
+ def self.add_collection in_collection
40
+ return unless in_collection && in_collection.any?
41
+ out_collection = []
42
+ in_collection.each do |item|
43
+ h = defined?(item.attributes) ? item.attributes : item
44
+ out_collection << h
45
+ end
46
+ out_collection
47
+ end
48
+ end
@@ -0,0 +1,341 @@
1
+ // MAIN COLORS
2
+ $main_color: <%= options[:main_color] || "rgb(200,200,200)" %>
3
+ $second_color: <%= options[:second_color] || "rgb(250,10,10)" %>
4
+ $main_bg: white
5
+
6
+ // DERIVED COLORS
7
+ $title_color: darken($second_color, 5%)
8
+ $text_color: darken($main_color, 50%)
9
+ $link_color: darken($main_color, 45%)
10
+ $main_bg_dark: darken($main_color, 5%)
11
+ $header_bg: darken($main_color, 60%)
12
+ $header_bg_soft: lighten($header_bg, 17%)
13
+ $header_color: lighten($header_bg, 25%)
14
+ $footer_color: $text_color
15
+ $textbox_color: darken($second_color, 10%)
16
+
17
+ //OTHERS
18
+ $textbox_bg: #f5f5f5 //related to the textbox image
19
+ $table_row_selection_color: rgb(255,255,210)
20
+
21
+ $style_path: styles/<%= style_name %>
22
+
23
+ *
24
+ margin: 0
25
+
26
+ body
27
+ font-family: Tahoma, Verdana, Arial
28
+ font-size: 18px
29
+ background-color: $main_color
30
+ color: $text_color
31
+
32
+ a
33
+ &:link, &:visited
34
+ color: $link_color
35
+ text-decoration: underline
36
+ &:hover, &:active
37
+ color: $second_color
38
+ text-decoration: none
39
+ img
40
+ border: none
41
+
42
+ div#header
43
+ margin: 0px auto
44
+ padding: 0 20px
45
+ background-color: $header_bg
46
+ background: -moz-linear-gradient(center top , $header_bg, $header_bg_soft) repeat scroll 0 0 transparent
47
+ color: $header_color
48
+ border-bottom: 2px solid $title_color
49
+ #app-title
50
+ float: left
51
+ margin: 0
52
+ h1
53
+ color: ligthen($title_color, 20%)
54
+ a
55
+ &:link, &:visited
56
+ color: inherit
57
+ text-decoration: none
58
+ .subtitle
59
+ color: $header_color
60
+ font-size: 0.4em
61
+ #session
62
+ float: right
63
+ font-size: 0.9em
64
+ a
65
+ &:link, &:visited
66
+ color: $second_color
67
+ &:hover, &:active
68
+ color: $second_color
69
+ text-decoration: none
70
+ #user-navigation
71
+ position: absolute
72
+ right: 20px
73
+ top: 0
74
+
75
+ div#wrapper
76
+ margin: 20px
77
+
78
+ div#container
79
+ background-color: $main_bg
80
+ padding: 1em 2em 3em 2em
81
+ border: 1px solid $main_bg_dark
82
+ -moz-border-radius: 0px 10px 10px 10px
83
+ border-radius: 0px 10px 10px 10px
84
+ //-webkit-border-radius: 0px 10px 10px 10px
85
+
86
+
87
+
88
+ div#footer
89
+ p
90
+ color: $footer_color
91
+ font-size: 0.8em
92
+ text-align: center
93
+
94
+
95
+ input, select, textarea
96
+ background: $textbox_bg url($style_path + '/input_background_bn.png') repeat-x scroll 0 0
97
+ color: $textbox_color
98
+ border: 1px solid darken($textbox_bg, 10%)
99
+ -moz-border-radius: 6px
100
+ border-radius: 6px
101
+ font-size: 1.5em
102
+ padding: 0.2em
103
+
104
+ div.navigation
105
+ width: 100%
106
+ margin: 0 auto
107
+ ul
108
+ margin: 0
109
+ padding: 0
110
+ list-style-type: none
111
+ li
112
+ float: left
113
+ &.primary
114
+ ul
115
+ li
116
+ padding: 3px 10px
117
+ /*border: 3px solid $primary_bg*/
118
+ -moz-border-radius: 10px 10px 0px 0px/*Mozzilla Firefox*/
119
+ border-radius: 10px 10px 0px 0px/*Google chrome*/
120
+ margin-right: 5px
121
+ background-color: darken($main_color, 20%)
122
+ border-top: 1px solid darken($main_color, 10%)
123
+ position: relative
124
+ top: 0px
125
+ &.active
126
+ background-color: $main_color
127
+ //border-top: 1px solid lighten($main_color, 10%)
128
+ //font-weight: bold
129
+ border-left: 2px solid $title_color
130
+ border-right: 2px solid $title_color
131
+ border-top: 2px solid $title_color
132
+ top: 2px
133
+ a
134
+ &:link, &:visited, &:hover, &:active
135
+ text-decoration: none
136
+ &.secondary
137
+ ul
138
+ li
139
+ padding: 3px 10px
140
+ -moz-border-radius: 6px 6px 0px 0px/*Mozzilla Firefox*/
141
+ border-radius: 6px 6px 0px 0px/*Google chrome*/
142
+ margin-right: 4px
143
+ background-color: darken($main_color, 20%)
144
+ border-top: 1px solid darken($main_color, 10%)
145
+ position: relative
146
+ top: 1px
147
+ &.active
148
+ //border: 1px solid $main_bg_dark
149
+ border-color: $main_bg_dark $main_bg_dark $main_bg
150
+ border-width: 1px
151
+ border-style: solid
152
+ background-color: $main_bg
153
+ font-weight: bold
154
+ //border-bottom: 5px solid $main_bg
155
+ a
156
+ &:link, &:visited, &:hover, &:active
157
+ text-decoration: none
158
+
159
+ .focused
160
+ border: 1px solid $second_color
161
+
162
+ .button
163
+ border: none
164
+ cursor: pointer
165
+
166
+ &.small
167
+ font-size: 0.85em
168
+ font-weight: bold
169
+ color: $second_color
170
+ height: 40px
171
+ width: 150px
172
+ background: transparent url($style_path + '/bg_but_gray.png') no-repeat
173
+ &:hover
174
+ background-position: 0px -40px
175
+
176
+ &.medium
177
+ font-size: 1.05em
178
+ font-weight: bold
179
+ color: $main_bg
180
+ height: 63px
181
+ width: 170px
182
+ background: transparent url($style_path + '/button_170_126.png') no-repeat
183
+ &:hover
184
+ background-position: 0px -63px
185
+
186
+ &.large
187
+ font-size: 1.2em
188
+ font-weight: bold
189
+ color: $main_bg
190
+ height: 85px
191
+ width: 229px
192
+ background: transparent url($style_path + '/button_229_170.png') no-repeat
193
+ &:hover
194
+ background-position: 0px -85px
195
+
196
+ h1
197
+ color: $title_color
198
+ font-weigth: bold
199
+ margin-bottom: 0.3em
200
+
201
+ h2
202
+ color: $main_color
203
+ margin-bottom: 0.2em
204
+
205
+ h3
206
+ color: lighten($main_color, 20%)
207
+ margin-bottom: 0.15em
208
+
209
+
210
+ .message
211
+ padding: 15px
212
+ padding-left: 70px
213
+ margin: 10px 0
214
+
215
+ &.notice
216
+ background: transparent url($style_path + '/msg_notice.gif') no-repeat 15px 50%
217
+ border-color: #8FDC79
218
+ color: #5FAC49
219
+ &.alert
220
+ background: transparent url($style_path + '/msg_error.gif') no-repeat 15px 50%
221
+ border-color: #C00
222
+ color: #AA0
223
+ &.error
224
+ background: #FFF url($style_path + '/msg_error.gif') no-repeat 15px 50%
225
+ border-color: #C00
226
+ color: #C00
227
+
228
+
229
+ .filter-container
230
+ padding-bottom: 8px
231
+ .filter-field
232
+ float: left
233
+ padding: 4px
234
+
235
+ form
236
+ div.field
237
+ padding: 5px 0
238
+ //input, select, textarea
239
+ // font-size: 1.5em
240
+ // padding: 0.2em
241
+ //-moz-box-shadow: 3px 3px 3px $main_color /* Firefox */
242
+ //box-shadow: 3px 3px 3px $main_color /* Firefox */
243
+ //-moz-border-radius: 6px
244
+ //border-radius: 6px
245
+
246
+ div.actions
247
+ padding: 10px
248
+ //border: 1px dashed $main_color
249
+
250
+ table.user
251
+ width: 100%
252
+ thead
253
+ tr
254
+ &:hover
255
+ background-color: inherit
256
+ th
257
+ //background-color: $main_bg
258
+ color: $title_color
259
+ padding: 0.2em 0.4em
260
+ text-align: left
261
+ &.main
262
+ font-weight: bold
263
+ text-align: center
264
+ tbody
265
+ tr
266
+ line-height: 1.2em
267
+ height: 2.5em
268
+ &.odd
269
+ //background-color: $main_bg
270
+ &.even
271
+ background-color: darken($main_bg, 2%)
272
+ &:hover
273
+ background-color: $table_row_selection_color
274
+ &.selected
275
+ background-color: darken($table_row_selection_color, 20%)
276
+
277
+ td
278
+ padding: 2px
279
+ color: lighten($text_color, 20%)
280
+ .main
281
+ color: $text_color
282
+ font-weight:bold
283
+ text-align:center
284
+
285
+ .separator
286
+ margin: 1em 0
287
+ border-bottom: 1px dashed lighten($second_color, 30%)
288
+
289
+ //Navigation section
290
+ #nav a
291
+ display: block
292
+ #nav td
293
+ padding: 0
294
+ text-align: center
295
+ .cur
296
+ font-weight: bold
297
+ .csb
298
+ background: url($style_path + '/kaminari/nav.png') no-repeat
299
+ overflow: hidden
300
+ background-position: 0 0
301
+ height: 70px
302
+ display: block
303
+ .b
304
+ font-weight: bold
305
+
306
+ .fieldWithErrors
307
+ display: inline
308
+
309
+ #errorExplanation
310
+ width: 400px
311
+ border: 2px solid #CF0000
312
+ padding: 0px
313
+ padding-bottom: 12px
314
+ margin-bottom: 20px
315
+ background-color: #f0f0f0
316
+
317
+ h2
318
+ text-align: left
319
+ font-weight: bold
320
+ padding: 5px 5px 5px 15px
321
+ font-size: 12px
322
+ margin: 0
323
+ background-color: #c00
324
+ color: #fff
325
+
326
+ p
327
+ color: #333
328
+ margin-bottom: 0
329
+ padding: 8px
330
+
331
+ ul
332
+ margin: 2px 24px
333
+
334
+ li
335
+ font-size: 12px
336
+ list-style: disc
337
+
338
+ .clear
339
+ clear: both
340
+ height: 0
341
+ overflow: hidden
@@ -0,0 +1,5 @@
1
+ <% if current_page.last? %>
2
+ <span class="csb" style="background-position:-150px 0;width:106px"></span>
3
+ <% else %>
4
+ <%= link_to raw("<span class='csb ch' style='background-position:-150px 0;width:126px'></span><span style='display:block;margin-left:53px;text-decoration:underline'>#{t('views.pagination.next')}</span>"), url, :class => 'pn knavi', :id => 'pnnext', :style => 'text-align:left;text-decoration:none', :remote => remote %>
5
+ <% end %>
@@ -0,0 +1,5 @@
1
+ <% if page.current? %>
2
+ <td class="cur"><span class="csb" style="background-position:-76px 0;width:33px"></span><%= page %></td>
3
+ <% else %>
4
+ <td><%= link_to raw(%Q[<span class="csb ch" style="background-position:-118px 0;width:25px"></span>#{page}]), url, :class => 'fl', :remote => remote %></td>
5
+ <% end %>
@@ -0,0 +1,7 @@
1
+ <%= paginator.render do -%>
2
+ <table id="nav" style="border-collapse:collapse;text-align:left;direction:ltr;margin:0 auto"><tbody><tr valign="top">
3
+ <td class="b"><%= prev_page_tag -%></td>
4
+ <% each_page.select(&:inside_window?).each do |page| %><%= page_tag page -%><% end %>
5
+ <td class="b"><%= next_page_tag -%></td>
6
+ </tr></tbody></table>
7
+ <% end %>