railstrap 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (143) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +40 -0
  4. data/app/helpers/railstrap/application_helper.rb +260 -0
  5. data/config/routes.rb +2 -0
  6. data/lib/generators/railstrap/crud/USAGE +8 -0
  7. data/lib/generators/railstrap/crud/crud_generator.rb +160 -0
  8. data/lib/generators/railstrap/crud/templates/controller.rb +109 -0
  9. data/lib/generators/railstrap/crud/templates/view_edit.html.erb +12 -0
  10. data/lib/generators/railstrap/crud/templates/view_form.html.erb +18 -0
  11. data/lib/generators/railstrap/crud/templates/view_index.html.erb +11 -0
  12. data/lib/generators/railstrap/crud/templates/view_new.html.erb +12 -0
  13. data/lib/generators/railstrap/crud/templates/view_print.html.erb +13 -0
  14. data/lib/generators/railstrap/crud/templates/view_show.html.erb +14 -0
  15. data/lib/generators/railstrap/crud/templates/view_sidebar.html.erb +13 -0
  16. data/lib/generators/railstrap/crud/templates/view_signin.html.erb +36 -0
  17. data/lib/generators/railstrap/crud/templates/view_signup.html.erb +52 -0
  18. data/lib/generators/railstrap/crud/templates/view_text.html.erb +18 -0
  19. data/lib/generators/railstrap/install/install_generator.rb +74 -0
  20. data/lib/generators/railstrap/kaminari/templates/_first_page.html.erb +14 -0
  21. data/lib/generators/railstrap/kaminari/templates/_gap.html.erb +8 -0
  22. data/lib/generators/railstrap/kaminari/templates/_last_page.html.erb +14 -0
  23. data/lib/generators/railstrap/kaminari/templates/_next_page.html.erb +13 -0
  24. data/lib/generators/railstrap/kaminari/templates/_page.html.erb +12 -0
  25. data/lib/generators/railstrap/kaminari/templates/_paginator.html.erb +25 -0
  26. data/lib/generators/railstrap/kaminari/templates/_prev_page.html.erb +13 -0
  27. data/lib/generators/railstrap/layout/layout_generator.rb +30 -0
  28. data/lib/generators/railstrap/layout/templates/layout_railstrap.html.erb +134 -0
  29. data/lib/generators/railstrap/layout/templates/railstrap_painel.css.scss.erb +284 -0
  30. data/lib/generators/railstrap/layout/templates/railstrap_painel.js.erb +35 -0
  31. data/lib/railstrap.rb +9 -0
  32. data/lib/railstrap/action_controller.rb +29 -0
  33. data/lib/railstrap/active_record.rb +8 -0
  34. data/lib/railstrap/active_record/search.rb +52 -0
  35. data/lib/railstrap/engine.rb +29 -0
  36. data/lib/railstrap/version.rb +3 -0
  37. data/lib/tasks/railstrap_tasks.rake +4 -0
  38. data/test/dummy/README.rdoc +261 -0
  39. data/test/dummy/Rakefile +7 -0
  40. data/test/dummy/app/assets/javascripts/application.js +15 -0
  41. data/test/dummy/app/assets/javascripts/railstrap_painel.js +35 -0
  42. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  43. data/test/dummy/app/assets/stylesheets/railstrap_painel.css.scss +284 -0
  44. data/test/dummy/app/controllers/application_controller.rb +7 -0
  45. data/test/dummy/app/controllers/painel/authors_controller.rb +84 -0
  46. data/test/dummy/app/helpers/application_helper.rb +2 -0
  47. data/test/dummy/app/models/article.rb +3 -0
  48. data/test/dummy/app/models/author.rb +3 -0
  49. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  50. data/test/dummy/app/views/layouts/painel.html.erb +135 -0
  51. data/test/dummy/app/views/painel/authors/_form.html.erb +20 -0
  52. data/test/dummy/app/views/painel/authors/edit.html.erb +12 -0
  53. data/test/dummy/app/views/painel/authors/index.html.erb +12 -0
  54. data/test/dummy/app/views/painel/authors/new.html.erb +12 -0
  55. data/test/dummy/app/views/painel/authors/show.html.erb +14 -0
  56. data/test/dummy/config.ru +4 -0
  57. data/test/dummy/config/application.rb +56 -0
  58. data/test/dummy/config/boot.rb +10 -0
  59. data/test/dummy/config/database.yml +25 -0
  60. data/test/dummy/config/environment.rb +5 -0
  61. data/test/dummy/config/environments/development.rb +37 -0
  62. data/test/dummy/config/environments/production.rb +67 -0
  63. data/test/dummy/config/environments/test.rb +37 -0
  64. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  65. data/test/dummy/config/initializers/inflections.rb +15 -0
  66. data/test/dummy/config/initializers/mime_types.rb +5 -0
  67. data/test/dummy/config/initializers/secret_token.rb +7 -0
  68. data/test/dummy/config/initializers/session_store.rb +8 -0
  69. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  70. data/test/dummy/config/locales/en.yml +5 -0
  71. data/test/dummy/config/routes.rb +65 -0
  72. data/test/dummy/db/development.sqlite3 +0 -0
  73. data/test/dummy/db/migrate/20120604170000_create_articles.rb +12 -0
  74. data/test/dummy/db/migrate/20120604170057_create_authors.rb +10 -0
  75. data/test/dummy/db/schema.rb +31 -0
  76. data/test/dummy/log/development.log +3278 -0
  77. data/test/dummy/public/404.html +26 -0
  78. data/test/dummy/public/422.html +26 -0
  79. data/test/dummy/public/500.html +25 -0
  80. data/test/dummy/public/favicon.ico +0 -0
  81. data/test/dummy/script/rails +6 -0
  82. data/test/dummy/test/fixtures/articles.yml +13 -0
  83. data/test/dummy/test/fixtures/authors.yml +9 -0
  84. data/test/dummy/test/unit/article_test.rb +7 -0
  85. data/test/dummy/test/unit/author_test.rb +7 -0
  86. data/test/dummy/tmp/cache/assets/C86/B70/sprockets%2Fcd9a89973c62604382628d4b42365c1a +0 -0
  87. data/test/dummy/tmp/cache/assets/CB3/120/sprockets%2F0725460776a8a901aa58b85f4cce5456 +0 -0
  88. data/test/dummy/tmp/cache/assets/CDD/EE0/sprockets%2F7ab399ca754638905a70e366e1c1ab33 +0 -0
  89. data/test/dummy/tmp/cache/assets/CE2/EE0/sprockets%2Fd78ec4726951f44cb085d0db080960e3 +0 -0
  90. data/test/dummy/tmp/cache/assets/D09/2B0/sprockets%2F045947e6b2bba2ff33c67b51b63734a6 +0 -0
  91. data/test/dummy/tmp/cache/assets/D0B/A40/sprockets%2F241cecf5326c934ab0440a7c76ad7597 +0 -0
  92. data/test/dummy/tmp/cache/assets/D1D/870/sprockets%2Fa9e5ee43f30c1886f8d66c413395bd63 +0 -0
  93. data/test/dummy/tmp/cache/assets/D2B/DD0/sprockets%2Fddc372002f3306cc0d74fea616ed1138 +0 -0
  94. data/test/dummy/tmp/cache/assets/D46/920/sprockets%2F8f3c0c4bf52b27a6646e49751e4e8f0c +0 -0
  95. data/test/dummy/tmp/cache/assets/D72/0B0/sprockets%2F56e9ec06e41d1cf9d692d674b5ddb210 +0 -0
  96. data/test/dummy/tmp/cache/assets/D7C/A80/sprockets%2Fd2d9ec09fb9bc7f8a0758392420e5c7d +0 -0
  97. data/test/dummy/tmp/cache/assets/D7D/9D0/sprockets%2F28fea8457f4a95a2c2d34a6e77df509e +0 -0
  98. data/test/dummy/tmp/cache/assets/D98/3C0/sprockets%2F36f548ab10ebcf8badf47d2719bb8500 +0 -0
  99. data/test/dummy/tmp/cache/assets/DB6/7B0/sprockets%2F120aa322daea3a2aa3667ffd6931eb9b +0 -0
  100. data/test/dummy/tmp/cache/assets/DCB/E50/sprockets%2F89f6b8aeb7d09c0bad5151bab92e5f42 +0 -0
  101. data/test/dummy/tmp/cache/assets/DCF/B50/sprockets%2F5ef130bc93784a52897bbab7bbd4c8ea +0 -0
  102. data/test/dummy/tmp/cache/assets/DD4/B00/sprockets%2F518e3d3f425eccc9558a03f6ddd36ced +0 -0
  103. data/test/dummy/tmp/cache/assets/E53/040/sprockets%2Fb7edacfada15c14fe43ea3b5fc8e2463 +0 -0
  104. data/test/dummy/tmp/cache/sass/0c9acd3b93b1d41708045c7041c76bbf41b2e963/_bootstrap-responsive.scssc +997 -0
  105. data/test/dummy/tmp/cache/sass/0c9acd3b93b1d41708045c7041c76bbf41b2e963/_bootstrap.scssc +0 -0
  106. data/test/dummy/tmp/cache/sass/1ea5acef392f2f8c40312d480463a71d2049b360/railstrap_painel.css.scssc +0 -0
  107. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_accordion.scssc +0 -0
  108. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_alerts.scssc +0 -0
  109. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_breadcrumbs.scssc +0 -0
  110. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_button-groups.scssc +0 -0
  111. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_buttons.scssc +0 -0
  112. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_carousel.scssc +0 -0
  113. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_close.scssc +0 -0
  114. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_code.scssc +0 -0
  115. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_component-animations.scssc +0 -0
  116. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_dropdowns.scssc +0 -0
  117. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_forms.scssc +1494 -0
  118. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_grid.scssc +0 -0
  119. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_hero-unit.scssc +0 -0
  120. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_labels-badges.scssc +0 -0
  121. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_layouts.scssc +0 -0
  122. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_mixins.scssc +2620 -0
  123. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_modals.scssc +0 -0
  124. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_navbar.scssc +1209 -0
  125. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_navs.scssc +0 -0
  126. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_pager.scssc +0 -0
  127. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_pagination.scssc +0 -0
  128. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_popovers.scssc +0 -0
  129. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_progress-bars.scssc +0 -0
  130. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_reset.scssc +0 -0
  131. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_scaffolding.scssc +0 -0
  132. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_sprites.scssc +1064 -0
  133. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_tables.scssc +0 -0
  134. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_thumbnails.scssc +0 -0
  135. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_tooltip.scssc +0 -0
  136. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_type.scssc +0 -0
  137. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_utilities.scssc +0 -0
  138. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_variables.scssc +684 -0
  139. data/test/dummy/tmp/cache/sass/9891e82674b6910cebee3910c86e2ef69e96f15b/_wells.scssc +0 -0
  140. data/test/integration/navigation_test.rb +10 -0
  141. data/test/railstrap_test.rb +7 -0
  142. data/test/test_helper.rb +15 -0
  143. metadata +420 -0
