beautiful_scaffold 0.2.7 → 0.3.0.pre

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 (43) hide show
  1. data/CHANGELOG +18 -0
  2. data/Gemfile +2 -2
  3. data/README.rdoc +10 -0
  4. data/beautiful_scaffold.gemspec +1 -1
  5. data/lib/generators/beautiful_jointable_generator.rb +1 -1
  6. data/lib/generators/beautiful_locale_generator.rb +95 -7
  7. data/lib/generators/beautiful_scaffold_common_methods.rb +49 -12
  8. data/lib/generators/beautiful_scaffold_generator.rb +12 -22
  9. data/lib/generators/templates/app/assets/javascripts/application-bs.js +34 -0
  10. data/lib/generators/templates/app/assets/javascripts/beautiful_scaffold.js +123 -19
  11. data/lib/generators/templates/app/assets/javascripts/bootstrap-datetimepicker-for-beautiful-scaffold.js +42 -39
  12. data/lib/generators/templates/app/assets/javascripts/fixed_menu.js +19 -0
  13. data/lib/generators/templates/app/assets/stylesheets/application-bs.css +26 -0
  14. data/lib/generators/templates/app/assets/stylesheets/beautiful-scaffold.css.scss +46 -1
  15. data/lib/generators/templates/app/views/_form_habtm_tag.html.erb +3 -26
  16. data/lib/generators/templates/app/views/_mass_inserting.html.erb +2 -9
  17. data/lib/generators/templates/app/views/_modal_columns.html.erb +1 -29
  18. data/lib/generators/templates/app/views/dashboard.html.erb +1 -0
  19. data/lib/generators/templates/app/views/edit.html.erb +1 -1
  20. data/lib/generators/templates/app/views/index.html.erb +4 -8
  21. data/lib/generators/templates/app/views/layout.html.erb +40 -44
  22. data/lib/generators/templates/app/views/new.html.erb +1 -1
  23. data/lib/generators/templates/app/views/partials/_form_field.html.erb +8 -14
  24. data/lib/generators/templates/app/views/partials/_index_search.html.erb +1 -5
  25. data/lib/generators/templates/app/views/partials/_index_search_default_fields.html.erb +3 -0
  26. data/lib/generators/templates/app/views/partials/_show_field.html.erb +1 -1
  27. data/lib/generators/templates/app/views/partials/_sign_in_form.html.erb +0 -5
  28. data/lib/generators/templates/app/views/show.html.erb +1 -1
  29. data/lib/generators/templates/app/views/treeview.html.erb +9 -11
  30. metadata +9 -18
  31. data/lib/generators/templates/app/assets/images/glyphicons-halflings-white.png +0 -0
  32. data/lib/generators/templates/app/assets/images/glyphicons-halflings.png +0 -0
  33. data/lib/generators/templates/app/assets/javascripts/bootstrap-alert.js +0 -90
  34. data/lib/generators/templates/app/assets/javascripts/bootstrap-dropdown.js +0 -100
  35. data/lib/generators/templates/app/assets/javascripts/bootstrap-modal.js +0 -218
  36. data/lib/generators/templates/app/assets/javascripts/bootstrap-tooltip.js +0 -275
  37. data/lib/generators/templates/app/assets/javascripts/bootstrap.js +0 -2027
  38. data/lib/generators/templates/app/assets/javascripts/bootstrap.min.js +0 -6
  39. data/lib/generators/templates/app/assets/stylesheets/bootstrap-responsive.css +0 -1040
  40. data/lib/generators/templates/app/assets/stylesheets/bootstrap-responsive.min.css +0 -9
  41. data/lib/generators/templates/app/assets/stylesheets/bootstrap.css +0 -5624
  42. data/lib/generators/templates/app/assets/stylesheets/bootstrap.min.css +0 -9
  43. data/lib/generators/templates/app/views/_treeview_js.html.erb +0 -42
