splendeo-generators 0.1.3 → 0.2.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.
- data/rails_generators/splendeo_layout/splendeo_layout_generator.rb +43 -23
- data/rails_generators/splendeo_layout/templates/config/initializers/formtastic.rb +52 -0
- data/rails_generators/splendeo_layout/templates/config/locales/en.yml +14 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → css/blueprint}/ie.css +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/buttons/icons/cross.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/buttons/icons/key.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/buttons/icons/tick.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/buttons/readme.txt +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → css/blueprint}/plugins/buttons/screen.css +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/fancy-type/readme.txt +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → css/blueprint}/plugins/fancy-type/screen.css +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/link-icons/icons/doc.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/link-icons/icons/email.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/link-icons/icons/external.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/link-icons/icons/feed.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/link-icons/icons/im.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/link-icons/icons/pdf.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/link-icons/icons/visited.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/link-icons/icons/xls.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/link-icons/readme.txt +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → css/blueprint}/plugins/link-icons/screen.css +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → css/blueprint}/plugins/rtl/readme.txt +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → css/blueprint}/plugins/rtl/screen.css +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → css/blueprint}/print.css +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → css/blueprint}/screen.css +0 -0
- data/rails_generators/splendeo_layout/templates/css/formtastic.css +138 -0
- data/rails_generators/splendeo_layout/templates/css/formtastic_changes.css +10 -0
- data/rails_generators/splendeo_layout/templates/{stylesheet.css → css/stylesheet.css} +0 -0
- data/rails_generators/splendeo_layout/templates/layout.html.erb +3 -0
- data/rails_generators/splendeo_layout/templates/layout.html.haml +10 -7
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → sass/blueprint}/ie.sass +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/buttons/icons/cross.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/buttons/icons/key.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/buttons/icons/tick.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/buttons/readme.txt +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → sass/blueprint}/plugins/buttons/screen.sass +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/fancy-type/readme.txt +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → sass/blueprint}/plugins/fancy-type/screen.sass +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/link-icons/icons/doc.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/link-icons/icons/email.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/link-icons/icons/external.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/link-icons/icons/feed.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/link-icons/icons/im.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/link-icons/icons/pdf.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/link-icons/icons/visited.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/link-icons/icons/xls.png +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/link-icons/readme.txt +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → sass/blueprint}/plugins/link-icons/screen.sass +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/rtl/readme.txt +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → sass/blueprint}/plugins/rtl/screen.sass +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → sass/blueprint}/print.sass +0 -0
- data/rails_generators/splendeo_layout/templates/{blueprint-sass → sass/blueprint}/screen.sass +0 -0
- data/rails_generators/splendeo_layout/templates/sass/formtastic.sass +178 -0
- data/rails_generators/splendeo_layout/templates/sass/formtastic_changes.sass +11 -0
- data/rails_generators/splendeo_layout/templates/{stylesheet.sass → sass/stylesheet.sass} +0 -0
- data/rails_generators/splendeo_layout/templates/{haml → vendor/plugins/haml}/init.rb +0 -0
- data/rails_generators/splendeo_scaffold/templates/actions/create.rb +1 -1
- data/rails_generators/splendeo_scaffold/templates/actions/destroy.rb +1 -1
- data/rails_generators/splendeo_scaffold/templates/actions/update.rb +1 -1
- data/rails_generators/splendeo_scaffold/templates/views/erb/_form.html.erb +7 -9
- data/rails_generators/splendeo_scaffold/templates/views/erb/edit.html.erb +3 -3
- data/rails_generators/splendeo_scaffold/templates/views/erb/index.html.erb +5 -5
- data/rails_generators/splendeo_scaffold/templates/views/erb/new.html.erb +2 -2
- data/rails_generators/splendeo_scaffold/templates/views/erb/show.html.erb +5 -5
- data/rails_generators/splendeo_scaffold/templates/views/haml/_form.html.haml +6 -10
- data/rails_generators/splendeo_scaffold/templates/views/haml/edit.html.haml +3 -3
- data/rails_generators/splendeo_scaffold/templates/views/haml/index.html.haml +5 -5
- data/rails_generators/splendeo_scaffold/templates/views/haml/new.html.haml +2 -2
- data/rails_generators/splendeo_scaffold/templates/views/haml/show.html.haml +6 -5
- metadata +57 -50
|
@@ -9,29 +9,42 @@ class SplendeoLayoutGenerator < Rails::Generator::Base
|
|
|
9
9
|
m.directory 'app/views/layouts'
|
|
10
10
|
m.directory 'public/stylesheets'
|
|
11
11
|
m.directory 'app/helpers'
|
|
12
|
+
m.directory 'config/initializers'
|
|
13
|
+
m.file 'config/initializers/formtastic.rb', 'config/initializers/formtastic.rb' unless options[:skip_formtastic]
|
|
14
|
+
|
|
15
|
+
unless options[:skip_locale]
|
|
16
|
+
m.file 'config/locales/en.yml', 'config/locales/en.yml'
|
|
17
|
+
end
|
|
12
18
|
|
|
13
19
|
if options[:haml]
|
|
20
|
+
|
|
14
21
|
m.directory 'vendor/plugins/haml'
|
|
15
22
|
m.directory 'public/stylesheets/sass'
|
|
16
|
-
m.directory 'public/stylesheets/sass/blueprint
|
|
17
|
-
m.directory 'public/stylesheets/sass/blueprint
|
|
18
|
-
m.directory 'public/stylesheets/sass/blueprint
|
|
19
|
-
m.directory 'public/stylesheets/sass/blueprint
|
|
20
|
-
m.directory 'public/stylesheets/sass/blueprint
|
|
21
|
-
m.directory 'public/stylesheets/sass/blueprint
|
|
23
|
+
m.directory 'public/stylesheets/sass/blueprint'
|
|
24
|
+
m.directory 'public/stylesheets/sass/blueprint/plugins'
|
|
25
|
+
m.directory 'public/stylesheets/sass/blueprint/plugins/buttons'
|
|
26
|
+
m.directory 'public/stylesheets/sass/blueprint/plugins/fancy-type'
|
|
27
|
+
m.directory 'public/stylesheets/sass/blueprint/plugins/link-icons'
|
|
28
|
+
m.directory 'public/stylesheets/sass/blueprint/plugins/rtl'
|
|
22
29
|
|
|
23
|
-
m.file 'haml/init.rb', 'vendor/plugins/haml/init.rb'
|
|
24
|
-
m.file '
|
|
25
|
-
m.file '
|
|
26
|
-
m.file '
|
|
27
|
-
m.file '
|
|
28
|
-
m.file '
|
|
29
|
-
m.file '
|
|
30
|
-
m.file '
|
|
30
|
+
m.file 'vendor/plugins/haml/init.rb', 'vendor/plugins/haml/init.rb'
|
|
31
|
+
m.file 'sass/blueprint/ie.sass', 'public/stylesheets/sass/blueprint/ie.sass'
|
|
32
|
+
m.file 'sass/blueprint/print.sass', 'public/stylesheets/sass/blueprint/print.sass'
|
|
33
|
+
m.file 'sass/blueprint/screen.sass', 'public/stylesheets/sass/blueprint/screen.sass'
|
|
34
|
+
m.file 'sass/blueprint/plugins/buttons/screen.sass', 'public/stylesheets/sass/blueprint/plugins/buttons/screen.sass'
|
|
35
|
+
m.file 'sass/blueprint/plugins/fancy-type/screen.sass', 'public/stylesheets/sass/blueprint/plugins/fancy-type/screen.sass'
|
|
36
|
+
m.file 'sass/blueprint/plugins/link-icons/screen.sass', 'public/stylesheets/sass/blueprint/plugins/link-icons/screen.sass'
|
|
37
|
+
m.file 'sass/blueprint/plugins/rtl/screen.sass', 'public/stylesheets/sass/blueprint/plugins/rtl/screen.sass'
|
|
31
38
|
|
|
32
39
|
m.template "layout.html.haml", "app/views/layouts/#{file_name}.html.haml"
|
|
33
|
-
m.file "stylesheet.sass", "public/stylesheets/sass/#{file_name}.sass"
|
|
40
|
+
m.file "sass/stylesheet.sass", "public/stylesheets/sass/#{file_name}.sass"
|
|
41
|
+
|
|
42
|
+
unless options[:skip_formtastic]
|
|
43
|
+
m.file 'sass/formtastic.sass', 'public/stylesheets/sass/formtastic.sass'
|
|
44
|
+
m.file 'sass/formtastic_changes.sass', 'public/stylesheets/sass/formtastic_changes.sass'
|
|
45
|
+
end
|
|
34
46
|
else
|
|
47
|
+
|
|
35
48
|
m.directory 'public/stylesheets/blueprint'
|
|
36
49
|
m.directory 'public/stylesheets/blueprint/plugins'
|
|
37
50
|
m.directory 'public/stylesheets/blueprint/plugins/buttons'
|
|
@@ -39,16 +52,21 @@ class SplendeoLayoutGenerator < Rails::Generator::Base
|
|
|
39
52
|
m.directory 'public/stylesheets/blueprint/plugins/link-icons'
|
|
40
53
|
m.directory 'public/stylesheets/blueprint/plugins/rtl'
|
|
41
54
|
|
|
42
|
-
m.file 'blueprint/ie.css', 'public/stylesheets/blueprint/ie.css'
|
|
43
|
-
m.file 'blueprint/print.css', 'public/stylesheets/blueprint/print.css'
|
|
44
|
-
m.file 'blueprint/screen.css', 'public/stylesheets/blueprint/screen.css'
|
|
45
|
-
m.file 'blueprint/plugins/buttons/screen.css', 'public/stylesheets/blueprint/plugins/buttons/screen.css'
|
|
46
|
-
m.file 'blueprint/plugins/fancy-type/screen.css', 'public/stylesheets/blueprint/plugins/fancy-type/screen.css'
|
|
47
|
-
m.file 'blueprint/plugins/link-icons/screen.css', 'public/stylesheets/blueprint/plugins/link-icons/screen.css'
|
|
48
|
-
m.file 'blueprint/plugins/rtl/screen.css', 'public/stylesheets/blueprint/plugins/rtl/screen.css'
|
|
55
|
+
m.file 'css/blueprint/ie.css', 'public/stylesheets/blueprint/ie.css'
|
|
56
|
+
m.file 'css/blueprint/print.css', 'public/stylesheets/blueprint/print.css'
|
|
57
|
+
m.file 'css/blueprint/screen.css', 'public/stylesheets/blueprint/screen.css'
|
|
58
|
+
m.file 'css/blueprint/plugins/buttons/screen.css', 'public/stylesheets/blueprint/plugins/buttons/screen.css'
|
|
59
|
+
m.file 'css/blueprint/plugins/fancy-type/screen.css', 'public/stylesheets/blueprint/plugins/fancy-type/screen.css'
|
|
60
|
+
m.file 'css/blueprint/plugins/link-icons/screen.css', 'public/stylesheets/blueprint/plugins/link-icons/screen.css'
|
|
61
|
+
m.file 'css/blueprint/plugins/rtl/screen.css', 'public/stylesheets/blueprint/plugins/rtl/screen.css'
|
|
49
62
|
|
|
50
63
|
m.template "layout.html.erb", "app/views/layouts/#{file_name}.html.erb"
|
|
51
|
-
m.file "stylesheet.css", "public/stylesheets/#{file_name}.css"
|
|
64
|
+
m.file "css/stylesheet.css", "public/stylesheets/#{file_name}.css"
|
|
65
|
+
|
|
66
|
+
unless options[:skip_formtastic]
|
|
67
|
+
m.file 'css/formtastic.css', 'public/stylesheets/formtastic.css'
|
|
68
|
+
m.file 'css/formtastic_changes.css', 'public/stylesheets/formtastic_changes.css'
|
|
69
|
+
end
|
|
52
70
|
end
|
|
53
71
|
m.file "helper.rb", "app/helpers/layout_helper.rb"
|
|
54
72
|
end
|
|
@@ -64,6 +82,8 @@ class SplendeoLayoutGenerator < Rails::Generator::Base
|
|
|
64
82
|
opt.separator ''
|
|
65
83
|
opt.separator 'Options:'
|
|
66
84
|
opt.on("--haml", "Generate HAML for view, and SASS for stylesheet.") { |v| options[:haml] = v }
|
|
85
|
+
opt.on("--skip-locale", "Skips the generation of a locale file") { |v| options[:skip_locale] = true }
|
|
86
|
+
opt.on("--skip-formtastic", "Skips the generation formtastic-related files") { |v| options[:skip_formtastic] = true }
|
|
67
87
|
end
|
|
68
88
|
|
|
69
89
|
def banner
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Set the default text field size when input is a string. Default is 50.
|
|
2
|
+
# Formtastic::SemanticFormBuilder.default_text_field_size = 50
|
|
3
|
+
|
|
4
|
+
# Should all fields be considered "required" by default?
|
|
5
|
+
# Defaults to true, see ValidationReflection notes below.
|
|
6
|
+
# Formtastic::SemanticFormBuilder.all_fields_required_by_default = true
|
|
7
|
+
|
|
8
|
+
# Should select fields have a blank option/prompt by default?
|
|
9
|
+
# Defaults to true.
|
|
10
|
+
# Formtastic::SemanticFormBuilder.include_blank_for_select_by_default = true
|
|
11
|
+
|
|
12
|
+
# Set the string that will be appended to the labels/fieldsets which are required
|
|
13
|
+
# It accepts string or procs and the default is a localized version of
|
|
14
|
+
# '<abbr title="required">*</abbr>'. In other words, if you configure formtastic.required
|
|
15
|
+
# in your locale, it will replace the abbr title properly. But if you don't want to use
|
|
16
|
+
# abbr tag, you can simply give a string as below
|
|
17
|
+
# Formtastic::SemanticFormBuilder.required_string = "(required)"
|
|
18
|
+
|
|
19
|
+
# Set the string that will be appended to the labels/fieldsets which are optional
|
|
20
|
+
# Defaults to an empty string ("") and also accepts procs (see required_string above)
|
|
21
|
+
# Formtastic::SemanticFormBuilder.optional_string = "(optional)"
|
|
22
|
+
|
|
23
|
+
# Set the way inline errors will be displayed.
|
|
24
|
+
# Defaults to :sentence, valid options are :sentence, :list and :none
|
|
25
|
+
# Formtastic::SemanticFormBuilder.inline_errors = :sentence
|
|
26
|
+
|
|
27
|
+
# Set the method to call on label text to transform or format it for human-friendly
|
|
28
|
+
# reading when formtastic is user without object. Defaults to :humanize.
|
|
29
|
+
# Formtastic::SemanticFormBuilder.label_str_method = :humanize
|
|
30
|
+
|
|
31
|
+
# Set the array of methods to try calling on parent objects in :select and :radio inputs
|
|
32
|
+
# for the text inside each @<option>@ tag or alongside each radio @<input>@. The first method
|
|
33
|
+
# that is found on the object will be used.
|
|
34
|
+
# Defaults to ["to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
|
|
35
|
+
# Formtastic::SemanticFormBuilder.collection_label_methods = [
|
|
36
|
+
# "to_label", "display_name", "full_name", "name", "title", "username", "login", "value", "to_s"]
|
|
37
|
+
|
|
38
|
+
# Formtastic by default renders inside li tags the input, hints and then
|
|
39
|
+
# errors messages. Sometimes you want the hints to be rendered first than
|
|
40
|
+
# the input, in the following order: hints, input and errors. You can
|
|
41
|
+
# customize it doing just as below:
|
|
42
|
+
# Formtastic::SemanticFormBuilder.inline_order = [:input, :hints, :errors]
|
|
43
|
+
|
|
44
|
+
# Specifies if labels/hints for input fields automatically be looked up using I18n.
|
|
45
|
+
# Default value: false. Overridden for specific fields by setting value to true,
|
|
46
|
+
# i.e. :label => true, or :hint => true (or opposite depending on initialized value)
|
|
47
|
+
# Formtastic::SemanticFormBuilder.i18n_lookups_by_default = false
|
|
48
|
+
|
|
49
|
+
# You can add custom inputs or override parts of Formtastic by subclassing SemanticFormBuilder and
|
|
50
|
+
# specifying that class here. Defaults to SemanticFormBuilder.
|
|
51
|
+
# Formtastic::SemanticFormHelper.builder = MyCustomBuilder
|
|
52
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
en:
|
|
2
|
+
back_to_list_link: "Back to List"
|
|
3
|
+
destroy_confirmation: "Are you sure?"
|
|
4
|
+
destroy_link: "Destroy"
|
|
5
|
+
edit_link: "Edit"
|
|
6
|
+
edit_title: "Edit {{model}}"
|
|
7
|
+
new_link: "New {{model}}"
|
|
8
|
+
new_title: "New {{model}}"
|
|
9
|
+
show_link: "Show"
|
|
10
|
+
view_all_link: "View All"
|
|
11
|
+
|
|
12
|
+
flash_notice_successfully_created: "Successfully created {{model}}"
|
|
13
|
+
flash_notice_successfully_destroyed: "Successfully destroyed {{model}}"
|
|
14
|
+
flash_notice_successfully_updated: "Successfully destroyed {{model}}"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/rails_generators/splendeo_layout/templates/{blueprint → css/blueprint}/plugins/rtl/screen.css
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/* -------------------------------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
It's *strongly* suggested that you don't modify this file. Instead, load a new stylesheet after
|
|
4
|
+
this one in your layouts (eg formtastic_changes.css) and override the styles to suit your needs.
|
|
5
|
+
This will allow you to update formtastic.css with new releases without clobbering your own changes.
|
|
6
|
+
|
|
7
|
+
This stylesheet forms part of the Formtastic Rails Plugin
|
|
8
|
+
(c) 2008 Justin French
|
|
9
|
+
|
|
10
|
+
--------------------------------------------------------------------------------------------------*/
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
/* NORMALIZE AND RESET - obviously inspired by Yahoo's reset.css, but scoped to just form.formtastic
|
|
14
|
+
--------------------------------------------------------------------------------------------------*/
|
|
15
|
+
form.formtastic, form.formtastic ul, form.formtastic ol, form.formtastic li, form.formtastic fieldset, form.formtastic legend, form.formtastic input, form.formtastic textarea, form.formtastic select, form.formtastic p { margin:0; padding:0; }
|
|
16
|
+
form.formtastic fieldset { border:0; }
|
|
17
|
+
form.formtastic em, form.formtastic strong { font-style:normal; font-weight:normal; }
|
|
18
|
+
form.formtastic ol, form.formtastic ul { list-style:none; }
|
|
19
|
+
form.formtastic abbr, form.formtastic acronym { border:0; font-variant:normal; }
|
|
20
|
+
form.formtastic input, form.formtastic textarea, form.formtastic select { font-family:inherit; font-size:inherit; font-weight:inherit; }
|
|
21
|
+
form.formtastic input, form.formtastic textarea, form.formtastic select { font-size:100%; }
|
|
22
|
+
form.formtastic legend { color:#000; }
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/* FIELDSETS & LISTS
|
|
26
|
+
--------------------------------------------------------------------------------------------------*/
|
|
27
|
+
form.formtastic fieldset { }
|
|
28
|
+
form.formtastic fieldset.inputs { }
|
|
29
|
+
form.formtastic fieldset.buttons { padding-left:25%; }
|
|
30
|
+
form.formtastic fieldset ol { }
|
|
31
|
+
form.formtastic fieldset.buttons li { float:left; padding-right:0.5em; }
|
|
32
|
+
|
|
33
|
+
/* clearfixing the fieldsets */
|
|
34
|
+
form.formtastic fieldset { display: inline-block; }
|
|
35
|
+
form.formtastic fieldset:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
|
36
|
+
html[xmlns] form.formtastic fieldset { display: block; }
|
|
37
|
+
* html form.formtastic fieldset { height: 1%; }
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
/* INPUT LIs
|
|
41
|
+
--------------------------------------------------------------------------------------------------*/
|
|
42
|
+
form.formtastic fieldset ol li { margin-bottom:1.5em; }
|
|
43
|
+
|
|
44
|
+
/* clearfixing the li's */
|
|
45
|
+
form.formtastic fieldset ol li { display: inline-block; }
|
|
46
|
+
form.formtastic fieldset ol li:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
|
47
|
+
html[xmlns] form.formtastic fieldset ol li { display: block; }
|
|
48
|
+
* html form.formtastic fieldset ol li { height: 1%; }
|
|
49
|
+
|
|
50
|
+
form.formtastic fieldset ol li.required { }
|
|
51
|
+
form.formtastic fieldset ol li.optional { }
|
|
52
|
+
form.formtastic fieldset ol li.error { }
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
/* LABELS
|
|
56
|
+
--------------------------------------------------------------------------------------------------*/
|
|
57
|
+
form.formtastic fieldset ol li label { display:block; width:25%; float:left; padding-top:.2em; }
|
|
58
|
+
form.formtastic fieldset ol li li label { line-height:100%; padding-top:0; }
|
|
59
|
+
form.formtastic fieldset ol li li label input { line-height:100%; vertical-align:middle; margin-top:-0.1em;}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
/* NESTED FIELDSETS AND LEGENDS (radio, check boxes and date/time inputs use nested fieldsets)
|
|
63
|
+
--------------------------------------------------------------------------------------------------*/
|
|
64
|
+
form.formtastic fieldset ol li fieldset { position:relative; }
|
|
65
|
+
form.formtastic fieldset ol li fieldset legend { position:absolute; width:25%; padding-top:0.1em; }
|
|
66
|
+
form.formtastic fieldset ol li fieldset legend span { position:absolute; }
|
|
67
|
+
form.formtastic fieldset ol li fieldset legend.label label { position:absolute; }
|
|
68
|
+
form.formtastic fieldset ol li fieldset ol { float:left; width:74%; margin:0; padding:0 0 0 25%; }
|
|
69
|
+
form.formtastic fieldset ol li fieldset ol li { padding:0; border:0; }
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/* INLINE HINTS
|
|
73
|
+
--------------------------------------------------------------------------------------------------*/
|
|
74
|
+
form.formtastic fieldset ol li p.inline-hints { color:#666; margin:0.5em 0 0 25%; }
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
/* INLINE ERRORS
|
|
78
|
+
--------------------------------------------------------------------------------------------------*/
|
|
79
|
+
form.formtastic fieldset ol li p.inline-errors { color:#cc0000; margin:0.5em 0 0 25%; }
|
|
80
|
+
form.formtastic fieldset ol li ul.errors { color:#cc0000; margin:0.5em 0 0 25%; list-style:square; }
|
|
81
|
+
form.formtastic fieldset ol li ul.errors li { padding:0; border:none; display:list-item; }
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
/* STRING & NUMERIC OVERRIDES
|
|
85
|
+
--------------------------------------------------------------------------------------------------*/
|
|
86
|
+
form.formtastic fieldset ol li.string input { width:74%; }
|
|
87
|
+
form.formtastic fieldset ol li.password input { width:74%; }
|
|
88
|
+
form.formtastic fieldset ol li.numeric input { width:74%; }
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
/* TEXTAREA OVERRIDES
|
|
92
|
+
--------------------------------------------------------------------------------------------------*/
|
|
93
|
+
form.formtastic fieldset ol li.text textarea { width:74%; }
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
/* HIDDEN OVERRIDES
|
|
97
|
+
--------------------------------------------------------------------------------------------------*/
|
|
98
|
+
form.formtastic fieldset ol li.hidden { display:none; }
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
/* BOOLEAN OVERRIDES
|
|
102
|
+
--------------------------------------------------------------------------------------------------*/
|
|
103
|
+
form.formtastic fieldset ol li.boolean label { padding-left:25%; width:auto; }
|
|
104
|
+
form.formtastic fieldset ol li.boolean label input { margin:0 0.5em 0 0.2em; }
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
/* RADIO OVERRIDES
|
|
108
|
+
--------------------------------------------------------------------------------------------------*/
|
|
109
|
+
form.formtastic fieldset ol li.radio { }
|
|
110
|
+
form.formtastic fieldset ol li.radio fieldset ol { margin-bottom:-0.6em; }
|
|
111
|
+
form.formtastic fieldset ol li.radio fieldset ol li { margin:0.1em 0 0.5em 0; }
|
|
112
|
+
form.formtastic fieldset ol li.radio fieldset ol li label { float:none; width:100%; }
|
|
113
|
+
form.formtastic fieldset ol li.radio fieldset ol li label input { margin-right:0.2em; }
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
/* CHECK BOXES (COLLECTION) OVERRIDES
|
|
117
|
+
--------------------------------------------------------------------------------------------------*/
|
|
118
|
+
form.formtastic fieldset ol li.check_boxes { }
|
|
119
|
+
form.formtastic fieldset ol li.check_boxes fieldset ol { margin-bottom:-0.6em; }
|
|
120
|
+
form.formtastic fieldset ol li.check_boxes fieldset ol li { margin:0.1em 0 0.5em 0; }
|
|
121
|
+
form.formtastic fieldset ol li.check_boxes fieldset ol li label { float:none; width:100%; }
|
|
122
|
+
form.formtastic fieldset ol li.check_boxes fieldset ol li label input { margin-right:0.2em; }
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
/* DATE & TIME OVERRIDES
|
|
127
|
+
--------------------------------------------------------------------------------------------------*/
|
|
128
|
+
form.formtastic fieldset ol li.date fieldset ol li,
|
|
129
|
+
form.formtastic fieldset ol li.time fieldset ol li,
|
|
130
|
+
form.formtastic fieldset ol li.datetime fieldset ol li { float:left; width:auto; margin:0 .3em 0 0; }
|
|
131
|
+
|
|
132
|
+
form.formtastic fieldset ol li.date fieldset ol li label,
|
|
133
|
+
form.formtastic fieldset ol li.time fieldset ol li label,
|
|
134
|
+
form.formtastic fieldset ol li.datetime fieldset ol li label { display:none; }
|
|
135
|
+
|
|
136
|
+
form.formtastic fieldset ol li.date fieldset ol li label input,
|
|
137
|
+
form.formtastic fieldset ol li.time fieldset ol li label input,
|
|
138
|
+
form.formtastic fieldset ol li.datetime fieldset ol li label input { display:inline; margin:0; padding:0; }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* -------------------------------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
Load this stylesheet after formtastic.css in your layouts to override the CSS to suit your needs.
|
|
4
|
+
This will allow you to update formtastic.css with new releases without clobbering your own changes.
|
|
5
|
+
|
|
6
|
+
For example, to make the inline hint paragraphs a little darker in color than the standard #666:
|
|
7
|
+
|
|
8
|
+
form.formtastic fieldset ol li p.inline-hints { color:#333; }
|
|
9
|
+
|
|
10
|
+
--------------------------------------------------------------------------------------------------*/
|
|
File without changes
|
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
<!-- <%%= stylesheet_link_tag 'blueprint/plugins/link-icons/screen.css', :media => 'screen, projection' %> -->
|
|
16
16
|
<!-- <%%= stylesheet_link_tag 'blueprint/plugins/rtl/screen.css', :media => 'screen, projection' %> -->
|
|
17
17
|
|
|
18
|
+
<%%= stylesheet_link_tag 'formtastic' %>
|
|
19
|
+
<%%= stylesheet_link_tag 'formtastic_changes' %>
|
|
20
|
+
|
|
18
21
|
<%%= stylesheet_link_tag '<%= file_name %>' %>
|
|
19
22
|
<%%= yield(:head) %>
|
|
20
23
|
</head>
|
|
@@ -6,16 +6,19 @@
|
|
|
6
6
|
= h(yield(:title) || "Untitled")
|
|
7
7
|
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
|
|
8
8
|
|
|
9
|
-
= stylesheet_link_tag 'blueprint
|
|
10
|
-
= stylesheet_link_tag 'blueprint
|
|
9
|
+
= stylesheet_link_tag 'blueprint/screen.css', :media => 'screen, projection'
|
|
10
|
+
= stylesheet_link_tag 'blueprint/print.css', :media => 'print'
|
|
11
11
|
/[if lt IE 8]
|
|
12
|
-
= stylesheet_link_tag 'blueprint
|
|
12
|
+
= stylesheet_link_tag 'blueprint/ie.css', :media => 'screen, projection'
|
|
13
13
|
|
|
14
14
|
/ uncomment for activating blueprint plugins
|
|
15
|
-
/= stylesheet_link_tag 'blueprint
|
|
16
|
-
/= stylesheet_link_tag 'blueprint
|
|
17
|
-
/= stylesheet_link_tag 'blueprint
|
|
18
|
-
/= stylesheet_link_tag 'blueprint
|
|
15
|
+
/= stylesheet_link_tag 'blueprint/plugins/buttons/screen.css', :media => 'screen, projection'
|
|
16
|
+
/= stylesheet_link_tag 'blueprint/plugins/fancy-type/screen.css', :media => 'screen, projection'
|
|
17
|
+
/= stylesheet_link_tag 'blueprint/plugins/link-icons/screen.css', :media => 'screen, projection'
|
|
18
|
+
/= stylesheet_link_tag 'blueprint/plugins/rtl/screen.css', :media => 'screen, projection'
|
|
19
|
+
|
|
20
|
+
= stylesheet_link_tag 'formtastic.css', :media => 'screen, projection'
|
|
21
|
+
= stylesheet_link_tag 'formtastic_changes.css', :media => 'print'
|
|
19
22
|
|
|
20
23
|
= stylesheet_link_tag '<%= file_name %>'
|
|
21
24
|
= yield(:head)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/rails_generators/splendeo_layout/templates/{blueprint → sass/blueprint}/plugins/rtl/readme.txt
RENAMED
|
File without changes
|
|
File without changes
|
data/rails_generators/splendeo_layout/templates/{blueprint-sass → sass/blueprint}/print.sass
RENAMED
|
File without changes
|
data/rails_generators/splendeo_layout/templates/{blueprint-sass → sass/blueprint}/screen.sass
RENAMED
|
File without changes
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
// do not modify this file. Instead, add changes in formtastic_changes.sass
|
|
2
|
+
|
|
3
|
+
form.formtastic
|
|
4
|
+
margin: 0
|
|
5
|
+
padding: 0
|
|
6
|
+
|
|
7
|
+
ul, ol, li, fieldset, legend, input, textarea, select, p
|
|
8
|
+
margin: 0
|
|
9
|
+
padding: 0
|
|
10
|
+
|
|
11
|
+
fieldset
|
|
12
|
+
border: 0
|
|
13
|
+
|
|
14
|
+
em, strong
|
|
15
|
+
font-style: normal
|
|
16
|
+
font-weight: normal
|
|
17
|
+
|
|
18
|
+
ol, ul
|
|
19
|
+
list-style: none
|
|
20
|
+
|
|
21
|
+
abbr, acronym
|
|
22
|
+
border: 0
|
|
23
|
+
font-variant: normal
|
|
24
|
+
|
|
25
|
+
input, textarea, select
|
|
26
|
+
font-family: inherit
|
|
27
|
+
font-size: inherit
|
|
28
|
+
font-weight: inherit
|
|
29
|
+
|
|
30
|
+
input, textarea, select
|
|
31
|
+
font-size: 100%
|
|
32
|
+
|
|
33
|
+
legend
|
|
34
|
+
color: #000
|
|
35
|
+
|
|
36
|
+
fieldset
|
|
37
|
+
display: inline-block
|
|
38
|
+
|
|
39
|
+
&.inputs
|
|
40
|
+
&.buttons
|
|
41
|
+
padding-left: 25%
|
|
42
|
+
|
|
43
|
+
ol
|
|
44
|
+
&.buttons li
|
|
45
|
+
float: left
|
|
46
|
+
padding-right: 0.5em
|
|
47
|
+
|
|
48
|
+
&:after
|
|
49
|
+
content: "."
|
|
50
|
+
display: block
|
|
51
|
+
height: 0
|
|
52
|
+
clear: both
|
|
53
|
+
visibility: hidden
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
html[xmlns] form.formtastic fieldset
|
|
57
|
+
display: block
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
* html form.formtastic fieldset
|
|
61
|
+
height: 1%
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
form.formtastic fieldset ol li
|
|
65
|
+
margin-bottom: 1.5em
|
|
66
|
+
display: inline-block
|
|
67
|
+
|
|
68
|
+
&:after
|
|
69
|
+
content: "."
|
|
70
|
+
display: block
|
|
71
|
+
height: 0
|
|
72
|
+
clear: both
|
|
73
|
+
visibility: hidden
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
html[xmlns] form.formtastic fieldset ol li
|
|
77
|
+
display: block
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
* html form.formtastic fieldset ol li
|
|
81
|
+
height: 1%
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
form.formtastic fieldset ol li
|
|
85
|
+
&.required, &.optional, &.error
|
|
86
|
+
label
|
|
87
|
+
display: block
|
|
88
|
+
width: 25%
|
|
89
|
+
float: left
|
|
90
|
+
padding-top: .2em
|
|
91
|
+
|
|
92
|
+
li label
|
|
93
|
+
line-height: 100%
|
|
94
|
+
padding-top: 0
|
|
95
|
+
|
|
96
|
+
input
|
|
97
|
+
line-height: 100%
|
|
98
|
+
vertical-align: middle
|
|
99
|
+
margin-top: -0.1em
|
|
100
|
+
|
|
101
|
+
fieldset
|
|
102
|
+
position: relative
|
|
103
|
+
|
|
104
|
+
legend
|
|
105
|
+
position: absolute
|
|
106
|
+
width: 25%
|
|
107
|
+
padding-top: 0.1em
|
|
108
|
+
|
|
109
|
+
span, &.label label
|
|
110
|
+
position: absolute
|
|
111
|
+
|
|
112
|
+
ol
|
|
113
|
+
float: left
|
|
114
|
+
width: 74%
|
|
115
|
+
margin: 0
|
|
116
|
+
padding: 0 0 0 25%
|
|
117
|
+
|
|
118
|
+
li
|
|
119
|
+
padding: 0
|
|
120
|
+
border: 0
|
|
121
|
+
|
|
122
|
+
p
|
|
123
|
+
&.inline-hints
|
|
124
|
+
color: #666
|
|
125
|
+
margin: 0.5em 0 0 25%
|
|
126
|
+
|
|
127
|
+
&.inline-errors
|
|
128
|
+
color: #cc0000
|
|
129
|
+
margin: 0.5em 0 0 25%
|
|
130
|
+
|
|
131
|
+
ul.errors
|
|
132
|
+
color: #cc0000
|
|
133
|
+
margin: 0.5em 0 0 25%
|
|
134
|
+
list-style: square
|
|
135
|
+
|
|
136
|
+
li
|
|
137
|
+
padding: 0
|
|
138
|
+
border: none
|
|
139
|
+
display: list-item
|
|
140
|
+
|
|
141
|
+
&.string input, &.password input, &.numeric input, &.text textarea
|
|
142
|
+
width: 74%
|
|
143
|
+
|
|
144
|
+
&.hidden
|
|
145
|
+
display: none
|
|
146
|
+
|
|
147
|
+
&.boolean label
|
|
148
|
+
padding-left: 25%
|
|
149
|
+
width: auto
|
|
150
|
+
|
|
151
|
+
input
|
|
152
|
+
margin: 0 0.5em 0 0.2em
|
|
153
|
+
|
|
154
|
+
&.radio fieldset ol, &.check_boxes fieldset ol
|
|
155
|
+
margin-bottom: -0.6em
|
|
156
|
+
|
|
157
|
+
li
|
|
158
|
+
margin: 0.1em 0 0.5em 0
|
|
159
|
+
|
|
160
|
+
label
|
|
161
|
+
float: none
|
|
162
|
+
width: 100%
|
|
163
|
+
|
|
164
|
+
input
|
|
165
|
+
margin-right: 0.2em
|
|
166
|
+
|
|
167
|
+
&.date fieldset ol li, &.time fieldset ol li, &.datetime fieldset ol li
|
|
168
|
+
float: left
|
|
169
|
+
width: auto
|
|
170
|
+
margin: 0 .3em 0 0
|
|
171
|
+
|
|
172
|
+
&.date fieldset ol li label, &.time fieldset ol li label, &.datetime fieldset ol li label
|
|
173
|
+
display: none
|
|
174
|
+
|
|
175
|
+
&.date fieldset ol li label input, &.time fieldset ol li label input, &.datetime fieldset ol li label input
|
|
176
|
+
display: inline
|
|
177
|
+
margin: 0
|
|
178
|
+
padding: 0
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/* -------------------------------------------------------------------------------------------------
|
|
2
|
+
|
|
3
|
+
Load this stylesheet after formtastic.css in your layouts to override the CSS to suit your needs.
|
|
4
|
+
This will allow you to update formtastic.css with new releases without clobbering your own changes.
|
|
5
|
+
|
|
6
|
+
For example, to make the inline hint paragraphs a little darker in color than the standard #666:
|
|
7
|
+
|
|
8
|
+
form.formtastic fieldset ol li p.inline-hints
|
|
9
|
+
color:#333
|
|
10
|
+
|
|
11
|
+
--------------------------------------------------------------------------------------------------*/
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
def create
|
|
2
2
|
@<%= singular_name %> = <%= class_name %>.new(params[:<%= singular_name %>])
|
|
3
3
|
if @<%= singular_name %>.save
|
|
4
|
-
flash[:notice] =
|
|
4
|
+
flash[:notice] = t('flash_notice_successfully_created', :model => <%=class_name%>.human_name)
|
|
5
5
|
redirect_to <%= item_path('url') %>
|
|
6
6
|
else
|
|
7
7
|
render :action => 'new'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
def destroy
|
|
2
2
|
@<%= singular_name %> = <%= class_name %>.find(params[:id])
|
|
3
3
|
@<%= singular_name %>.destroy
|
|
4
|
-
flash[:notice] =
|
|
4
|
+
flash[:notice] = t('flash_notice_successfully_destroyed', :model => <%=class_name%>.human_name)
|
|
5
5
|
redirect_to <%= items_path('url') %>
|
|
6
6
|
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
def update
|
|
2
2
|
@<%= singular_name %> = <%= class_name %>.find(params[:id])
|
|
3
3
|
if @<%= singular_name %>.update_attributes(params[:<%= singular_name %>])
|
|
4
|
-
flash[:notice] =
|
|
4
|
+
flash[:notice] = t('flash_notice_successfully_updated', :model => <%=class_name%>.human_name)
|
|
5
5
|
redirect_to <%= item_path('url') %>
|
|
6
6
|
else
|
|
7
7
|
render :action => 'edit'
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
<%%
|
|
2
|
-
|
|
3
|
-
<%- for attribute in attributes -%>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<%- end -%>
|
|
9
|
-
<p><%%= f.submit "Submit" %></p>
|
|
1
|
+
<%% semantic_form_for @<%= singular_name %> do |f| %>
|
|
2
|
+
<%% f.inputs do %>
|
|
3
|
+
<%- for attribute in attributes -%>
|
|
4
|
+
<%%= f.input :<%= attribute.name %> %>
|
|
5
|
+
<%- end -%>
|
|
6
|
+
<%% end %>
|
|
7
|
+
<%%= f.buttons %>
|
|
10
8
|
<%% end %>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<%% title
|
|
1
|
+
<%% title t('edit_title', :model => <%= class_name %>.human_name) %>
|
|
2
2
|
|
|
3
3
|
<%= render_form %>
|
|
4
4
|
|
|
5
5
|
<%- if actions? :show, :index -%>
|
|
6
6
|
<p>
|
|
7
7
|
<%- if action? :show -%>
|
|
8
|
-
<%%= link_to "
|
|
8
|
+
<%%= link_to t("show_link"), @<%= singular_name %> %> |
|
|
9
9
|
<%- end -%>
|
|
10
10
|
<%- if action? :index -%>
|
|
11
|
-
<%%= link_to "
|
|
11
|
+
<%%= link_to t("view_all_link"), <%= plural_name %>_path %>
|
|
12
12
|
<%- end -%>
|
|
13
13
|
</p>
|
|
14
14
|
<%- end -%>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%% title
|
|
1
|
+
<%% title <%= class_name %>.human_name(:count => 2) %>
|
|
2
2
|
|
|
3
3
|
<table>
|
|
4
4
|
<tr>
|
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
<td><%%=h <%= singular_name %>.<%= attribute.name %> %></td>
|
|
13
13
|
<%- end -%>
|
|
14
14
|
<%- if action? :show -%>
|
|
15
|
-
<td><%%= link_to "
|
|
15
|
+
<td><%%= link_to t("show_link"), <%= singular_name %> %></td>
|
|
16
16
|
<%- end -%>
|
|
17
17
|
<%- if action? :edit -%>
|
|
18
|
-
<td><%%= link_to "
|
|
18
|
+
<td><%%= link_to t("edit_link"), edit_<%= singular_name %>_path(<%= singular_name %>) %></td>
|
|
19
19
|
<%- end -%>
|
|
20
20
|
<%- if action? :destroy -%>
|
|
21
|
-
<td><%%= link_to "
|
|
21
|
+
<td><%%= link_to t("destroy_link"), <%= singular_name %>, :confirm => t('destroy_confirmation'), :method => :delete %></td>
|
|
22
22
|
<%- end -%>
|
|
23
23
|
</tr>
|
|
24
24
|
<%% end %>
|
|
25
25
|
</table>
|
|
26
26
|
|
|
27
27
|
<%- if action? :new -%>
|
|
28
|
-
<p><%%= link_to "
|
|
28
|
+
<p><%%= link_to t("new_link", :model => <%= class_name %>.human_name), new_<%= singular_name %>_path %></p>
|
|
29
29
|
<%- end -%>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<%% title "
|
|
1
|
+
<%% title t("new_title", :model => <%= class_name %>.human_name) %>
|
|
2
2
|
|
|
3
3
|
<%= render_form %>
|
|
4
4
|
|
|
5
5
|
<%- if action? :index -%>
|
|
6
|
-
<p><%%= link_to "
|
|
6
|
+
<p><%%= link_to t("back_to_list_link"), <%= plural_name %>_path %></p>
|
|
7
7
|
<%- end -%>
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
<%% title
|
|
1
|
+
<%% title <%= class_name %>.human_name %>
|
|
2
2
|
|
|
3
3
|
<%- for attribute in attributes -%>
|
|
4
4
|
<p>
|
|
5
|
-
<strong
|
|
5
|
+
<strong><%%= <%= class_name %>.human_attribute_name('<%= attribute.name %>') %>:</strong>
|
|
6
6
|
<%%=h @<%= singular_name %>.<%= attribute.name %> %>
|
|
7
7
|
</p>
|
|
8
8
|
<%- end -%>
|
|
9
9
|
|
|
10
10
|
<p>
|
|
11
11
|
<%- if action? :edit -%>
|
|
12
|
-
<%%= link_to
|
|
12
|
+
<%%= link_to t('edit_link'), edit_<%= singular_name %>_path(@<%= singular_name %>) %> |
|
|
13
13
|
<%- end -%>
|
|
14
14
|
<%- if action? :destroy -%>
|
|
15
|
-
<%%= link_to
|
|
15
|
+
<%%= link_to t('destroy_link'), @<%= singular_name %>, :confirm => t('destroy_confirmation'), :method => :delete %> |
|
|
16
16
|
<%- end -%>
|
|
17
17
|
<%- if action? :index -%>
|
|
18
|
-
<%%= link_to "
|
|
18
|
+
<%%= link_to t("view_all_link"), <%= plural_name %>_path %>
|
|
19
19
|
<%- end -%>
|
|
20
20
|
</p>
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
= f.<%= attribute.field_type %> :<%= attribute.name %>
|
|
8
|
-
<%- end -%>
|
|
9
|
-
%p
|
|
10
|
-
= f.submit "Submit"
|
|
1
|
+
- semantic_form_for @<%= singular_name %> do |f|
|
|
2
|
+
- f.inputs do
|
|
3
|
+
<%- for attribute in attributes -%>
|
|
4
|
+
= f.input :<%= attribute.name %>
|
|
5
|
+
<%- end -%>
|
|
6
|
+
= f.buttons
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
- title
|
|
1
|
+
- title t('edit_title', :model => <%= class_name %>.human_name)
|
|
2
2
|
|
|
3
3
|
<%= render_form %>
|
|
4
4
|
|
|
5
5
|
<%- if actions? :show, :index -%>
|
|
6
6
|
%p
|
|
7
7
|
<%- if action? :show -%>
|
|
8
|
-
= link_to "
|
|
8
|
+
= link_to t("show_link"), <%= singular_name %>_path(@<%= singular_name %>)
|
|
9
9
|
|
|
|
10
10
|
<%- end -%>
|
|
11
11
|
<%- if action? :index -%>
|
|
12
|
-
= link_to "
|
|
12
|
+
= link_to t("view_all_link"), <%= plural_name %>_path
|
|
13
13
|
<%- end -%>
|
|
14
14
|
<%- end -%>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
- title
|
|
1
|
+
- title <%= class_name %>.human_name(:count => 2)
|
|
2
2
|
|
|
3
3
|
%table
|
|
4
4
|
%tr
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
%td= h <%= singular_name %>.<%= attribute.name %>
|
|
12
12
|
<%- end -%>
|
|
13
13
|
<%- if action? :show -%>
|
|
14
|
-
%td= link_to '
|
|
14
|
+
%td= link_to t('show_link'), <%= singular_name %>
|
|
15
15
|
<%- end -%>
|
|
16
16
|
<%- if action? :edit -%>
|
|
17
|
-
%td= link_to '
|
|
17
|
+
%td= link_to t('edit_link'), edit_<%= singular_name %>_path(<%= singular_name %>)
|
|
18
18
|
<%- end -%>
|
|
19
19
|
<%- if action? :destroy -%>
|
|
20
|
-
%td= link_to '
|
|
20
|
+
%td= link_to t('destroy_link'), <%= singular_name %>, :confirm => t('destroy_confirmation'), :method => :delete
|
|
21
21
|
<%- end -%>
|
|
22
22
|
|
|
23
23
|
<%- if actions? :new -%>
|
|
24
|
-
%p= link_to "
|
|
24
|
+
%p= link_to t("new_link", :model => <%= class_name %>.human_name), new_<%= singular_name %>_path
|
|
25
25
|
<%- end -%>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
- title "
|
|
1
|
+
- title t("new_title", :model => <%= class_name %>.human_name)
|
|
2
2
|
|
|
3
3
|
<%= render_form %>
|
|
4
4
|
|
|
5
5
|
<%- if action? :index -%>
|
|
6
|
-
%p= link_to "
|
|
6
|
+
%p= link_to t("back_to_list_link"), <%= plural_name %>_path
|
|
7
7
|
<%- end -%>
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
- title
|
|
1
|
+
- title <%= class_name %>.human_name
|
|
2
2
|
|
|
3
3
|
<%- for attribute in attributes -%>
|
|
4
4
|
%p
|
|
5
|
-
%strong
|
|
5
|
+
%strong
|
|
6
|
+
= <%= class_name %>.human_attribute_name('<%= attribute.name %>')+':'
|
|
6
7
|
=h @<%= singular_name %>.<%= attribute.name %>
|
|
7
8
|
<%- end -%>
|
|
8
9
|
|
|
9
10
|
%p
|
|
10
11
|
<%- if action? :edit -%>
|
|
11
|
-
= link_to
|
|
12
|
+
= link_to t('edit_link'), edit_<%= singular_name %>_path(@<%= singular_name %>)
|
|
12
13
|
|
|
|
13
14
|
<%- end -%>
|
|
14
15
|
<%- if action? :destroy -%>
|
|
15
|
-
= link_to
|
|
16
|
+
= link_to t('destroy_link'), @<%= singular_name %>, :confirm => t('destroy_confirmation'), :method => :delete
|
|
16
17
|
|
|
|
17
18
|
<%- end -%>
|
|
18
19
|
<%- if action? :index -%>
|
|
19
|
-
= link_to
|
|
20
|
+
= link_to t('view_all_link'), <%= plural_name %>_path
|
|
20
21
|
<%- end -%>
|
metadata
CHANGED
|
@@ -4,13 +4,14 @@ version: !ruby/object:Gem::Version
|
|
|
4
4
|
prerelease: false
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
version: 0.
|
|
7
|
+
- 2
|
|
8
|
+
- 0
|
|
9
|
+
version: 0.2.0
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Ryan Bates
|
|
13
13
|
- Enrique Garcia Cota
|
|
14
|
+
- Francisco Juan
|
|
14
15
|
autorequire:
|
|
15
16
|
bindir: bin
|
|
16
17
|
cert_chain: []
|
|
@@ -117,56 +118,62 @@ files:
|
|
|
117
118
|
- rails_generators/splendeo_config/templates/load_config.rb
|
|
118
119
|
- rails_generators/splendeo_config/USAGE
|
|
119
120
|
- rails_generators/splendeo_layout/splendeo_layout_generator.rb
|
|
120
|
-
- rails_generators/splendeo_layout/templates/
|
|
121
|
-
- rails_generators/splendeo_layout/templates/blueprint/
|
|
122
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/link-icons/icons/
|
|
123
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/link-icons/icons/
|
|
124
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/link-icons/icons/
|
|
125
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/link-icons/icons/
|
|
126
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/link-icons/icons/
|
|
127
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/link-icons/icons/
|
|
128
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/link-icons/icons/
|
|
129
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/link-icons/
|
|
130
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/link-icons/
|
|
131
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/
|
|
132
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/buttons/icons/
|
|
133
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/buttons/icons/
|
|
134
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/buttons/
|
|
135
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/buttons/
|
|
136
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/
|
|
137
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/fancy-type/
|
|
138
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/
|
|
139
|
-
- rails_generators/splendeo_layout/templates/blueprint/plugins/rtl/
|
|
140
|
-
- rails_generators/splendeo_layout/templates/blueprint/
|
|
141
|
-
- rails_generators/splendeo_layout/templates/blueprint/
|
|
142
|
-
- rails_generators/splendeo_layout/templates/
|
|
143
|
-
- rails_generators/splendeo_layout/templates/stylesheet.
|
|
121
|
+
- rails_generators/splendeo_layout/templates/sass/formtastic.sass
|
|
122
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/ie.sass
|
|
123
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/link-icons/icons/im.png
|
|
124
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/link-icons/icons/email.png
|
|
125
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/link-icons/icons/visited.png
|
|
126
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/link-icons/icons/pdf.png
|
|
127
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/link-icons/icons/xls.png
|
|
128
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/link-icons/icons/feed.png
|
|
129
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/link-icons/icons/external.png
|
|
130
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/link-icons/icons/doc.png
|
|
131
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/link-icons/screen.sass
|
|
132
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/link-icons/readme.txt
|
|
133
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/buttons/icons/tick.png
|
|
134
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/buttons/icons/key.png
|
|
135
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/buttons/icons/cross.png
|
|
136
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/buttons/screen.sass
|
|
137
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/buttons/readme.txt
|
|
138
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/fancy-type/screen.sass
|
|
139
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/fancy-type/readme.txt
|
|
140
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/rtl/screen.sass
|
|
141
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/plugins/rtl/readme.txt
|
|
142
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/screen.sass
|
|
143
|
+
- rails_generators/splendeo_layout/templates/sass/blueprint/print.sass
|
|
144
|
+
- rails_generators/splendeo_layout/templates/sass/stylesheet.sass
|
|
145
|
+
- rails_generators/splendeo_layout/templates/sass/formtastic_changes.sass
|
|
146
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/ie.css
|
|
147
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/link-icons/icons/im.png
|
|
148
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/link-icons/icons/email.png
|
|
149
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/link-icons/icons/visited.png
|
|
150
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/link-icons/icons/pdf.png
|
|
151
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/link-icons/icons/xls.png
|
|
152
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/link-icons/icons/feed.png
|
|
153
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/link-icons/icons/external.png
|
|
154
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/link-icons/icons/doc.png
|
|
155
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/link-icons/screen.css
|
|
156
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/link-icons/readme.txt
|
|
157
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/buttons/icons/tick.png
|
|
158
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/buttons/icons/key.png
|
|
159
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/buttons/icons/cross.png
|
|
160
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/buttons/screen.css
|
|
161
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/buttons/readme.txt
|
|
162
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/fancy-type/screen.css
|
|
163
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/fancy-type/readme.txt
|
|
164
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/rtl/screen.css
|
|
165
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/plugins/rtl/readme.txt
|
|
166
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/screen.css
|
|
167
|
+
- rails_generators/splendeo_layout/templates/css/blueprint/print.css
|
|
168
|
+
- rails_generators/splendeo_layout/templates/css/stylesheet.css
|
|
169
|
+
- rails_generators/splendeo_layout/templates/css/formtastic_changes.css
|
|
170
|
+
- rails_generators/splendeo_layout/templates/css/formtastic.css
|
|
171
|
+
- rails_generators/splendeo_layout/templates/vendor/plugins/haml/init.rb
|
|
144
172
|
- rails_generators/splendeo_layout/templates/helper.rb
|
|
145
173
|
- rails_generators/splendeo_layout/templates/layout.html.erb
|
|
146
|
-
- rails_generators/splendeo_layout/templates/
|
|
174
|
+
- rails_generators/splendeo_layout/templates/config/locales/en.yml
|
|
175
|
+
- rails_generators/splendeo_layout/templates/config/initializers/formtastic.rb
|
|
147
176
|
- rails_generators/splendeo_layout/templates/layout.html.haml
|
|
148
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/ie.sass
|
|
149
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/link-icons/icons/im.png
|
|
150
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/link-icons/icons/email.png
|
|
151
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/link-icons/icons/visited.png
|
|
152
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/link-icons/icons/pdf.png
|
|
153
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/link-icons/icons/xls.png
|
|
154
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/link-icons/icons/feed.png
|
|
155
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/link-icons/icons/external.png
|
|
156
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/link-icons/icons/doc.png
|
|
157
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/link-icons/screen.sass
|
|
158
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/link-icons/readme.txt
|
|
159
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/buttons/icons/tick.png
|
|
160
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/buttons/icons/key.png
|
|
161
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/buttons/icons/cross.png
|
|
162
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/buttons/screen.sass
|
|
163
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/buttons/readme.txt
|
|
164
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/fancy-type/screen.sass
|
|
165
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/fancy-type/readme.txt
|
|
166
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/rtl/screen.sass
|
|
167
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/plugins/rtl/readme.txt
|
|
168
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/screen.sass
|
|
169
|
-
- rails_generators/splendeo_layout/templates/blueprint-sass/print.sass
|
|
170
177
|
- rails_generators/splendeo_layout/USAGE
|
|
171
178
|
- LICENSE
|
|
172
179
|
- README.rdoc
|