twitter-bootswatch-rails 2.3.1.2

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 (99) hide show
  1. data/README.md +259 -0
  2. data/Rakefile +57 -0
  3. data/lib/generators/bootswatch/import/import_generator.rb +50 -0
  4. data/lib/generators/bootswatch/install/install_generator.rb +120 -0
  5. data/lib/generators/bootswatch/install/templates/application.css.tt +6 -0
  6. data/lib/generators/bootswatch/install/templates/application.js.tt +5 -0
  7. data/lib/generators/bootswatch/install/templates/base.less.tt +8 -0
  8. data/lib/generators/bootswatch/install/templates/bootstrap.less +63 -0
  9. data/lib/generators/bootswatch/install/templates/bootswatch.coffee.tt +9 -0
  10. data/lib/generators/bootswatch/install/templates/bootswatch.less.tt +8 -0
  11. data/lib/generators/bootswatch/install/templates/loader.coffee.tt +25 -0
  12. data/lib/generators/bootswatch/install/templates/loader.css.less.tt +22 -0
  13. data/lib/generators/bootswatch/install/templates/mixins.less.tt +704 -0
  14. data/lib/generators/bootswatch/install/templates/variables.less.tt +303 -0
  15. data/lib/generators/bootswatch/layout/layout_generator.rb +23 -0
  16. data/lib/generators/bootswatch/layout/templates/layout.html.erb +50 -0
  17. data/lib/generators/bootswatch/layout/templates/layout.html.haml +30 -0
  18. data/lib/generators/bootswatch/themed/templates/_form.html.erb +16 -0
  19. data/lib/generators/bootswatch/themed/templates/_form.html.haml +10 -0
  20. data/lib/generators/bootswatch/themed/templates/edit.html.erb +6 -0
  21. data/lib/generators/bootswatch/themed/templates/edit.html.haml +4 -0
  22. data/lib/generators/bootswatch/themed/templates/index.html.erb +40 -0
  23. data/lib/generators/bootswatch/themed/templates/index.html.haml +25 -0
  24. data/lib/generators/bootswatch/themed/templates/new.html.erb +6 -0
  25. data/lib/generators/bootswatch/themed/templates/new.html.haml +4 -0
  26. data/lib/generators/bootswatch/themed/templates/show.html.erb +23 -0
  27. data/lib/generators/bootswatch/themed/templates/show.html.haml +15 -0
  28. data/lib/generators/bootswatch/themed/templates/simple_form/_form.html.erb +14 -0
  29. data/lib/generators/bootswatch/themed/templates/simple_form/_form.html.haml +11 -0
  30. data/lib/generators/bootswatch/themed/themed_generator.rb +99 -0
  31. data/lib/tasks/setup.thor +90 -0
  32. data/lib/twitter-bootswatch-rails.rb +10 -0
  33. data/lib/twitter/bootswatch/rails/bootswatch.rb +2 -0
  34. data/lib/twitter/bootswatch/rails/engine.rb +32 -0
  35. data/lib/twitter/bootswatch/rails/version.rb +7 -0
  36. data/vendor/assets/fonts/font-awesome/FontAwesome.otf +0 -0
  37. data/vendor/assets/fonts/font-awesome/fontawesome-webfont.eot +0 -0
  38. data/vendor/assets/fonts/font-awesome/fontawesome-webfont.svg +284 -0
  39. data/vendor/assets/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
  40. data/vendor/assets/fonts/font-awesome/fontawesome-webfont.woff +0 -0
  41. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  42. data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  43. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +117 -0
  44. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +99 -0
  45. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +105 -0
  46. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +207 -0
  47. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +167 -0
  48. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +165 -0
  49. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +247 -0
  50. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +114 -0
  51. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +162 -0
  52. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +144 -0
  53. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +361 -0
  54. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +60 -0
  55. data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +335 -0
  56. data/vendor/toolkit/font-awesome/font-awesome-ie7.less +350 -0
  57. data/vendor/toolkit/font-awesome/font-awesome.less +537 -0
  58. data/vendor/toolkit/twitter/bootstrap/accordion.less +34 -0
  59. data/vendor/toolkit/twitter/bootstrap/alerts.less +79 -0
  60. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +63 -0
  61. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +24 -0
  62. data/vendor/toolkit/twitter/bootstrap/button-groups.less +229 -0
  63. data/vendor/toolkit/twitter/bootstrap/buttons.less +228 -0
  64. data/vendor/toolkit/twitter/bootstrap/carousel.less +158 -0
  65. data/vendor/toolkit/twitter/bootstrap/close.less +32 -0
  66. data/vendor/toolkit/twitter/bootstrap/code.less +61 -0
  67. data/vendor/toolkit/twitter/bootstrap/component-animations.less +22 -0
  68. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +237 -0
  69. data/vendor/toolkit/twitter/bootstrap/forms.less +690 -0
  70. data/vendor/toolkit/twitter/bootstrap/grid.less +21 -0
  71. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +25 -0
  72. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +84 -0
  73. data/vendor/toolkit/twitter/bootstrap/layouts.less +16 -0
  74. data/vendor/toolkit/twitter/bootstrap/media.less +55 -0
  75. data/vendor/toolkit/twitter/bootstrap/mixins.less +702 -0
  76. data/vendor/toolkit/twitter/bootstrap/modals.less +95 -0
  77. data/vendor/toolkit/twitter/bootstrap/navbar.less +497 -0
  78. data/vendor/toolkit/twitter/bootstrap/navs.less +409 -0
  79. data/vendor/toolkit/twitter/bootstrap/pager.less +43 -0
  80. data/vendor/toolkit/twitter/bootstrap/pagination.less +123 -0
  81. data/vendor/toolkit/twitter/bootstrap/popovers.less +133 -0
  82. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +122 -0
  83. data/vendor/toolkit/twitter/bootstrap/reset.less +216 -0
  84. data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +28 -0
  85. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +193 -0
  86. data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +19 -0
  87. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +189 -0
  88. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +59 -0
  89. data/vendor/toolkit/twitter/bootstrap/responsive.less +48 -0
  90. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +53 -0
  91. data/vendor/toolkit/twitter/bootstrap/sprites.less +197 -0
  92. data/vendor/toolkit/twitter/bootstrap/tables.less +244 -0
  93. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +53 -0
  94. data/vendor/toolkit/twitter/bootstrap/tooltip.less +70 -0
  95. data/vendor/toolkit/twitter/bootstrap/type.less +247 -0
  96. data/vendor/toolkit/twitter/bootstrap/utilities.less +30 -0
  97. data/vendor/toolkit/twitter/bootstrap/variables.less +301 -0
  98. data/vendor/toolkit/twitter/bootstrap/wells.less +29 -0
  99. metadata +269 -0