@@ -1,43 +1,46 @@
1
- $('.dropdown-toggle').dropdown();
2
- $('.dpicker').livequery(function(){
3
- $(this).datepicker({ format : 'dd/mm/yyyy', language : $('html').attr("lang") }).on('changeDate', function(ev){
4
- idday = '#' + $('#' + ev.currentTarget.id).data('id') + '_3i';
5
- idmonth = '#' + $('#' + ev.currentTarget.id).data('id') + '_2i';
6
- idyear = '#' + $('#' + ev.currentTarget.id).data('id') + '_1i';
7
- $(idday).val(ev.date.getDate());
8
- $(idmonth).val(ev.date.getMonth()+1);
9
- $(idyear).val(ev.date.getFullYear());
1
+ function datetimepicker_init(){
2
+
3
+ $('.dpicker').livequery(function(){
4
+ $(this).datepicker({ format : 'dd/mm/yyyy', language : $('html').attr("lang") }).on('changeDate', function(ev){
5
+ idday = '#' + $('#' + ev.currentTarget.id).data('id') + '_3i';
6
+ idmonth = '#' + $('#' + ev.currentTarget.id).data('id') + '_2i';
7
+ idyear = '#' + $('#' + ev.currentTarget.id).data('id') + '_1i';
8
+ $(idday).val(ev.date.getDate());
9
+ $(idmonth).val(ev.date.getMonth()+1);
10
+ $(idyear).val(ev.date.getFullYear());
11
+ });
12
+ $(this).change(function(){
13
+ if( !$(this).val() ){
14
+ id = '#' + $(this).data('id');
15
+ $(id + '_3i').val("");
16
+ $(id + '_2i').val("");
17
+ $(id + '_1i').val("");
18
+ }
19
+ });
10
20
  });
11
- $(this).change(function(){
12
- if( !$(this).val() ){
13
- id = '#' + $(this).data('id');
14
- $(id + '_3i').val("");
15
- $(id + '_2i').val("");
16
- $(id + '_1i').val("");
21
+ $('.add-on').live('click', function(){
22
+ try{
23
+ dpick = $(this).parent().find('.dpicker');
24
+ dpick.trigger('focus');
25
+ dpick.trigger('select');
26
+ }catch (e){
17
27
  }
18
28
  });
19
- });
20
- $('.add-on').live('click', function(){
21
- try{
22
- dpick = $(this).parent().find('.dpicker');
23
- dpick.trigger('focus');
24
- dpick.trigger('select');
25
- }catch (e){
26
- }
27
- });
28
- $('.tpicker').livequery(function(){
29
- $(this).timepicker({ template: 'modal', showMeridian: false, minuteStep: 1, defaultTime: false, showInputs: false, disableFocus: true }).on('change', function(ev){
30
- tpickerdate = new Date("01/01/1970 " + ev.currentTarget.value);
31
- idhour = '#' + $('#' + ev.currentTarget.id).data('id') + '_4i';
32
- idmin = '#' + $('#' + ev.currentTarget.id).data('id') + '_5i';
33
- $(idhour).val(tpickerdate.getHours());
34
- $(idmin).val(tpickerdate.getMinutes());
29
+ $('.tpicker').livequery(function(){
30
+ $(this).timepicker({ template: 'modal', showMeridian: false, minuteStep: 1, defaultTime: false, showInputs: false, disableFocus: true }).on('change', function(ev){
31
+ tpickerdate = new Date("01/01/1970 " + ev.currentTarget.value);
32
+ idhour = '#' + $('#' + ev.currentTarget.id).data('id') + '_4i';
33
+ idmin = '#' + $('#' + ev.currentTarget.id).data('id') + '_5i';
34
+ $(idhour).val(tpickerdate.getHours());
35
+ $(idmin).val(tpickerdate.getMinutes());
36
+ });
37
+ $(this).change(function(){
38
+ if( !$(this).val() ){
39
+ id = '#' + $(this).data('id');
40
+ $(id + '_4i').val("");
41
+ $(id + '_5i').val("");
42
+ }
43
+ });
35
44
  });
36
- $(this).change(function(){
37
- if( !$(this).val() ){
38
- id = '#' + $(this).data('id');
39
- $(id + '_4i').val("");
40
- $(id + '_5i').val("");
41
- }
42
- });
43
- });
45
+
46
+ }
@@ -0,0 +1,19 @@
1
+ function modify_dom_init(){
2
+ var span2 = $("body>div.container-fluid>div.row-fluid>div.span2");
3
+ span2.addClass("fixed visible-desktop");
4
+ span2.removeClass("span2");
5
+
6
+ span2.children("ul").removeClass("well");
7
+
8
+ var span10 = $("body>div.container-fluid>div.row-fluid>div.span10");
9
+ span10.addClass("filler");
10
+ span10.removeClass("span10");
11
+
12
+ var cnt2 = $("body>div.container-fluid").contents();
13
+ $("body>div.container-fluid").replaceWith(cnt2);
14
+
15
+ var cnt = $("body>div.row-fluid").contents();
16
+ $("body>div.row-fluid").replaceWith(cnt);
17
+
18
+ $('body').show();
19
+ }
@@ -0,0 +1,26 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require reset
13
+ *= require datepicker
14
+ *= require timepicker
15
+ *= require beautiful-scaffold
16
+ *= require tagit-dark-grey
17
+ *= require colorpicker
18
+ *= require bootstrap-wysihtml5
19
+ *= require bootstrap_and_overrides
20
+ *= require markitup/skins/simple/style.css
21
+ *= require markitup/sets/bbcode/style.css
22
+ *= require markitup/sets/wiki/style.css
23
+ *= require markitup/sets/markdown/style.css
24
+ *= require markitup/sets/html/style.css
25
+ *= require markitup/sets/textile/style.css
26
+ */
@@ -94,4 +94,49 @@ label.bs-label-ib{
94
94
  label.bs-label-ib input{
95
95
  margin-right:3px;
96
96
  margin-top:0;
97
- }
97
+ }
98
+
99
+ /* Fixed left menu */
100
+
101
+ .fixed {
102
+ width: 200px;
103
+ float: left;
104
+ }
105
+ .fixed + div {
106
+ margin-left: 200px;
107
+ padding-left:20px;
108
+ overflow: hidden;
109
+ min-height:500px;
110
+ background:white;
111
+ }
112
+ body {
113
+ padding-top:70px;
114
+ }
115
+ @media (max-width: 979px) {
116
+ .fixed + div {
117
+ margin-left: 0;
118
+ padding:10px;
119
+ }
120
+ body {
121
+ padding-top:0px;
122
+ }
123
+ }
124
+ html, body {
125
+ height: 100%;
126
+ }
127
+ .filler:after{
128
+ background-color:inherit;
129
+ bottom: 0;
130
+ content: "";
131
+ height: auto;
132
+ min-height: 100%;
133
+ left: 0;
134
+ margin:inherit;
135
+ right: 0;
136
+ position: absolute;
137
+ top: 0;
138
+ width: inherit;
139
+ z-index: -1;
140
+ }
141
+
142
+ #jstree-marker-line {pointer-events: none;}
@@ -11,11 +11,12 @@
11
11
  }
12
12
  # Example to put in a _form.html.erb
13
13
  %>
14
+ <% path_namespace = '/' + namespace_bs if not namespace_bs.blank? %>
14
15
 
15
16
  <div class="control-group">
16
17
  <%= f.label plural_linked_model_name.to_sym, t(plural_linked_model_name.to_sym, :default => plural_linked_model_name.capitalize), :class => "control-label" %>
17
18
  <div class="controls">
18
- <ul id="<%= model_name %>_<%= linked_model_name %>_ids" name="<%= model_name %>[<%= linked_model_name %>_ids][]">
19
+ <ul class="bs-tagit" id="<%= model_name %>_<%= linked_model_name %>_ids" name="<%= model_name %>[<%= linked_model_name %>_ids][]" data-url="<%= path_namespace %>/<%= plural_linked_model_name %>/search_and_filter.json" data-param="q[<%= field_to_search_for_linked_model %>_cont]" data-result="caption">
19
20
  <% begin %>
20
21
  <% for elt in model_class.send(plural_linked_model_name) %>
21
22
  <li data-value="<%= elt.id %>"><%= elt.caption %></li>
@@ -24,28 +25,4 @@
24
25
  <% end %>
25
26
  </ul>
26
27
  </div>
27
- </div>
28
- <script type="text/javascript">
29
- $('#<%= model_name %>_<%= linked_model_name %>_ids').tagit({
30
- tagSource : function( request, response ) {
31
- <% path_namespace = '/' + namespace_bs if not namespace_bs.blank? %>
32
- $.ajax({
33
- url: "<%= path_namespace %>/<%= plural_linked_model_name %>/search_and_filter.json",
34
- type: "POST",
35
- data: {
36
- "q[<%= field_to_search_for_linked_model %>_cont]" : request.term,
37
- "skip_save_search" : true
38
- },
39
- dataType: "json",
40
- success: function( data ) {
41
- response( $.map( data, function( item ) {
42
- return { label: String(item.<%= field_to_search_for_linked_model %>), value: item.id };
43
- }));
44
- }
45
- });
46
- },
47
- triggerKeys:['enter', 'comma', 'tab'],
48
- select : true,
49
- allowNewTags : false
50
- });
51
- </script>
28
+ </div>
@@ -3,7 +3,7 @@
3
3
  <% formparams << namespace %>
4
4
  <% end %>
5
5
  <% formparams << model_name.camelize.constantize.new %>
6
- <%= form_for formparams, :method => :post, :html => { :class => "well well-small form-horizontal mass-inserting" } do |f| %>
6
+ <%= form_for formparams, :method => :post, :html => { :class => "well well-small form-horizontal mass-inserting #{(params[:mass_inserting] ? 'setfocus' : '')}" } do |f| %>
7
7
  <%= hidden_field_tag :mass_inserting, true %>
8
8
  <% for col in model_columns %>
9
9
  <div <%= visible_column(model_name, col, 'inline') %> class="col-<%= col %>">
@@ -31,13 +31,6 @@
31
31
  </div>
32
32
  <% end %>
33
33
  <div style="display:inline;">
34
- <%= f.submit t(:create, :default => "Create"), :class => 'btn' %>
34
+ <%= f.submit t(:create, :default => "Create"), :class => "btn" %>
35
35
  </div>
36
- <% end %>
37
-
38
- <% if params[:mass_inserting] then %>
39
- <script type="text/javascript">
40
- elt = $('form.mass-inserting div[style*="inline"][class*="col"] .input-small').first();
41
- $(elt).focus();
42
- </script>
43
36
  <% end %>
@@ -11,35 +11,7 @@
11
11
  <% end %>
12
12
  </div>
13
13
  <div class="modal-footer">
14
- <button type="button" class="btn btn-primary" id="filter-columns">Ok</button>
14
+ <button type="button" class="btn btn-primary" id="filter-columns" data-url="/<%= model_name %>/select_fields">Ok</button>
15
15
  <button type="button" class="btn" id="cancel-filter-columns"><%= t(:cancel, :default => "Cancel") %></button>
16
16
  </div>
17
- <script type="text/javascript">
18
- $('#filter-columns').on('click', function(){
19
- var return_json = [];
20
- $.each($('input[name^="field"]:checked'), function(index, value) {
21
- return_json.push($(value).val());
22
- });
23
- $.ajax({
24
- url: '/<%= model_name %>/select_fields',
25
- data: { 'fields' : return_json },
26
- success: function(data) {
27
- $('table.table th[class^="col"], table.table td[class^="col"]').css('display', 'none');
28
- $.each(return_json, function(index, value) {
29
- $('table.table th.col-' + value + ', table.table td.col-' + value).css('display', 'table-cell');
30
- });
31
- $('div[class^="col"]').css('display', 'none');
32
- $.each(return_json, function(index, value) {
33
- $('div.col-' + value).css('display', 'inline');
34
- });
35
- $('#modal-columns').modal('hide');
36
- }
37
- });
38
- return false;
39
- });
40
- $('#cancel-filter-columns').on('click', function(){
41
- $('#modal-columns').modal('hide');
42
- return false;
43
- });
44
- </script>
45
17
  </div>
@@ -0,0 +1 @@
1
+ <h2><%%= t(:dashboard, :default => 'Dashboard') %></h2>
@@ -1,4 +1,4 @@
1
- <h2><%%= t(:editing, :default => 'Editing') %> <%%= t(:<%= singular_table_name %>, :default => "<%= singular_table_name %>") %></h2>
1
+ <h2><%%= t(:editing, :default => 'Editing') %> <%%= <%= i18n_t_m(singular_table_name) %> %></h2>
2
2
 
3
3
  <%%= render 'form' %>
4
4
 
@@ -1,9 +1,9 @@
1
- <h2><%%= t(:listing, :default => "Listing") %> <%%= t(:<%= plural_table_name %>, :default => "<%= plural_table_name %>") %></h2>
1
+ <h2><%%= t(:listing, :default => "Listing") %> <%%= <%= i18n_t_m_p(singular_table_name) %> %></h2>
2
2
 
3
3
  <p>
4
- <%%= link_to '<i class="icon-plus"></i>'.html_safe + t(:new, :default => "New") + ' ' + t(:<%= model %>, :default => "<%= model %>"), new_<%= namespace_for_route %><%= singular_table_name %>_path, :class => "btn" %>
4
+ <%%= link_to '<i class="icon-plus"></i>'.html_safe + t(:new, :default => "New") + ' ' + <%= i18n_t_m(model) %>, new_<%= namespace_for_route %><%= singular_table_name %>_path, :class => "btn" %>
5
5
  <%% if <%= model_camelize %>.columns.map(&:name).include?("<%= model %>_id") then %>
6
- <%%= link_to '<i class="icon-folder-close"></i>'.html_safe + t(:treeview, :default => "Treeview") + ' ' + t(:<%= model %>, :default => "<%= model %>"), treeview_<%= namespace_for_route %><%= model_pluralize %>_path, :class => "btn" %>
6
+ <%%= link_to '<i class="icon-folder-close"></i>'.html_safe + t(:treeview, :default => "Treeview") + ' ' + <%= i18n_t_m(model) %>, treeview_<%= namespace_for_route %><%= model_pluralize %>_path, :class => "btn" %>
7
7
  <%% end %>
8
8
  </p>
9
9
 
@@ -46,11 +46,6 @@
46
46
  </th>
47
47
  <th>
48
48
  <%%= check_box_tag :checkall, '' %>
49
- <script type="text/javascript">
50
- $('#checkall').click(function(){
51
- $('.cbbatch').attr('checked', ($(this).attr('checked') != undefined));
52
- });
53
- </script>
54
49
  </th>
55
50
  <%= render_partial 'app/views/partials/_index_header.html.erb' %>
56
51
  <!-- Beautiful_scaffold - AddField - Header - Do not remove -->
@@ -110,6 +105,7 @@
110
105
  <div class="span3">
111
106
  <%%= search_form_for @q, :url => <%= namespace_for_route + 'search_' + model_pluralize + '_path' %>, :html => { :class => "well well-small" }, :method => :post do |f| %>
112
107
  <%= render_partial 'app/views/partials/_index_search.html.erb' %>
108
+ <%= render_partial 'app/views/partials/_index_search_default_fields.html.erb' %>
113
109
  <!-- Beautiful_scaffold - AddField - Search - Do not remove -->
114
110
  <%%= f.submit t(:filter, :default => "Filter"), :class => "btn btn-primary" %>
115
111
  <%%= link_to t(:cancel, :default => "Cancel"), <%= namespace_for_route %><%= model_pluralize %>_path(:nosearch => "ok"), :class => "btn" %>
@@ -7,46 +7,45 @@
7
7
  <meta name="description" content="Beautiful Scaffold">
8
8
  <meta name="author" content="You or me Sylvain Claudel (http://blog.escarworld.com)">
9
9
 
10
- <%%= stylesheet_link_tag "reset", "bootstrap.min", "bootstrap-responsive.min", "datepicker", "timepicker", "beautiful-scaffold", "tagit-dark-grey", "colorpicker", "bootstrap-wysihtml5" %>
11
- <style>
12
- body {
13
- padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
14
- }
15
- </style>
16
- <%%= javascript_include_tag "application", "jquery.pjax" %>
17
- <%%= javascript_include_tag "jquery.markitup.js" %>
18
- <%%= javascript_include_tag "markitup/sets/default/set.js" %>
19
- <%%= stylesheet_link_tag "markitup/skins/simple/style.css" %>
20
-
21
- <% miufile = ["bbcode","wiki","markdown","html","textile"] %>
22
- <%%= stylesheet_link_tag <%= miufile.map{ |code| "'markitup/sets/#{code}/style.css'" }.join(',') %> %>
23
- <%%= javascript_include_tag <%= miufile.map{ |code| "'markitup/sets/#{code}/set.js'" }.join(',') %> %>
10
+ <%%= stylesheet_link_tag "application-bs" %>
11
+ <%%= javascript_include_tag "application-bs" %>
24
12
 
25
13
  <%%= csrf_meta_tags %>
26
14
  <%%= yield :head %>
27
15
  </head>
28
- <body>
29
- <div class="container-fluid">
30
- <div class="navbar navbar-fixed-top">
31
- <div class="navbar-inner">
32
- <div class="container">
33
- <a class="brand" href="#">
34
- Beautiful-Scaffold
35
- </a>
36
- <ul class="nav">
37
- <li class="active">
38
- <a href="/">Home</a>
39
- </li>
40
- </ul>
41
- <ul class="nav pull-right">
42
- <li>
43
- <!-- Beautiful_scaffold - Signin - Do not remove -->
44
- </li>
16
+ <body style="display:none;">
17
+ <div class="navbar navbar-fixed-top">
18
+ <div class="navbar-inner">
19
+ <div class="container">
20
+ <a class="brand" href="#">
21
+ Beautiful-Scaffold
22
+ </a>
23
+ <ul class="nav">
24
+ <li class="active">
25
+ <a href="/">Home</a>
26
+ </li>
27
+ <li class="hidden-desktop">
28
+ <!-- Mobile navbar -->
29
+ <a href="#" class="nopjax" data-toggle="collapse" data-target=".nav-collapse">
30
+ <i class="icon-th-list"></i>
31
+ </a>
32
+ </li>
33
+ </ul>
34
+ <ul class="nav pull-right">
35
+ <li>
36
+ <!-- Beautiful_scaffold - Signin - Do not remove -->
37
+ </li>
38
+ </ul>
39
+ <div class="nav-collapse collapse">
40
+ <ul class="nav hidden-desktop">
41
+ <%% @nopjax = "nopjax" %>
42
+ <%%= render :partial => "layouts/beautiful_menu" %>
45
43
  </ul>
46
44
  </div>
47
45
  </div>
48
46
  </div>
49
-
47
+ </div>
48
+ <div class="container-fluid">
50
49
  <div class="row-fluid">
51
50
  <div class="span2">
52
51
  <ul class="nav nav-list well">
@@ -92,19 +91,16 @@
92
91
  $('<%%= @opened_modal %>').modal('show');
93
92
  <%% end %>
94
93
  </script>
95
-
96
- <%%= javascript_include_tag "bootstrap.min", "bootstrap-alert", "bootstrap-datepicker" ,"bootstrap-timepicker", "bootstrap-dropdown", "bootstrap-modal", "bootstrap-tooltip", "bootstrap-colorpicker", "a-wysihtml5-0.3.0.min", "bootstrap-wysihtml5" %>
97
94
  <script type="text/javascript">
98
- ;(function($){
99
- $.fn.datepicker.dates['<%= I18n.locale.to_s %>'] = {
100
- days: <%= (I18n.t("date.day_names") + [I18n.t("date.day_names").first]).map(&:capitalize).to_s.html_safe %>,
101
- daysShort: <%= (I18n.t("date.abbr_day_names") + [I18n.t("date.abbr_day_names").first]).map(&:capitalize).to_s.html_safe %>,
102
- daysMin: <%= (I18n.t("date.abbr_day_names") + [I18n.t("date.abbr_day_names").first]).map{ |d| d.capitalize[0..2] }.to_s.html_safe %>,
103
- months: <%= I18n.t("date.month_names")[1..12].map(&:capitalize).to_s.html_safe %>,
104
- monthsShort: <%= I18n.t("date.abbr_month_names")[1..12].map(&:capitalize).to_s.html_safe %>
105
- };
106
- }(jQuery));
95
+ ;(function($){
96
+ $.fn.datepicker.dates['<%%= I18n.locale.to_s %>'] = {
97
+ days: <%%= (t("date.day_names") + [t("date.day_names").first]).map(&:capitalize).to_s.html_safe %>,
98
+ daysShort: <%%= (t("date.abbr_day_names") + [t("date.abbr_day_names").first]).map(&:capitalize).to_s.html_safe %>,
99
+ daysMin: <%%= (t("date.abbr_day_names") + [t("date.abbr_day_names").first]).map{ |d| d.capitalize[0..2] }.to_s.html_safe %>,
100
+ months: <%%= t("date.month_names")[1..12].map(&:capitalize).to_s.html_safe %>,
101
+ monthsShort: <%%= t("date.abbr_month_names")[1..12].map(&:capitalize).to_s.html_safe %>
102
+ };
103
+ }(jQuery));
107
104
  </script>
108
- <%%= javascript_include_tag "bootstrap-datetimepicker-for-beautiful-scaffold" %>
109
105
  </body>
110
106
  </html>
@@ -1,4 +1,4 @@
1
- <h2><%%= t(:new, :default => 'New') %> <%%= t(:<%= singular_table_name %>, :default => "<%= singular_table_name %>") %></h2>
1
+ <h2><%%= t(:new, :default => 'New') %> <%%= <%= i18n_t_m(singular_table_name) %> %></h2>
2
2
 
3
3
  <%%= render 'form' %>
4
4