@@ -0,0 +1,15 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // the compiled file.
9
+ //
10
+ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
+ // GO AFTER THE REQUIRES BELOW.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require_tree .
@@ -0,0 +1,35 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // the compiled file.
9
+ //
10
+ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
+ // GO AFTER THE REQUIRES BELOW.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ // = requ ire fle xa-themejs
16
+
17
+ //= require bootstrap-tooltip
18
+ //= require bootstrap-dropdown
19
+
20
+
21
+ // = requ ire ckeditor/init
22
+
23
+ $(function()
24
+ {
25
+
26
+ $('a[rel=tooltip]').tooltip();
27
+
28
+ //$('.tooltip').tooltip();
29
+
30
+ //var config = {
31
+ // skin:'kama'
32
+ //};
33
+
34
+ //$('.ckeditor_area').ckeditor(config);
35
+ });
@@ -0,0 +1,13 @@
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_tree .
13
+ */
@@ -0,0 +1,284 @@
1
+ /*
2
+ div.choices{
3
+ width:600px
4
+ }
5
+
6
+ div.choices ul.choices-group{
7
+ list-style-type: none;
8
+ list-style: none;
9
+ }
10
+
11
+ div.choices ul.choices-group li.choice label input{
12
+ float:left;
13
+ }
14
+
15
+ div.choices ul.choices-group li.choice label{
16
+ clear:left}
17
+
18
+ div.choices ul.choices-group li.choice{
19
+ float:left;
20
+ padding:4px;
21
+ width:145px;
22
+ }
23
+ */
24
+
25
+ /*
26
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
27
+ * listed below.
28
+ *
29
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
30
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
31
+ *
32
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
33
+ * compiled file, but it's generally better to create a new file per style scope.
34
+ *
35
+ * = requ ire_self
36
+ * = requ ire_tree .
37
+ * = req uire bootstrap
38
+ */
39
+
40
+ //$linkColor: green;
41
+
42
+ // change grid
43
+ //$gridColumnWidth: 70px;
44
+ //$gridGutterWidth: 10px;
45
+
46
+ //----------------------------------
47
+ //teste de override
48
+ // Navbar
49
+ $navbarHeight: 40px;
50
+ $navbarBackground: #3196B4;
51
+ $navbarBackgroundHighlight: #53B8D6;
52
+ $navbarLinkBackgroundHover: transparent;
53
+
54
+ //$navbarText: $grayLight;
55
+ $navbarText: white;
56
+ $navbarLinkColor: white;
57
+ $navbarLinkColorHover: #ffe62f;
58
+ //----------------------------------
59
+
60
+ //@import "variables"; // Modify this for custom colors, font-sizes, etc
61
+
62
+ // Sprite icons path
63
+ // -------------------------
64
+ //$iconSpritePath: image-path("glyphicons-halflings.png");
65
+ //$iconSpritePath: asset-path("glyphicons-halflings.png",image);
66
+ //$iconWhiteSpritePath: image-path("glyphicons-halflings-white.png");
67
+ //$iconWhiteSpritePath: asset-path("glyphicons-halflings-white.png",image);
68
+ // ----------------------------------
69
+
70
+ // import original bootstrap
71
+ @import "bootstrap";
72
+
73
+ /*
74
+ INCLUIR ISSO ENTRE a
75
+ chamada do "bootstrap"
76
+ e a chamada do "responsive"
77
+ */
78
+ body {
79
+ padding-top: 60px;
80
+ padding-bottom: 40px;
81
+ }
82
+
83
+ .sidebar-nav {
84
+ padding: 9px 0;
85
+ }
86
+
87
+
88
+ .navbar-search .search-query {
89
+ background-color:#FFFFFF;
90
+ }
91
+
92
+
93
+ /*
94
+ Cabeçalho da Tabela
95
+ */
96
+ html body div.container-fluid table.table thead tr th,
97
+ html body div.container table.table thead tr th{
98
+ padding: 4px 10px 4px;
99
+ font-size: 13px;
100
+ line-height: 18px;
101
+ color: #333;
102
+ text-align: center;
103
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
104
+ background-color: #FAFAFA;
105
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(white), color-stop(25%, white), to(#E6E6E6));
106
+ background-image: -webkit-linear-gradient(white, white 25%, #E6E6E6);
107
+ background-image: -moz-linear-gradient(top, white, white 25%, #E6E6E6);
108
+ background-image: -ms-linear-gradient(white, white 25%, #E6E6E6);
109
+ background-image: -o-linear-gradient(white, white 25%, #E6E6E6);
110
+ background-image: linear-gradient(white, white 25%, #E6E6E6);
111
+ background-repeat: no-repeat;
112
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
113
+ }
114
+ //------------------
115
+
116
+ //BOTAO da Tabela
117
+ .btn-smallest {
118
+ margin-left: 3px;
119
+ padding: 1px 2px;
120
+ font-size: 11px;
121
+ line-height: 16px;
122
+ }
123
+ //-------------
124
+
125
+
126
+ //-----------------------------------
127
+ .boolean div.controls label.checkbox input.boolean{
128
+ float:none;
129
+ cursor:pointer;
130
+ }
131
+
132
+ .boolean div.controls label.checkbox {
133
+ cursor:pointer;
134
+ }
135
+
136
+ .radio input[type="radio"], .checkbox input[type="checkbox"]{
137
+ /*clear:both;*/
138
+ }
139
+
140
+ //-----------------------------------
141
+ .form-search{
142
+ margin:0;
143
+ margin-right: 5px;
144
+ }
145
+
146
+ .form-search-top input{
147
+ width:120px;
148
+ }
149
+
150
+
151
+ html body div.container-fluid,
152
+ html body div.container {
153
+ /* padding-top:40px;*/
154
+ }
155
+
156
+ html body div.container-fluid table.table thead tr th,
157
+ html body div.container table.table thead tr th {
158
+ color:#305B7F;
159
+ }
160
+ /*
161
+ table.table {
162
+ margin-top:10px;
163
+ }*/
164
+
165
+ .pagination{
166
+ margin:0;
167
+ }
168
+
169
+
170
+ .subnav ul.nav div.pagination{
171
+ margin-left: 5px;
172
+ }
173
+
174
+ //-----------------------------------
175
+ /* Subnav */
176
+ .subnav {
177
+ width: 100%;
178
+ height: 36px;
179
+ background-color: #eeeeee; /* Old browsers */
180
+ background-repeat: repeat-x; /* Repeat the gradient */
181
+ background-image: -moz-linear-gradient(top, #f5f5f5 0%, #eeeeee 100%); /* FF3.6+ */
182
+ background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f5f5f5), color-stop(100%,#eeeeee)); /* Chrome,Safari4+ */
183
+ background-image: -webkit-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Chrome 10+,Safari 5.1+ */
184
+ background-image: -ms-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* IE10+ */
185
+ background-image: -o-linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* Opera 11.10+ */
186
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f5f5f5', endColorstr='#eeeeee',GradientType=0 ); /* IE6-9 */
187
+ background-image: linear-gradient(top, #f5f5f5 0%,#eeeeee 100%); /* W3C */
188
+ border: 1px solid #e5e5e5;
189
+ -webkit-border-radius: 4px;
190
+ -moz-border-radius: 4px;
191
+ border-radius: 4px;
192
+ }
193
+ .subnav .nav {
194
+ margin-bottom: 0;
195
+ }
196
+ .subnav .nav > li > a {
197
+ margin: 0;
198
+ padding-top: 11px;
199
+ padding-bottom: 11px;
200
+ border-left: 1px solid #f5f5f5;
201
+ border-right: 1px solid #e5e5e5;
202
+ -webkit-border-radius: 0;
203
+ -moz-border-radius: 0;
204
+ border-radius: 0;
205
+ }
206
+ .subnav .nav > .active > a,
207
+ .subnav .nav > .active > a:hover {
208
+ padding-left: 13px;
209
+ color: #777;
210
+ background-color: #e9e9e9;
211
+ border-right-color: #ddd;
212
+ border-left: 0;
213
+ -webkit-box-shadow: inset 0 3px 5px rgba(0,0,0,.05);
214
+ -moz-box-shadow: inset 0 3px 5px rgba(0,0,0,.05);
215
+ box-shadow: inset 0 3px 5px rgba(0,0,0,.05);
216
+ }
217
+ .subnav .nav > .active > a .caret,
218
+ .subnav .nav > .active > a:hover .caret {
219
+ border-top-color: #777;
220
+ }
221
+ .subnav .nav > li:first-child > a,
222
+ .subnav .nav > li:first-child > a:hover {
223
+ border-left: 0;
224
+ padding-left: 12px;
225
+ -webkit-border-radius: 4px 0 0 4px;
226
+ -moz-border-radius: 4px 0 0 4px;
227
+ border-radius: 4px 0 0 4px;
228
+ }
229
+ .subnav .nav > li:last-child > a {
230
+ border-right: 0;
231
+ }
232
+ .subnav .dropdown-menu {
233
+ -webkit-border-radius: 0 0 4px 4px;
234
+ -moz-border-radius: 0 0 4px 4px;
235
+ border-radius: 0 0 4px 4px;
236
+ }
237
+
238
+ /* Fixed subnav on scroll, but only for 980px and up (sorry IE!) */
239
+ @media (min-width: 980px) {
240
+ .subnav-fixed {
241
+ position: fixed;
242
+ top: 40px;
243
+ left: 0;
244
+ right: 0;
245
+ z-index: 1020; /* 10 less than .navbar-fixed to prevent any overlap */
246
+ border-color: #d5d5d5;
247
+ border-width: 0 0 1px; /* drop the border on the fixed edges */
248
+ -webkit-border-radius: 0;
249
+ -moz-border-radius: 0;
250
+ border-radius: 0;
251
+ -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
252
+ -moz-box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
253
+ box-shadow: inset 0 1px 0 #fff, 0 1px 5px rgba(0,0,0,.1);
254
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); /* IE6-9 */
255
+ }
256
+ .subnav-fixed .nav {
257
+ /* width: 938px; */
258
+ margin: 0 auto;
259
+ padding: 0 1px;
260
+ }
261
+ .subnav .nav > li:first-child > a,
262
+ .subnav .nav > li:first-child > a:hover {
263
+ -webkit-border-radius: 0;
264
+ -moz-border-radius: 0;
265
+ border-radius: 0;
266
+ }
267
+ }
268
+ //-----------------------------------
269
+
270
+ .painel_logado a{
271
+ color: #FFE62F;
272
+ font-weight:bold;
273
+ line-height: 19px;
274
+ padding: 12px 10px 11px;
275
+ text-decoration: none;
276
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
277
+ }
278
+
279
+ .painel_logado a:hover{
280
+ background-color: #3196B4;
281
+ }
282
+
283
+ //-------------------------------------
284
+ @import "bootstrap-responsive";
@@ -0,0 +1,7 @@
1
+ class ApplicationController < ActionController::Base
2
+ protect_from_forgery
3
+
4
+ layout 'painel'
5
+
6
+ #before_filter :tb_namespace
7
+ end
@@ -0,0 +1,84 @@
1
+
2
+ class Painel::AuthorsController < ApplicationController
3
+ # GET /painel/authors
4
+ # GET /painel/authors.json
5
+ def index
6
+ @authors = Author.tb_search(:search => {:text => params[:search],:fields => ['id']}, :page => params[:page])
7
+
8
+ respond_to do |format|
9
+ format.html # index.html.erb
10
+ format.json { render :json => @authors }
11
+ end
12
+ end
13
+
14
+ # GET /painel/authors/1
15
+ # GET /painel/authors/1.json
16
+ def show
17
+ @author = Author.find(params[:id])
18
+
19
+ respond_to do |format|
20
+ format.html # show.html.erb
21
+ format.json { render :json => @author }
22
+ end
23
+ end
24
+
25
+ # GET /painel/authors/new
26
+ # GET /painel/authors/new.json
27
+ def new
28
+ @author = Author.new
29
+
30
+ respond_to do |format|
31
+ format.html # new.html.erb
32
+ format.json { render :json => @author }
33
+ end
34
+ end
35
+
36
+ # GET /painel/authors/1/edit
37
+ def edit
38
+ @author = Author.find(params[:id])
39
+ end
40
+
41
+ # POST /painel/authors
42
+ # POST /painel/authors.json
43
+ def create
44
+ @author = Author.new(params[:author])
45
+
46
+ respond_to do |format|
47
+ if @author.save
48
+ format.html { redirect_to painel_author_path(@author), :notice => 'Author was successfully created.' }
49
+ format.json { render :json => @author, :status => :created, :location => @author }
50
+ else
51
+ format.html { render :action => "new" }
52
+ format.json { render :json => @author.errors , :status => :unprocessable_entity }
53
+ end
54
+ end
55
+ end
56
+
57
+ # PATCH/PUT /painel/authors/1
58
+ # PATCH/PUT /painel/authors/1.json
59
+ def update
60
+ @author = Author.find(params[:id])
61
+
62
+ respond_to do |format|
63
+ if @author.update_attributes(params[:author])
64
+ format.html { redirect_to painel_author_path(@author), :notice => 'Author was successfully updated.' }
65
+ format.json { head :ok }
66
+ else
67
+ format.html { render :action => "edit" }
68
+ format.json { render :json => @author.errors, :status => :unprocessable_entity }
69
+ end
70
+ end
71
+ end
72
+
73
+ # DELETE /painel/authors/1
74
+ # DELETE /painel/authors/1.json
75
+ def destroy
76
+ @author = Author.find(params[:id])
77
+ @author.destroy
78
+
79
+ respond_to do |format|
80
+ format.html { redirect_to painel_authors_url }
81
+ format.json { head :ok }
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end