@@ -0,0 +1,303 @@
1
+ // <%= config[:theme_info] %>
2
+ // Bootswatch
3
+ //
4
+ // Variables
5
+ // --------------------------------------------------
6
+
7
+
8
+ // Global values
9
+ // --------------------------------------------------
10
+
11
+
12
+ // Grays
13
+ // -------------------------
14
+ @black: #000;
15
+ @grayDarker: #222;
16
+ @grayDark: #333;
17
+ @gray: #555;
18
+ @grayLight: #999;
19
+ @grayLighter: #eee;
20
+ @white: #fff;
21
+
22
+
23
+ // Accent colors
24
+ // -------------------------
25
+ @blue: #049cdb;
26
+ @blueDark: #0064cd;
27
+ @green: #46a546;
28
+ @red: #9d261d;
29
+ @yellow: #ffc40d;
30
+ @orange: #f89406;
31
+ @pink: #c3325f;
32
+ @purple: #7a43b6;
33
+
34
+
35
+ // Scaffolding
36
+ // -------------------------
37
+ @bodyBackground: @white;
38
+ @textColor: @grayDark;
39
+
40
+
41
+ // Links
42
+ // -------------------------
43
+ @linkColor: #08c;
44
+ @linkColorHover: darken(@linkColor, 15%);
45
+
46
+
47
+ // Typography
48
+ // -------------------------
49
+ @sansFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif;
50
+ @serifFontFamily: Georgia, "Times New Roman", Times, serif;
51
+ @monoFontFamily: Monaco, Menlo, Consolas, "Courier New", monospace;
52
+
53
+ @baseFontSize: 14px;
54
+ @baseFontFamily: @sansFontFamily;
55
+ @baseLineHeight: 20px;
56
+ @altFontFamily: @serifFontFamily;
57
+
58
+ @headingsFontFamily: inherit; // empty to use BS default, @baseFontFamily
59
+ @headingsFontWeight: bold; // instead of browser default, bold
60
+ @headingsColor: inherit; // empty to use BS default, @textColor
61
+
62
+
63
+ // Component sizing
64
+ // -------------------------
65
+ // Based on 14px font-size and 20px line-height
66
+
67
+ @fontSizeLarge: @baseFontSize * 1.25; // ~18px
68
+ @fontSizeSmall: @baseFontSize * 0.85; // ~12px
69
+ @fontSizeMini: @baseFontSize * 0.75; // ~11px
70
+
71
+ @paddingLarge: 11px 19px; // 44px
72
+ @paddingSmall: 2px 10px; // 26px
73
+ @paddingMini: 0 6px; // 22px
74
+
75
+ @baseBorderRadius: 4px;
76
+ @borderRadiusLarge: 6px;
77
+ @borderRadiusSmall: 3px;
78
+
79
+
80
+ // Tables
81
+ // -------------------------
82
+ @tableBackground: transparent; // overall background-color
83
+ @tableBackgroundAccent: #f9f9f9; // for striping
84
+ @tableBackgroundHover: #f5f5f5; // for hover
85
+ @tableBorder: #ddd; // table and cell border
86
+
87
+ // Buttons
88
+ // -------------------------
89
+ @btnBackground: @white;
90
+ @btnBackgroundHighlight: darken(@white, 10%);
91
+ @btnBorder: #ccc;
92
+
93
+ @btnPrimaryBackground: @linkColor;
94
+ @btnPrimaryBackgroundHighlight: spin(@btnPrimaryBackground, 20%);
95
+
96
+ @btnInfoBackground: #5bc0de;
97
+ @btnInfoBackgroundHighlight: #2f96b4;
98
+
99
+ @btnSuccessBackground: #62c462;
100
+ @btnSuccessBackgroundHighlight: #51a351;
101
+
102
+ @btnWarningBackground: lighten(@orange, 15%);
103
+ @btnWarningBackgroundHighlight: @orange;
104
+
105
+ @btnDangerBackground: #ee5f5b;
106
+ @btnDangerBackgroundHighlight: #bd362f;
107
+
108
+ @btnInverseBackground: #444;
109
+ @btnInverseBackgroundHighlight: @grayDarker;
110
+
111
+
112
+ // Forms
113
+ // -------------------------
114
+ @inputBackground: @white;
115
+ @inputBorder: #ccc;
116
+ @inputBorderRadius: @baseBorderRadius;
117
+ @inputDisabledBackground: @grayLighter;
118
+ @formActionsBackground: #f5f5f5;
119
+ @inputHeight: @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border
120
+
121
+
122
+ // Dropdowns
123
+ // -------------------------
124
+ @dropdownBackground: @white;
125
+ @dropdownBorder: rgba(0,0,0,.2);
126
+ @dropdownDividerTop: #e5e5e5;
127
+ @dropdownDividerBottom: @white;
128
+
129
+ @dropdownLinkColor: @grayDark;
130
+ @dropdownLinkColorHover: @white;
131
+ @dropdownLinkColorActive: @white;
132
+
133
+ @dropdownLinkBackgroundActive: @linkColor;
134
+ @dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive;
135
+
136
+
137
+
138
+ // COMPONENT VARIABLES
139
+ // --------------------------------------------------
140
+
141
+
142
+ // Z-index master list
143
+ // -------------------------
144
+ // Used for a bird's eye view of components dependent on the z-axis
145
+ // Try to avoid customizing these :)
146
+ @zindexDropdown: 1000;
147
+ @zindexPopover: 1010;
148
+ @zindexTooltip: 1030;
149
+ @zindexFixedNavbar: 1030;
150
+ @zindexModalBackdrop: 1040;
151
+ @zindexModal: 1050;
152
+
153
+
154
+ // Sprite icons path
155
+ // -------------------------
156
+ @iconSpritePath: "twitter/bootstrap/glyphicons-halflings.png";
157
+ @iconWhiteSpritePath: "twitter/bootstrap/glyphicons-halflings-white.png";
158
+
159
+
160
+ // Input placeholder text color
161
+ // -------------------------
162
+ @placeholderText: @grayLight;
163
+
164
+
165
+ // Hr border color
166
+ // -------------------------
167
+ @hrBorder: @grayLighter;
168
+
169
+
170
+ // Horizontal forms & lists
171
+ // -------------------------
172
+ @horizontalComponentOffset: 180px;
173
+
174
+
175
+ // Wells
176
+ // -------------------------
177
+ @wellBackground: #f5f5f5;
178
+
179
+
180
+ // Navbar
181
+ // -------------------------
182
+ @navbarCollapseWidth: 979px;
183
+ @navbarCollapseDesktopWidth: @navbarCollapseWidth + 1;
184
+
185
+ @navbarHeight: 40px;
186
+ @navbarBackgroundHighlight: #ffffff;
187
+ @navbarBackground: darken(@navbarBackgroundHighlight, 5%);
188
+ @navbarBorder: darken(@navbarBackground, 12%);
189
+
190
+ @navbarText: #777;
191
+ @navbarLinkColor: #777;
192
+ @navbarLinkColorHover: @grayDark;
193
+ @navbarLinkColorActive: @gray;
194
+ @navbarLinkBackgroundHover: transparent;
195
+ @navbarLinkBackgroundActive: darken(@navbarBackground, 5%);
196
+
197
+ @navbarBrandColor: @navbarLinkColor;
198
+
199
+ // Inverted navbar
200
+ @navbarInverseBackground: #111111;
201
+ @navbarInverseBackgroundHighlight: #222222;
202
+ @navbarInverseBorder: #252525;
203
+
204
+ @navbarInverseText: @grayLight;
205
+ @navbarInverseLinkColor: @grayLight;
206
+ @navbarInverseLinkColorHover: @white;
207
+ @navbarInverseLinkColorActive: @navbarInverseLinkColorHover;
208
+ @navbarInverseLinkBackgroundHover: transparent;
209
+ @navbarInverseLinkBackgroundActive: @navbarInverseBackground;
210
+
211
+ @navbarInverseSearchBackground: lighten(@navbarInverseBackground, 25%);
212
+ @navbarInverseSearchBackgroundFocus: @white;
213
+ @navbarInverseSearchBorder: @navbarInverseBackground;
214
+ @navbarInverseSearchPlaceholderColor: #ccc;
215
+
216
+ @navbarInverseBrandColor: @navbarInverseLinkColor;
217
+
218
+
219
+ // Pagination
220
+ // -------------------------
221
+ @paginationBackground: #fff;
222
+ @paginationBorder: #ddd;
223
+ @paginationActiveBackground: #f5f5f5;
224
+
225
+
226
+ // Hero unit
227
+ // -------------------------
228
+ @heroUnitBackground: @grayLighter;
229
+ @heroUnitHeadingColor: inherit;
230
+ @heroUnitLeadColor: inherit;
231
+
232
+
233
+ // Form states and alerts
234
+ // -------------------------
235
+ @warningText: #c09853;
236
+ @warningBackground: #fcf8e3;
237
+ @warningBorder: darken(spin(@warningBackground, -10), 3%);
238
+
239
+ @errorText: #b94a48;
240
+ @errorBackground: #f2dede;
241
+ @errorBorder: darken(spin(@errorBackground, -10), 3%);
242
+
243
+ @successText: #468847;
244
+ @successBackground: #dff0d8;
245
+ @successBorder: darken(spin(@successBackground, -10), 5%);
246
+
247
+ @infoText: #3a87ad;
248
+ @infoBackground: #d9edf7;
249
+ @infoBorder: darken(spin(@infoBackground, -10), 7%);
250
+
251
+
252
+ // Tooltips and popovers
253
+ // -------------------------
254
+ @tooltipColor: #fff;
255
+ @tooltipBackground: #000;
256
+ @tooltipArrowWidth: 5px;
257
+ @tooltipArrowColor: @tooltipBackground;
258
+
259
+ @popoverBackground: #fff;
260
+ @popoverArrowWidth: 10px;
261
+ @popoverArrowColor: #fff;
262
+ @popoverTitleBackground: darken(@popoverBackground, 3%);
263
+
264
+ // Special enhancement for popovers
265
+ @popoverArrowOuterWidth: @popoverArrowWidth + 1;
266
+ @popoverArrowOuterColor: rgba(0,0,0,.25);
267
+
268
+
269
+
270
+ // GRID
271
+ // --------------------------------------------------
272
+
273
+
274
+ // Default 940px grid
275
+ // -------------------------
276
+ @gridColumns: 12;
277
+ @gridColumnWidth: 60px;
278
+ @gridGutterWidth: 20px;
279
+ @gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
280
+
281
+ // 1200px min
282
+ @gridColumnWidth1200: 70px;
283
+ @gridGutterWidth1200: 30px;
284
+ @gridRowWidth1200: (@gridColumns * @gridColumnWidth1200) + (@gridGutterWidth1200 * (@gridColumns - 1));
285
+
286
+ // 768px-979px
287
+ @gridColumnWidth768: 42px;
288
+ @gridGutterWidth768: 20px;
289
+ @gridRowWidth768: (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridColumns - 1));
290
+
291
+
292
+ // Fluid grid
293
+ // -------------------------
294
+ @fluidGridColumnWidth: percentage(@gridColumnWidth/@gridRowWidth);
295
+ @fluidGridGutterWidth: percentage(@gridGutterWidth/@gridRowWidth);
296
+
297
+ // 1200px min
298
+ @fluidGridColumnWidth1200: percentage(@gridColumnWidth1200/@gridRowWidth1200);
299
+ @fluidGridGutterWidth1200: percentage(@gridGutterWidth1200/@gridRowWidth1200);
300
+
301
+ // 768px-979px
302
+ @fluidGridColumnWidth768: percentage(@gridColumnWidth768/@gridRowWidth768);
303
+ @fluidGridGutterWidth768: percentage(@gridGutterWidth768/@gridRowWidth768);
@@ -0,0 +1,23 @@
1
+ require 'rails/generators'
2
+
3
+ module Bootswatch
4
+ module Generators
5
+ class LayoutGenerator < ::Rails::Generators::NamedBase
6
+ argument :name, type: :string, default: "application",
7
+ desc: 'The theme name for this bootswatch view layout'
8
+
9
+ # needed for thor templates
10
+ source_root File.expand_path("../templates", __FILE__)
11
+
12
+ def theme_name
13
+ file_name
14
+ end
15
+
16
+ def generate_layout
17
+ app = ::Rails.application
18
+ ext = app.config.generators.options[:rails][:template_engine] || :erb
19
+ template "layout.html.#{ext}", "app/views/layouts/#{theme_name}.html.#{ext}", {theme_name: theme_name, app_name: application_name}
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,50 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title><%%= content_for?(:title) ? yield(:title) : "<%= config[:app_name] %>" %></title>
8
+ <%%= csrf_meta_tags %>
9
+
10
+ <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
11
+ <!--[if lt IE 9]>
12
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
13
+ <![endif]-->
14
+
15
+ <%%= stylesheet_link_tag "<%= config[:theme_name] %>", :media => "all" %>
16
+
17
+ <%%= yield(:page_stylesheet) if content_for?(:page_stylesheet) %>
18
+
19
+ <!-- For third-generation iPad with high-resolution Retina display: -->
20
+ <!-- Size should be 144 x 144 pixels -->
21
+ <%%= favicon_link_tag 'images/apple-touch-icon-144x144-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '144x144' %>
22
+
23
+ <!-- For iPhone with high-resolution Retina display: -->
24
+ <!-- Size should be 114 x 114 pixels -->
25
+ <%%= favicon_link_tag 'images/apple-touch-icon-114x114-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '114x114' %>
26
+
27
+ <!-- For first- and second-generation iPad: -->
28
+ <!-- Size should be 72 x 72 pixels -->
29
+ <%%= favicon_link_tag 'images/apple-touch-icon-72x72-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png', :sizes => '72x72' %>
30
+
31
+ <!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
32
+ <!-- Size should be 57 x 57 pixels -->
33
+ <%%= favicon_link_tag 'images/apple-touch-icon-precomposed.png', :rel => 'apple-touch-icon-precomposed', :type => 'image/png' %>
34
+
35
+ <!-- For all other devices -->
36
+ <!-- Size should be 32 x 32 pixels -->
37
+ <%%= favicon_link_tag 'images/favicon.ico', :rel => 'shortcut icon' %>
38
+ </head>
39
+ <body>
40
+
41
+
42
+ <%%= yield %>
43
+
44
+ <!-- Javascripts
45
+ ================================================== -->
46
+ <!-- Placed at the end of the document so the pages load faster -->
47
+ <%%= javascript_include_tag "<%= config[:theme_name] %>" %>
48
+ <%%= yield(:page_javascript) if content_for?(:page_javascript) %>
49
+ </body>
50
+ </html>
@@ -0,0 +1,30 @@
1
+ !!! 5
2
+ %html(lang="en")
3
+ %head
4
+ %meta(charset="utf-8")
5
+ %meta(http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1")
6
+ %meta(name="viewport" content="width=device-width, initial-scale=1.0")
7
+ %title= content_for?(:title) ? yield(:title) : "<%= config[:app_name] %>"
8
+ = csrf_meta_tags
9
+ / Le HTML5 shim, for IE6-8 support of HTML elements
10
+ /[if lt IE 9]
11
+ = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
12
+ = stylesheet_link_tag "<%= config[:theme_name] %>", :media => "all"
13
+ = yield(:page_stylesheet) if content_for?(:page_stylesheet)
14
+ %link(href="images/apple-touch-icon-144x144.png" rel="apple-touch-icon-precomposed" sizes="144x144")
15
+ %link(href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon-precomposed" sizes="114x114")
16
+ %link(href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon-precomposed" sizes="72x72")
17
+ %link(href="images/apple-touch-icon.png" rel="apple-touch-icon-precomposed")
18
+ %link(href="images/favicon.ico" rel="shortcut icon")
19
+
20
+
21
+ %body
22
+
23
+ = yield
24
+
25
+ /
26
+ Javascripts
27
+ \==================================================
28
+ / Placed at the end of the document so the pages load faster
29
+ = javascript_include_tag "<%= config[:theme_name] %>"
30
+ = yield(:page_javascript) if content_for?(:page_javascript)
@@ -0,0 +1,16 @@
1
+ <%%= form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f| %>
2
+ <%- columns.each do |column| -%>
3
+ <div class="control-group">
4
+ <%%= f.label :<%= column.name %>, :class => 'control-label' %>
5
+ <div class="controls">
6
+ <%%= f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>' %>
7
+ </div>
8
+ </div>
9
+ <%- end -%>
10
+
11
+ <div class="form-actions">
12
+ <%%= f.submit nil, :class => 'btn btn-primary' %>
13
+ <%%= link_to t('.cancel', :default => t("helpers.links.cancel")),
14
+ <%= controller_routing_path %>_path, :class => 'btn' %>
15
+ </div>
16
+ <%% end %>
@@ -0,0 +1,10 @@
1
+ = form_for @<%= resource_name %>, :html => { :class => 'form-horizontal' } do |f|
2
+ <%- columns.each do |column| -%>
3
+ .control-group
4
+ = f.label :<%= column.name %>, :class => 'control-label'
5
+ .controls
6
+ = f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>'
7
+ <%- end -%>
8
+ .form-actions
9
+ = f.submit nil, :class => 'btn btn-primary'
10
+ = link_to t('.cancel', :default => t("helpers.links.cancel")), <%= controller_routing_path %>_path, :class => 'btn'
@@ -0,0 +1,6 @@
1
+ <%%- model_class = <%= resource_name.classify %> -%>
2
+ <div class="page-header">
3
+ <h1><%%=t '.title', :default => t('helpers.titles.edit', :model => model_class.model_name.human,
4
+ :default => "Edit #{model_class.model_name.human}") %></h1>
5
+ </div>
6
+ <%%= render :partial => 'form' %>