tennpipes-su 3.6.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +20 -0
  3. data/README.rdoc +70 -0
  4. data/Rakefile +22 -0
  5. data/lib/tennpipes-su.rb +35 -0
  6. data/lib/tennpipes-su/access_control.rb +191 -0
  7. data/lib/tennpipes-su/bootstrap-less/alerts.less +67 -0
  8. data/lib/tennpipes-su/bootstrap-less/badges.less +55 -0
  9. data/lib/tennpipes-su/bootstrap-less/bootstrap.less +49 -0
  10. data/lib/tennpipes-su/bootstrap-less/breadcrumbs.less +26 -0
  11. data/lib/tennpipes-su/bootstrap-less/button-groups.less +226 -0
  12. data/lib/tennpipes-su/bootstrap-less/buttons.less +155 -0
  13. data/lib/tennpipes-su/bootstrap-less/carousel.less +232 -0
  14. data/lib/tennpipes-su/bootstrap-less/close.less +33 -0
  15. data/lib/tennpipes-su/bootstrap-less/code.less +63 -0
  16. data/lib/tennpipes-su/bootstrap-less/component-animations.less +29 -0
  17. data/lib/tennpipes-su/bootstrap-less/dropdowns.less +213 -0
  18. data/lib/tennpipes-su/bootstrap-less/font-awesome/bordered-pulled.less +16 -0
  19. data/lib/tennpipes-su/bootstrap-less/font-awesome/core.less +12 -0
  20. data/lib/tennpipes-su/bootstrap-less/font-awesome/fixed-width.less +6 -0
  21. data/lib/tennpipes-su/bootstrap-less/font-awesome/font-awesome.less +17 -0
  22. data/lib/tennpipes-su/bootstrap-less/font-awesome/icons.less +412 -0
  23. data/lib/tennpipes-su/bootstrap-less/font-awesome/larger.less +13 -0
  24. data/lib/tennpipes-su/bootstrap-less/font-awesome/list.less +19 -0
  25. data/lib/tennpipes-su/bootstrap-less/font-awesome/mixins.less +20 -0
  26. data/lib/tennpipes-su/bootstrap-less/font-awesome/path.less +14 -0
  27. data/lib/tennpipes-su/bootstrap-less/font-awesome/rotated-flipped.less +9 -0
  28. data/lib/tennpipes-su/bootstrap-less/font-awesome/spinning.less +30 -0
  29. data/lib/tennpipes-su/bootstrap-less/font-awesome/stacked.less +20 -0
  30. data/lib/tennpipes-su/bootstrap-less/font-awesome/variables.less +381 -0
  31. data/lib/tennpipes-su/bootstrap-less/forms.less +419 -0
  32. data/lib/tennpipes-su/bootstrap-less/glyphicons.less +233 -0
  33. data/lib/tennpipes-su/bootstrap-less/grid.less +100 -0
  34. data/lib/tennpipes-su/bootstrap-less/input-groups.less +157 -0
  35. data/lib/tennpipes-su/bootstrap-less/jumbotron.less +44 -0
  36. data/lib/tennpipes-su/bootstrap-less/labels.less +64 -0
  37. data/lib/tennpipes-su/bootstrap-less/list-group.less +110 -0
  38. data/lib/tennpipes-su/bootstrap-less/media.less +56 -0
  39. data/lib/tennpipes-su/bootstrap-less/mixins.less +926 -0
  40. data/lib/tennpipes-su/bootstrap-less/modals.less +138 -0
  41. data/lib/tennpipes-su/bootstrap-less/navbar.less +616 -0
  42. data/lib/tennpipes-su/bootstrap-less/navs.less +242 -0
  43. data/lib/tennpipes-su/bootstrap-less/normalize.less +423 -0
  44. data/lib/tennpipes-su/bootstrap-less/pager.less +55 -0
  45. data/lib/tennpipes-su/bootstrap-less/pagination.less +88 -0
  46. data/lib/tennpipes-su/bootstrap-less/panels.less +230 -0
  47. data/lib/tennpipes-su/bootstrap-less/popovers.less +133 -0
  48. data/lib/tennpipes-su/bootstrap-less/print.less +101 -0
  49. data/lib/tennpipes-su/bootstrap-less/progress-bars.less +80 -0
  50. data/lib/tennpipes-su/bootstrap-less/responsive-utilities.less +93 -0
  51. data/lib/tennpipes-su/bootstrap-less/scaffolding.less +134 -0
  52. data/lib/tennpipes-su/bootstrap-less/tables.less +233 -0
  53. data/lib/tennpipes-su/bootstrap-less/tennpipes-su.less +18 -0
  54. data/lib/tennpipes-su/bootstrap-less/theme.less +247 -0
  55. data/lib/tennpipes-su/bootstrap-less/thumbnails.less +36 -0
  56. data/lib/tennpipes-su/bootstrap-less/tooltip.less +95 -0
  57. data/lib/tennpipes-su/bootstrap-less/type.less +296 -0
  58. data/lib/tennpipes-su/bootstrap-less/utilities.less +56 -0
  59. data/lib/tennpipes-su/bootstrap-less/variables.less +827 -0
  60. data/lib/tennpipes-su/bootstrap-less/wells.less +29 -0
  61. data/lib/tennpipes-su/generators/actions.rb +78 -0
  62. data/lib/tennpipes-su/generators/admin_app.rb +169 -0
  63. data/lib/tennpipes-su/generators/admin_page.rb +68 -0
  64. data/lib/tennpipes-su/generators/orm.rb +172 -0
  65. data/lib/tennpipes-su/generators/templates/account/activerecord.rb.tt +41 -0
  66. data/lib/tennpipes-su/generators/templates/account/couchrest.rb.tt +67 -0
  67. data/lib/tennpipes-su/generators/templates/account/datamapper.rb.tt +56 -0
  68. data/lib/tennpipes-su/generators/templates/account/dynamoid.rb.tt +55 -0
  69. data/lib/tennpipes-su/generators/templates/account/minirecord.rb.tt +44 -0
  70. data/lib/tennpipes-su/generators/templates/account/mongoid.rb.tt +54 -0
  71. data/lib/tennpipes-su/generators/templates/account/mongomapper.rb.tt +47 -0
  72. data/lib/tennpipes-su/generators/templates/account/ohm.rb.tt +70 -0
  73. data/lib/tennpipes-su/generators/templates/account/seeds.rb.tt +29 -0
  74. data/lib/tennpipes-su/generators/templates/account/sequel.rb.tt +53 -0
  75. data/lib/tennpipes-su/generators/templates/app.rb.tt +42 -0
  76. data/lib/tennpipes-su/generators/templates/app/controllers/base.rb.tt +5 -0
  77. data/lib/tennpipes-su/generators/templates/app/controllers/sessions.rb.tt +29 -0
  78. data/lib/tennpipes-su/generators/templates/assets/images/favicon.ico +0 -0
  79. data/lib/tennpipes-su/generators/templates/assets/images/font/FontAwesome.otf +0 -0
  80. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.eot +0 -0
  81. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.svg +414 -0
  82. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.ttf +0 -0
  83. data/lib/tennpipes-su/generators/templates/assets/images/font/fontawesome-webfont.woff +0 -0
  84. data/lib/tennpipes-su/generators/templates/assets/images/logo.png +0 -0
  85. data/lib/tennpipes-su/generators/templates/assets/javascripts/application.js +118 -0
  86. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/affix.js +137 -0
  87. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/alert.js +88 -0
  88. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +6 -0
  89. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/button.js +107 -0
  90. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/carousel.js +205 -0
  91. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/collapse.js +170 -0
  92. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/dropdown.js +147 -0
  93. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/modal.js +243 -0
  94. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/popover.js +110 -0
  95. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/scrollspy.js +153 -0
  96. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/tab.js +125 -0
  97. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/tooltip.js +399 -0
  98. data/lib/tennpipes-su/generators/templates/assets/javascripts/bootstrap/transition.js +48 -0
  99. data/lib/tennpipes-su/generators/templates/assets/javascripts/jquery-1.11.0.min.js +4 -0
  100. data/lib/tennpipes-su/generators/templates/assets/stylesheets/application.css +353 -0
  101. data/lib/tennpipes-su/generators/templates/assets/stylesheets/bootstrap.css +4 -0
  102. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/FontAwesome.otf +0 -0
  103. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.eot +0 -0
  104. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.svg +414 -0
  105. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.ttf +0 -0
  106. data/lib/tennpipes-su/generators/templates/assets/stylesheets/fonts/fontawesome-webfont.woff +0 -0
  107. data/lib/tennpipes-su/generators/templates/erb/app/base/index.erb.tt +15 -0
  108. data/lib/tennpipes-su/generators/templates/erb/app/errors/403.erb.tt +3 -0
  109. data/lib/tennpipes-su/generators/templates/erb/app/errors/404.erb.tt +3 -0
  110. data/lib/tennpipes-su/generators/templates/erb/app/errors/500.erb.tt +3 -0
  111. data/lib/tennpipes-su/generators/templates/erb/app/layouts/application.erb.tt +64 -0
  112. data/lib/tennpipes-su/generators/templates/erb/app/layouts/error.erb.tt +23 -0
  113. data/lib/tennpipes-su/generators/templates/erb/app/sessions/new.erb.tt +44 -0
  114. data/lib/tennpipes-su/generators/templates/erb/page/_form.erb.tt +18 -0
  115. data/lib/tennpipes-su/generators/templates/erb/page/edit.erb.tt +10 -0
  116. data/lib/tennpipes-su/generators/templates/erb/page/index.erb.tt +81 -0
  117. data/lib/tennpipes-su/generators/templates/erb/page/new.erb.tt +9 -0
  118. data/lib/tennpipes-su/generators/templates/haml/app/base/index.haml.tt +12 -0
  119. data/lib/tennpipes-su/generators/templates/haml/app/errors/403.haml.tt +3 -0
  120. data/lib/tennpipes-su/generators/templates/haml/app/errors/404.haml.tt +3 -0
  121. data/lib/tennpipes-su/generators/templates/haml/app/errors/500.haml.tt +3 -0
  122. data/lib/tennpipes-su/generators/templates/haml/app/layouts/application.haml.tt +49 -0
  123. data/lib/tennpipes-su/generators/templates/haml/app/layouts/error.haml.tt +18 -0
  124. data/lib/tennpipes-su/generators/templates/haml/app/sessions/new.haml.tt +38 -0
  125. data/lib/tennpipes-su/generators/templates/haml/page/_form.haml.tt +16 -0
  126. data/lib/tennpipes-su/generators/templates/haml/page/edit.haml.tt +8 -0
  127. data/lib/tennpipes-su/generators/templates/haml/page/index.haml.tt +58 -0
  128. data/lib/tennpipes-su/generators/templates/haml/page/new.haml.tt +7 -0
  129. data/lib/tennpipes-su/generators/templates/page/controller.rb.tt +92 -0
  130. data/lib/tennpipes-su/generators/templates/slim/app/base/index.slim.tt +12 -0
  131. data/lib/tennpipes-su/generators/templates/slim/app/errors/403.slim.tt +3 -0
  132. data/lib/tennpipes-su/generators/templates/slim/app/errors/404.slim.tt +3 -0
  133. data/lib/tennpipes-su/generators/templates/slim/app/errors/500.slim.tt +3 -0
  134. data/lib/tennpipes-su/generators/templates/slim/app/layouts/application.slim.tt +48 -0
  135. data/lib/tennpipes-su/generators/templates/slim/app/layouts/error.slim.tt +19 -0
  136. data/lib/tennpipes-su/generators/templates/slim/app/sessions/new.slim.tt +37 -0
  137. data/lib/tennpipes-su/generators/templates/slim/page/_form.slim.tt +16 -0
  138. data/lib/tennpipes-su/generators/templates/slim/page/edit.slim.tt +8 -0
  139. data/lib/tennpipes-su/generators/templates/slim/page/index.slim.tt +56 -0
  140. data/lib/tennpipes-su/generators/templates/slim/page/new.slim.tt +7 -0
  141. data/lib/tennpipes-su/helpers/authentication_helpers.rb +108 -0
  142. data/lib/tennpipes-su/helpers/view_helpers.rb +87 -0
  143. data/lib/tennpipes-su/locale/admin/cs.yml +56 -0
  144. data/lib/tennpipes-su/locale/admin/da.yml +56 -0
  145. data/lib/tennpipes-su/locale/admin/de.yml +56 -0
  146. data/lib/tennpipes-su/locale/admin/en.yml +56 -0
  147. data/lib/tennpipes-su/locale/admin/es.yml +56 -0
  148. data/lib/tennpipes-su/locale/admin/fr.yml +56 -0
  149. data/lib/tennpipes-su/locale/admin/hu.yml +56 -0
  150. data/lib/tennpipes-su/locale/admin/it.yml +56 -0
  151. data/lib/tennpipes-su/locale/admin/ja.yml +57 -0
  152. data/lib/tennpipes-su/locale/admin/lv.yml +56 -0
  153. data/lib/tennpipes-su/locale/admin/nl.yml +56 -0
  154. data/lib/tennpipes-su/locale/admin/no.yml +56 -0
  155. data/lib/tennpipes-su/locale/admin/pl.yml +56 -0
  156. data/lib/tennpipes-su/locale/admin/pt_br.yml +56 -0
  157. data/lib/tennpipes-su/locale/admin/ro.yml +56 -0
  158. data/lib/tennpipes-su/locale/admin/ru.yml +57 -0
  159. data/lib/tennpipes-su/locale/admin/sv.yml +56 -0
  160. data/lib/tennpipes-su/locale/admin/tr.yml +56 -0
  161. data/lib/tennpipes-su/locale/admin/uk.yml +56 -0
  162. data/lib/tennpipes-su/locale/admin/zh_cn.yml +56 -0
  163. data/lib/tennpipes-su/locale/admin/zh_tw.yml +56 -0
  164. data/lib/tennpipes-su/locale/orm/cs.yml +12 -0
  165. data/lib/tennpipes-su/locale/orm/da.yml +12 -0
  166. data/lib/tennpipes-su/locale/orm/de.yml +12 -0
  167. data/lib/tennpipes-su/locale/orm/en.yml +12 -0
  168. data/lib/tennpipes-su/locale/orm/es.yml +12 -0
  169. data/lib/tennpipes-su/locale/orm/fr.yml +12 -0
  170. data/lib/tennpipes-su/locale/orm/hu.yml +12 -0
  171. data/lib/tennpipes-su/locale/orm/it.yml +12 -0
  172. data/lib/tennpipes-su/locale/orm/ja.yml +12 -0
  173. data/lib/tennpipes-su/locale/orm/lv.yml +12 -0
  174. data/lib/tennpipes-su/locale/orm/nl.yml +12 -0
  175. data/lib/tennpipes-su/locale/orm/no.yml +12 -0
  176. data/lib/tennpipes-su/locale/orm/pl.yml +38 -0
  177. data/lib/tennpipes-su/locale/orm/pt_br.yml +12 -0
  178. data/lib/tennpipes-su/locale/orm/ro.yml +12 -0
  179. data/lib/tennpipes-su/locale/orm/ru.yml +12 -0
  180. data/lib/tennpipes-su/locale/orm/sv.yml +12 -0
  181. data/lib/tennpipes-su/locale/orm/tr.yml +12 -0
  182. data/lib/tennpipes-su/locale/orm/uk.yml +12 -0
  183. data/lib/tennpipes-su/locale/orm/zh_cn.yml +12 -0
  184. data/lib/tennpipes-su/locale/orm/zh_tw.yml +12 -0
  185. data/test/fixtures/sequel.rb +72 -0
  186. data/test/generators/test_account_model_generator.rb +108 -0
  187. data/test/generators/test_admin_app_generator.rb +218 -0
  188. data/test/generators/test_admin_page_generator.rb +140 -0
  189. data/test/helper.rb +47 -0
  190. data/test/test_admin_application.rb +271 -0
  191. data/test/test_locale.rb +25 -0
  192. metadata +298 -0
@@ -0,0 +1,15 @@
1
+ <div class=base-text>
2
+ <p>Tennpipes is a ruby framework built upon the Sinatra web library.</p>
3
+ <p>It was created to make it fun and easy to code more advanced web applications while still adhering to the spirit that makes Sinatra great!</p>
4
+ <p>Tennpipes comes shipped with a slick and beautiful Admin Interface, with the following features:</p>
5
+ </div>
6
+
7
+ <div class=base-icons>
8
+ <div class=btn-group>
9
+ <div class="btn btn-primary" title="Adapters for datamapper, sequel, activerecord, minirecord, mongomapper, mongoid, couchrest"><%%= tag_icon("cogs fa-2x", "Orm Agnostic") %></div>
10
+ <div class="btn btn-success" title="User Authentication Support, User Authorization Management"><%%= tag_icon("group fa-2x", "Authentication") %></div>
11
+ <div class="btn btn-info" title="Erb, Haml, Slim Rendering Support"><%%= tag_icon("tasks fa-2x", "Template Agnostic") %></div>
12
+ <div class="btn btn-warning" title="English, German, Russian, Danish, French, Brazilian and Italian localizations and many more!.."><%%= tag_icon("flag fa-2x", "Multi Language") %></div>
13
+ <div class="btn btn-danger" title="You can create a new 'admin interface' by providing a single Model"><%%= tag_icon("magic fa-2x", "Scaffold") %></div>
14
+ </div>
15
+ </div>
@@ -0,0 +1,3 @@
1
+ <p><%%= tag_icon 'minus-circle fa-3x' %></p>
2
+ <h1><%%= pat('custom_errors.403.title') %></h1>
3
+ <p><%%= pat('custom_errors.403.description') %></p>
@@ -0,0 +1,3 @@
1
+ <p><%%= tag_icon 'exclamation-triangle fa-3x' %></p>
2
+ <h1><%%= pat('custom_errors.404.title') %></h1>
3
+ <p><%%= pat('custom_errors.404.description') %></p>
@@ -0,0 +1,3 @@
1
+ <p><%%= tag_icon 'flask fa-3x' %></p>
2
+ <h1><%%= pat('custom_errors.500.title') %></h1>
3
+ <p><%%= pat('custom_errors.500.description') %></p>
@@ -0,0 +1,64 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
5
+ <!--[if lt IE 9]>
6
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
7
+ <![endif]-->
8
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
9
+ <meta name=viewport content='width=device-width,initial-scale=1' />
10
+ <title><%%= @title.present? ? "#{@title} | Tennpipes Admin" : "Tennpipes Admin" %></title>
11
+ <%%= favicon_tag "favicon.ico" %>
12
+ <link href='http://fonts.googleapis.com/css?family=Varela' rel=stylesheet />
13
+ <%%= stylesheet_link_tag 'bootstrap', 'application' %>
14
+ </head>
15
+ <body>
16
+ <div class="navbar navbar-fixed-top">
17
+ <div class=navbar-inner>
18
+ <div class=container>
19
+ <%%= link_to 'Tennpipes', url(:base, :index), :class => 'navbar-brand', :title => 'Tennpipes Admin' %>
20
+ <ul class="nav navbar-nav pull-right">
21
+ <li class=navbar-edit-account><%%= link_to tag_icon(:user), url(:<%= @model_plural %>, :edit, :id => current_account.id), :title => pat(:profile), :class => 'navbar-nav-link' %></li>
22
+ <li class=navbar-logout>
23
+ <%%= button_to(:logout, url(:sessions, :destroy), :method => :delete, :class => 'navbar-nav-form') { content_tag :button, tag_icon(:'power-off'), :type => :submit, :title => pat(:logout), :class => 'navbar-nav-form-link' } %>
24
+ </li>
25
+ </ul>
26
+
27
+ <ul class="nav navbar-nav pull-left">
28
+ <%% project_modules.each do |project_module| %>
29
+ <%% if request.path_info =~ /^#{project_module.path}/ %>
30
+ <li class="navbar-module active">
31
+ <%% else %>
32
+ <li class=navbar-module>
33
+ <%% end %>
34
+ <%%= link_to project_module.human_name, url(project_module.path) %>
35
+ </li>
36
+ <%% end %>
37
+ </ul>
38
+ </div>
39
+ </div>
40
+ </div>
41
+
42
+ <div class='container main'>
43
+ <div class='main-wrapper'>
44
+ <%%= {:error => 'danger', :warning => 'warning', :success => 'success', :notice => 'info'}.map { |type, class_name| flash_tag(type, :class => "alert alert-#{class_name} fade in", :bootstrap => true) }.join.html_safe %>
45
+ <div class='row'><%%= yield %></div>
46
+ <div class='main-wrapper-push'></div>
47
+ </div>
48
+ </div>
49
+
50
+ <footer>
51
+ <div class='footer-wrapper container'>
52
+ <p class='pull-left'>Copyright &copy; <%= Time.now.year %> Your Site - Powered by Tennpipes v.<%= Tennpipes.version %></p>
53
+ <ul class='pull-right footer-links'>
54
+ <li><%%= link_to tag_icon(:home, 'web'), 'http://www.tennpipesrb.com', :target => :_blank, :class => 'footer-links-link' %></li>
55
+ <li><%%= link_to tag_icon(:heart, 'blog'), 'http://www.tennpipesrb.com/blog', :target => :_blank, :class => 'footer-links-link' %></li>
56
+ <li><%%= link_to tag_icon(:github, 'code'), 'https://github.com/tennpipes/tennpipes-framework', :target => :_blank, :class => 'footer-links-link' %></li>
57
+ <li><%%= link_to tag_icon(:twitter, 'twitter'), 'http://twitter.com/tennpipesrb', :target => :_blank, :class => 'footer-links-link' %></li>
58
+ </ul>
59
+ </div>
60
+ </footer>
61
+
62
+ <%%= javascript_include_tag 'jquery-1.11.0.min', (Tennpipes.env == :production ? 'bootstrap/bootstrap.min' : %w[bootstrap/affix bootstrap/alert bootstrap/button bootstrap/carousel bootstrap/collapse bootstrap/dropdown bootstrap/tooltip bootstrap/transition bootstrap/modal bootstrap/popover bootstrap/scrollspy bootstrap/tab]), :application %>
63
+ </body>
64
+ </html>
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
5
+ <!--[if lt IE 9]>
6
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
7
+ <![endif]-->
8
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
9
+ <meta name=viewport content='width=device-width,initial-scale=1' />
10
+ <title><%%= @title.present? ? "#{@title} | Tennpipes Admin" : "#{pat(:custom_errors.title)} | Tennpipes Admin" %></title>
11
+ <%%= favicon_tag "favicon.ico" %>
12
+ <link href='http://fonts.googleapis.com/css?family=Varela' rel=stylesheet />
13
+ <%%= stylesheet_link_tag 'bootstrap', 'application' %>
14
+ </head>
15
+ <body>
16
+ <div class="custom-error text-center">
17
+ <div class="custom-error-body muted"><%%= yield %></div>
18
+ <div class="custom-error-footer">
19
+ <%%= link_to tag_icon('arrow-left'),"#", :onclick => "history.go(-1);return false;", :class =>"custom-error-go-back btn btn-default pull-left", :title => "Go back" %>
20
+ </div>
21
+ </div>
22
+ </body>
23
+ </html>
@@ -0,0 +1,44 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
5
+ <!--[if lt IE 9]>
6
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
7
+ <![endif]-->
8
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
9
+ <meta name=viewport content='width=device-width,initial-scale=1' />
10
+ <title><%%= @title.present? ? "#{@title} | Tennpipes Admin" : "#{pat('login.title')} | Tennpipes Admin" %></title>
11
+ <%%= favicon_tag "favicon.ico" %>
12
+ <%%= stylesheet_link_tag "bootstrap", "application" %>
13
+ </head>
14
+ <body>
15
+ <%% form_tag url(:sessions, :create), :class=>"login form-horizontal" do %>
16
+ <div class="login-header modal-header">
17
+ <div class="login-logo"> <%%= image_tag("logo.png", :alt => "Tennpipes's logo", :height => 250, :width => 193) %> </div>
18
+ </div>
19
+ <div class="login-body modal-body">
20
+
21
+ <%%= {:error => 'danger', :warning => 'warning', :success => 'success', :notice => 'info'}.map { |type, class_name| flash_tag(type, :class => "alert alert-#{class_name} fade in", :bootstrap => true) }.join.html_safe %>
22
+
23
+ <div class="form-group">
24
+ <label for="email" class="col-lg-2 control-label"><%%= pat('login.email') %></label>
25
+ <div class="col-lg-10"><%%= email_field_tag :email, :id => :email, :value => params[:email], :autofocus => true, :class => 'form-control' %></div>
26
+ </div>
27
+
28
+ <div class="form-group">
29
+ <label for="password" class="col-lg-2 control-label"><%%= pat('login.password') %></label>
30
+ <div class="col-lg-10"><%%= password_field_tag :password, :id => :password, :class => 'form-control' %></div>
31
+ </div>
32
+
33
+ <fieldset class="login-control-group-last control-group">
34
+ <div class="login-controls controls">
35
+ <label class="login-bypass-label checkbox"><%%= check_box_tag :bypass %> <%%= pat('login.bypass') %></label>
36
+ </div>
37
+ </fieldset>
38
+
39
+ </div>
40
+ <div class="login-footer modal-footer"><%%= submit_tag(pat('login.sign_in'), :class => "btn btn-primary pull-right") %></div>
41
+ <%% end %>
42
+ <%%= javascript_include_tag 'jquery-1.11.0.min', (Tennpipes.env == :production ? 'bootstrap/bootstrap.min' : %w[bootstrap/affix bootstrap/alert bootstrap/button bootstrap/carousel bootstrap/collapse bootstrap/dropdown bootstrap/tooltip bootstrap/transition bootstrap/modal bootstrap/popover bootstrap/scrollspy bootstrap/tab]), :application %>
43
+ </body>
44
+ </html>
@@ -0,0 +1,18 @@
1
+ <% @orm.column_fields.each_with_index do |column, index| -%>
2
+ <%% error = <%= @orm.has_error(column[:name]) %> %>
3
+ <fieldset class='control-group <%%= error ? 'has-error' : ''%>'>
4
+ <%%= f.label :<%= column[:name] %>, :class => 'control-label' %>
5
+ <div class='controls'>
6
+ <%%= f.<%= column[:field_type] %> :<%= column[:name] %>, :class => 'form-control input-xlarge input-with-feedback'<%- if (index == 0) -%>, :autofocus => true<%- end -%> %>
7
+ <span class='help-inline'><%%= error ? f.error_message_on(:<%= column[:name] %>) : "Ex: a simple text" %></span>
8
+ </div>
9
+ </fieldset>
10
+ <% end %>
11
+
12
+ <div class="form-actions">
13
+ <%%= f.submit pat(:save), :class => 'btn btn-primary' %>
14
+ &nbsp;
15
+ <%%= f.submit pat(:save_and_continue), :class => 'btn btn-info', :name => 'save_and_continue' %>
16
+ &nbsp;
17
+ <%%= link_to pat(:cancel), url(:<%= @orm.name_plural %>, :index), :class => 'btn btn-default' %>
18
+ </div>
@@ -0,0 +1,10 @@
1
+ <ul class="nav nav-tabs">
2
+ <li> <%%= link_to tag_icon(:list, pat(:list)), url(:<%= @orm.name_plural %>, :index) %></li>
3
+ <li> <%%= link_to tag_icon(:plus, pat(:new)), url(:<%= @orm.name_plural %>, :new) %></li>
4
+ <li class="active"> <%%= link_to tag_icon(:edit, pat(:edit)), url(:<%= @orm.name_plural %>, :edit, :id => @<%= @orm.name_singular %>.id) %></li>
5
+ </ul>
6
+ <div class="tabs-content">
7
+ <%% form_for :<%= @orm.name_singular %>, url(:<%= @orm.name_plural %>, :update, :id => @<%= @orm.name_singular %>.id), :method => :put, :class => 'form-horizontal' do |f| %>
8
+ <%%= partial '<%= @orm.name_plural %>/form', :locals => { :f => f } %>
9
+ <%% end %>
10
+ </div>
@@ -0,0 +1,81 @@
1
+ <ul class="nav nav-tabs">
2
+ <li class=active> <%%= link_to tag_icon(:list, pat(:list)), url(:<%= @orm.name_plural %>, :index) %></li>
3
+ <li> <%%= link_to tag_icon(:plus, pat(:new)), url(:<%= @orm.name_plural %>, :new) %></li>
4
+ </ul>
5
+ <div class=tabs-content>
6
+ <table id=list class="table table-striped table-hover table-condensed">
7
+ <thead>
8
+ <tr>
9
+ <th class="header list-menu">
10
+ <div class=dropdown>
11
+ <a href="#" class="list-menu-toggle dropdown-toggle" data-toggle='dropdown'>
12
+ <%%= tag_icon :magic %> <span class=caret></span>
13
+ </a>
14
+ <ul class="list-menu dropdown-menu" role=menu>
15
+ <li class=ist-menu-wrapper>
16
+ <%%= link_to tag_icon('check-square-o', pat(:select_all)), '#', :id => 'select-all', :class => 'list-menu-link' %>
17
+ </li>
18
+ <li class=list-menu-wrapper.list-menu-wrapper-disabled>
19
+ <%%= link_to tag_icon('square-o', pat(:deselect_all)), '#', :id => 'deselect-all', :class => 'list-menu-link list-menu-link-disabled' %>
20
+ </li>
21
+ <li class="list-menu-divider divider"></li>
22
+ <li class=list-menu-wrapper.list-menu-wrapper-disabled>
23
+ <%%=link_to tag_icon('trash-o', pat(:delete_selected)), '#', :id => 'delete-selected', :class => 'list-menu-link list-menu-link-disabled' %>
24
+ <div class='list-menu-popover-delete-selected popover right'>
25
+ <div class=arrow></div>
26
+ <h3 class=popover-title><%%= pat(:delete_selected_title) %></h3>
27
+ <div class=popover-content>
28
+ <%% form_tag url(:<%= @orm.name_plural %>, :destroy_many), :method => :delete do %>
29
+ <%%=hidden_field_tag :<%= @orm.name_singular %>_ids, :'data-delete-many-ids' => true %>
30
+ <%%=submit_tag pat(:delete), :class =>'list-menu-popover-delete-selected-btn btn btn-danger btn-small' %>
31
+ <div class='btn btn-default btn-small cancel'><%%= pat(:cancel) %></div>
32
+ <%% end %>
33
+ </div>
34
+ </div>
35
+ </li>
36
+ </ul>
37
+ </div>
38
+ </th>
39
+ <% @orm.columns.each_with_index do |column, i| -%>
40
+ <th class=header> <%%= mat(:<%= @orm.name_singular %>, :<%= column.name %>) %></th>
41
+ <% end -%>
42
+ <th class="header list-row-action-header"></th>
43
+ </tr>
44
+ </thead>
45
+
46
+ <tbody>
47
+ <%% @<%= @orm.name_plural %>.each do |<%= @orm.name_singular %>| %>
48
+ <tr class=list-row>
49
+ <td class="list-column list-selectable">
50
+ <%%= check_box_tag '<%= @orm.name_singular %>_ids[]', :value => <%= @orm.name_singular %>.id, :class => 'list-selectable-checkbox' %>
51
+ </td>
52
+ <%- @orm.columns.each_with_index do |column, i| -%>
53
+ <%- if column.name == "created_at" || column.name == "updated_at" -%>
54
+ <td class=list-column> <%%= time_ago_in_words <%= @orm.name_singular %>.<%= column.name %> %></td>
55
+ <%- elsif column.type == :boolean -%>
56
+ <td class=list-column> <%%= <%= @orm.name_singular %>.<%= column.name %> ? tag_icon(:ok) : tag_icon(:remove) %> </td>
57
+ <%- else -%>
58
+ <td class=list-column> <%%= <%= @orm.name_singular %>.<%= column.name %> %> </td>
59
+ <%- end -%>
60
+ <%- end -%>
61
+ <td class="list-column list-row-action">
62
+ <div class='list-row-action-wrapper'>
63
+ <%%= link_to tag_icon(:edit), :href => url(:<%= @orm.name_plural %>, :edit, :id => <%= @orm.name_singular %>.id), :rel => :tooltip, :title => "#{pat(:edit)} <%= @orm.name_singular %>", :class => 'list-row-action-wrapper-link' %>
64
+ <%%= link_to tag_icon('trash-o'), :rel => :tooltip, :title => "#{pat(:delete)} <%= @orm.name_singular %>", :class => 'list-row-action-delete-one list-row-action-wrapper-link' %>
65
+ <div class="popover list-row-action-popover-delete-one left">
66
+ <div class=arrow> </div>
67
+ <h3 class=popover-title><%%= pat(:delete, :model => "<%= @orm.name_singular %>") %></h3>
68
+ <div class=popover-content>
69
+ <%% form_tag url(:<%= @orm.name_plural %>, :destroy, :id => <%= @orm.name_singular %>.id), :method => :delete do %>
70
+ <%%= submit_tag pat(:delete), :class =>'list-row-action-popover-delete-one-btn btn btn-danger btn-small' %>
71
+ <div class="btn btn-default btn-small cancel"><%%= pat(:cancel) %></div>
72
+ <%% end %>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ </td>
77
+ </tr>
78
+ <%% end %>
79
+ </tbody>
80
+ </table>
81
+ </div>
@@ -0,0 +1,9 @@
1
+ <ul class="nav nav-tabs">
2
+ <li> <%%= link_to tag_icon(:list, pat(:list)), url(:<%= @orm.name_plural %>, :index) %></li>
3
+ <li class="active"> <%%= link_to tag_icon(:plus, pat(:new)), url(:<%= @orm.name_plural %>, :new) %></li>
4
+ </ul>
5
+ <div class="tabs-content">
6
+ <%% form_for :<%= @orm.name_singular %>, url(:<%= @orm.name_plural %>, :create), :class => 'form-horizontal' do |f| %>
7
+ <%%= partial '<%= @orm.name_plural %>/form', :locals => { :f => f } %>
8
+ <%% end %>
9
+ </div>
@@ -0,0 +1,12 @@
1
+ .base-text
2
+ %p Tennpipes is a ruby framework built upon the Sinatra web library.
3
+ %p It was created to make it fun and easy to code more advanced web applications while still adhering to the spirit that makes Sinatra great!
4
+ %p Tennpipes comes shipped with a slick and beautiful Admin Interface, with the following features:
5
+
6
+ .base-icons
7
+ .btn-group
8
+ .btn.btn-primary{:title => "Adapters for datamapper, sequel, activerecord, minirecord, mongomapper, mongoid, couchrest"}=tag_icon("cogs fa-2x", "Orm Agnostic")
9
+ .btn.btn-success{:title => "User Authentication Support, User Authorization Management"}=tag_icon("group fa-2x", "Authentication")
10
+ .btn.btn-info{:title => "Erb, Haml, Slim Rendering Support"}=tag_icon("tasks fa-2x", "Template Agnostic")
11
+ .btn.btn-warning{:title => "English, German, Russian, Danish, French, Brazilian and Italian localizations and many more!.."}=tag_icon("flag fa-2x", "Multi Language")
12
+ .btn.btn-danger{:title => "You can create a new 'admin interface' by providing a single Model"}=tag_icon("magic fa-2x", "Scaffold")
@@ -0,0 +1,3 @@
1
+ %p=tag_icon 'minus-circle fa-3x'
2
+ %h1=pat('custom_errors.403.title')
3
+ %p=pat('custom_errors.403.description')
@@ -0,0 +1,3 @@
1
+ %p=tag_icon 'exclamation-triangle fa-3x'
2
+ %h1=pat('custom_errors.404.title')
3
+ %p=pat('custom_errors.404.description')
@@ -0,0 +1,3 @@
1
+ %p=tag_icon 'flask fa-3x'
2
+ %h1=pat('custom_errors.500.title')
3
+ %p=pat('custom_errors.500.description')
@@ -0,0 +1,49 @@
1
+ !!! 5
2
+ %html{:lang => 'en'}
3
+ %head
4
+ <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
5
+ <!--[if lt IE 9]>
6
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
7
+ <![endif]-->
8
+ %meta{:content => 'text/html; charset=utf-8', 'http-equiv' => 'Content-Type'}
9
+ %meta{:name => :viewport, :content => 'width=device-width,initial-scale=1'}
10
+ %title= @title.present? ? "#{@title} | Tennpipes Admin" : "Tennpipes Admin"
11
+ =favicon_tag 'favicon.ico'
12
+ %link{:href => 'http://fonts.googleapis.com/css?family=Varela', :rel => :stylesheet}
13
+ =stylesheet_link_tag 'bootstrap', 'application'
14
+
15
+ %body
16
+ .navbar.navbar-fixed-top
17
+ .navbar-inner
18
+ .container
19
+ =link_to 'Tennpipes', url(:base, :index), :class => 'navbar-brand', :title => 'Tennpipes Admin'
20
+ %ul.nav.navbar-nav.pull-right
21
+ %li.navbar-edit-account=link_to tag_icon(:user), url(:accounts, :edit, :id => current_account.id), :title => pat(:profile), :class => 'navbar-nav-link'
22
+ %li.navbar-logout
23
+ =button_to :logout, url(:sessions, :destroy), :method => :delete, :class => 'navbar-nav-form' do
24
+ =content_tag :button, tag_icon('power-off'), :type => :submit, :title => pat(:logout), :class => 'navbar-nav-form-link'
25
+
26
+ %ul.nav.navbar-nav.pull-left
27
+ - project_modules.each do |project_module|
28
+ %li{:class => "navbar-module #{('active' if request.path_info =~ /^#{project_module.path}/)}"}
29
+ =link_to project_module.human_name, url(project_module.path)
30
+
31
+ .container.main
32
+ .main-wrapper
33
+ ={:error => 'danger', :warning => 'warning', :success => 'success', :notice => 'info'}.map { |type, class_name| flash_tag(type, :class => "alert alert-#{class_name} fade in", :bootstrap => true) }.join.html_safe
34
+ .row=yield
35
+ .main-wrapper-push
36
+
37
+ %footer
38
+ .footer-wrapper.container
39
+ %p.pull-left
40
+ Copyright &copy;
41
+ =Time.now.year
42
+ Your Site - Powered by Tennpipes v.#{Tennpipes.version}
43
+ %ul.pull-right.footer-links
44
+ %li= link_to tag_icon(:home, 'web'), 'http://www.tennpipesrb.com', :target => :_blank, :class => 'footer-links-link'
45
+ %li= link_to tag_icon(:heart, 'blog'), 'http://www.tennpipesrb.com/blog', :target => :_blank, :class => 'footer-links-link'
46
+ %li= link_to tag_icon(:github, 'code'), 'https://github.com/tennpipes/tennpipes-framework', :target => :_blank, :class => 'footer-links-link'
47
+ %li= link_to tag_icon(:twitter, 'twitter'), 'http://twitter.com/tennpipesrb', :target => :_blank, :class => 'footer-links-link'
48
+
49
+ =javascript_include_tag 'jquery-1.11.0.min', (Tennpipes.env == :production ? 'bootstrap/bootstrap.min' : %w[bootstrap/affix bootstrap/alert bootstrap/button bootstrap/carousel bootstrap/collapse bootstrap/dropdown bootstrap/tooltip bootstrap/transition bootstrap/modal bootstrap/popover bootstrap/scrollspy bootstrap/tab]), :application
@@ -0,0 +1,18 @@
1
+ !!! 5
2
+ %html{:lang => 'en'}
3
+ %head
4
+ <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
5
+ <!--[if lt IE 9]>
6
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
7
+ <![endif]-->
8
+ %meta{:content => 'text/html; charset=utf-8', 'http-equiv' => 'Content-Type'}
9
+ %meta{:name => :viewport, :content => 'width=device-width,initial-scale=1'}
10
+ %title= @title.present? ? "#{@title} | Tennpipes Admin" : "#{pat(:custom_errors.title)} | Tennpipes Admin"
11
+ =favicon_tag 'favicon.ico'
12
+ %link{:href => 'http://fonts.googleapis.com/css?family=Varela', :rel => :stylesheet}
13
+ =stylesheet_link_tag 'bootstrap', 'application'
14
+ %body
15
+ .custom-error.text-center
16
+ .custom-error-body.muted= yield
17
+ .custom-error-footer
18
+ =link_to tag_icon('arrow-left'), "#", :onclick => "history.go(-1);return false;", :class =>"custom-error-go-back btn btn-default pull-left", :title => "Go back"
@@ -0,0 +1,38 @@
1
+ !!! 5
2
+ %html{:lang => 'en'}
3
+ %head
4
+ <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
5
+ <!--[if lt IE 9]>
6
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
7
+ <![endif]-->
8
+ %meta{:content => 'text/html; charset=utf-8', 'http-equiv' => 'Content-Type'}
9
+ %meta{:name => :viewport, :content => 'width=device-width,initial-scale=1'}
10
+ %title= @title.present? ? "#{@title} | Tennpipes Admin" : "#{pat('login.title')} | Tennpipes Admin"
11
+ = favicon_tag 'favicon.ico'
12
+ = stylesheet_link_tag 'bootstrap', 'application'
13
+ %body
14
+ = form_tag url(:sessions, :create), :class=>'login form-horizontal' do
15
+ .login-header.modal-header
16
+ .login-logo=image_tag('logo.png', :alt => "Tennpipes's logo", :height => 250, :width => 193)
17
+ .login-body.modal-body
18
+ = {:error => 'danger', :warning => 'warning', :success => 'success', :notice => 'info'}.map { |type, class_name| flash_tag(type, :class => "alert alert-#{class_name} fade in", :bootstrap => true) }.join.html_safe
19
+
20
+ .form-group
21
+ %label.col-lg-2.control-label{:for => :email}= pat('login.email')
22
+ .col-lg-10= email_field_tag :email, :id => :email, :value => params[:email], :autofocus => true, :class =>'form-control'
23
+
24
+ .form-group
25
+ %label.col-lg-2.control-label{:for => :password}= pat('login.password')
26
+ .col-lg-10= password_field_tag :password, :id => :password, :class =>'form-control'
27
+
28
+ %fieldset.login-control-group-last.control-group
29
+ .login-controls.controls
30
+ %label.login-bypass-label.checkbox
31
+ = check_box_tag :bypass
32
+ = pat('login.bypass')
33
+
34
+ .login-footer.modal-footer
35
+ = submit_tag(pat('login.sign_in'), :class => 'btn btn-primary pull-right')
36
+
37
+ =javascript_include_tag 'jquery-1.11.0.min', (Tennpipes.env == :production ? 'bootstrap/bootstrap.min' : %w[bootstrap/affix bootstrap/alert bootstrap/button bootstrap/carousel bootstrap/collapse bootstrap/dropdown bootstrap/tooltip bootstrap/transition bootstrap/modal bootstrap/popover bootstrap/scrollspy bootstrap/tab]), :application
38
+
@@ -0,0 +1,16 @@
1
+ <%- @orm.column_fields.each_with_index do |column, index| -%>
2
+ - error = <%= @orm.has_error(column[:name]) %>
3
+ %fieldset.control-group{:class => error ? 'has-error' : ''}
4
+ =f.label :<%= column[:name] %>, :class => 'control-label'
5
+ .controls
6
+ <% if column[:field_type] == :text_area %>~<% else %>=<% end %>f.<%= column[:field_type] %> :<%= column[:name] %>, :class => 'form-control input-large input-with-feedback'<%- if (index == 0) -%>, :autofocus => true<%- end -%>
7
+
8
+ %span.help-inline=error ? f.error_message_on(:<%= column[:name] %>, :class => 'text-error') : pat(:example)
9
+ <%- end -%>
10
+
11
+ .form-actions
12
+ =f.submit pat(:save), :class => 'btn btn-primary'
13
+ &nbsp;
14
+ =f.submit pat(:save_and_continue), :class => 'btn btn-info', :name => 'save_and_continue'
15
+ &nbsp;
16
+ =link_to pat(:cancel), url(:<%= @orm.name_plural %>, :index), :class => 'btn btn-default'