red_base 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (278) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +339 -0
  3. data/README.rdoc +40 -0
  4. data/Rakefile +42 -0
  5. data/app/assets/fonts/DroidNaskh-Bold.ttf +0 -0
  6. data/app/assets/fonts/DroidNaskh-Regular.ttf +0 -0
  7. data/app/assets/fonts/OpenSans-Bold.ttf +0 -0
  8. data/app/assets/fonts/OpenSans-BoldItalic.ttf +0 -0
  9. data/app/assets/fonts/OpenSans-ExtraBold.ttf +0 -0
  10. data/app/assets/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
  11. data/app/assets/fonts/OpenSans-Italic.ttf +0 -0
  12. data/app/assets/fonts/OpenSans-Light.ttf +0 -0
  13. data/app/assets/fonts/OpenSans-LightItalic.ttf +0 -0
  14. data/app/assets/fonts/OpenSans-Regular.ttf +0 -0
  15. data/app/assets/fonts/OpenSans-Semibold.ttf +0 -0
  16. data/app/assets/fonts/OpenSans-SemiboldItalic.ttf +0 -0
  17. data/app/assets/javascripts/red_base/application.js +20 -0
  18. data/app/assets/javascripts/red_base/dashboard/angular.js +9 -0
  19. data/app/assets/javascripts/red_base/dashboard/app.js +65 -0
  20. data/app/assets/javascripts/red_base/dashboard/application.js.erb +24 -0
  21. data/app/assets/javascripts/red_base/dashboard/functions.js.erb +91 -0
  22. data/app/assets/javascripts/red_base/dashboard/init.js +38 -0
  23. data/app/assets/javascripts/red_base/dashboard/init.js~ +0 -0
  24. data/app/assets/javascripts/red_base/dashboard/lib/angular-animate.js +1226 -0
  25. data/app/assets/javascripts/red_base/dashboard/lib/angular-gettext.js +202 -0
  26. data/app/assets/javascripts/red_base/dashboard/lib/angular-resource.js +578 -0
  27. data/app/assets/javascripts/red_base/dashboard/lib/angular-route.js +880 -0
  28. data/app/assets/javascripts/red_base/dashboard/lib/angular.js +20031 -0
  29. data/app/assets/javascripts/red_base/dashboard/lib/lodash.underscore.js +4893 -0
  30. data/app/assets/javascripts/red_base/dashboard/lib/restangular.js +1066 -0
  31. data/app/assets/javascripts/red_base/dashboard/locale/translations.js +5 -0
  32. data/app/assets/javascripts/red_base/dashboard/modules/anim.js +32 -0
  33. data/app/assets/javascripts/red_base/dashboard/modules/api.js +32 -0
  34. data/app/assets/javascripts/red_base/dashboard/modules/auth/auth.js +34 -0
  35. data/app/assets/javascripts/red_base/dashboard/modules/auth/group.js +174 -0
  36. data/app/assets/javascripts/red_base/dashboard/modules/auth/user.js +122 -0
  37. data/app/assets/javascripts/red_base/dashboard/modules/list-view.js +293 -0
  38. data/app/assets/javascripts/red_base/dashboard/modules/logs.js +41 -0
  39. data/app/assets/javascripts/red_base/dashboard/modules/modules.js +50 -0
  40. data/app/assets/javascripts/red_base/dashboard/modules/nav.js.erb +92 -0
  41. data/app/assets/javascripts/red_base/dashboard/templates/application.handlebars.erb +42 -0
  42. data/app/assets/javascripts/red_base/dashboard/templates/auth/groups/details.handlebars.erb +15 -0
  43. data/app/assets/javascripts/red_base/dashboard/templates/auth/groups/index.handlebars.erb +7 -0
  44. data/app/assets/javascripts/red_base/dashboard/templates/auth/groups/new.handlebars.erb +39 -0
  45. data/app/assets/javascripts/red_base/dashboard/templates/auth/index.handlebars.erb +31 -0
  46. data/app/assets/javascripts/red_base/dashboard/templates/auth/users/details.handlebars.erb +15 -0
  47. data/app/assets/javascripts/red_base/dashboard/templates/auth/users/index.handlebars.erb +11 -0
  48. data/app/assets/javascripts/red_base/dashboard/templates/auth/users/new.handlebars.erb +33 -0
  49. data/app/assets/javascripts/red_base/dashboard/templates/components/list-view.handlebars.erb +59 -0
  50. data/app/assets/javascripts/red_base/dashboard/templates/components/model-form.handlebars.erb +3 -0
  51. data/app/assets/javascripts/red_base/dashboard/templates/modules.handlebars.erb +15 -0
  52. data/app/assets/javascripts/red_base/dashboard/templates/navigation.handlebars.erb +43 -0
  53. data/app/assets/javascripts/red_base/dashboard/templates/widgets.handlebars +23 -0
  54. data/app/assets/javascripts/red_base/dashboard/variables.js.erb +17 -0
  55. data/app/assets/javascripts/red_base/groups.js +2 -0
  56. data/app/assets/javascripts/red_base/home.js +2 -0
  57. data/app/assets/javascripts/red_base/i18n.js +13 -0
  58. data/app/assets/javascripts/red_base/locale/en.json +27 -0
  59. data/app/assets/javascripts/red_base/locale/fa.json +27 -0
  60. data/app/assets/javascripts/red_base/users.js +2 -0
  61. data/app/assets/stylesheets/red_base/base.css.scss +402 -0
  62. data/app/assets/stylesheets/red_base/dashboard/dashboard.css.scss +169 -0
  63. data/app/assets/stylesheets/red_base/dashboard/ltr/application.css +21 -0
  64. data/app/assets/stylesheets/red_base/dashboard/ltr/base.css.scss.erb +28 -0
  65. data/app/assets/stylesheets/red_base/dashboard/ltr/base.css.scss~ +15 -0
  66. data/app/assets/stylesheets/red_base/dashboard/ltr/buttons.css.scss.erb +48 -0
  67. data/app/assets/stylesheets/red_base/dashboard/ltr/direction.css.scss +38 -0
  68. data/app/assets/stylesheets/red_base/dashboard/ltr/foundation_and_overrides.css.scss +1014 -0
  69. data/app/assets/stylesheets/red_base/dashboard/rtl/application.css +21 -0
  70. data/app/assets/stylesheets/red_base/dashboard/rtl/base.css.scss.erb +31 -0
  71. data/app/assets/stylesheets/red_base/dashboard/rtl/base.css.scss~ +1 -0
  72. data/app/assets/stylesheets/red_base/dashboard/rtl/base.css_flymake.scss +25 -0
  73. data/app/assets/stylesheets/red_base/dashboard/rtl/buttons.css.scss.erb +45 -0
  74. data/app/assets/stylesheets/red_base/dashboard/rtl/direction.css.scss +37 -0
  75. data/app/assets/stylesheets/red_base/dashboard/rtl/foundation_and_overrides.css.scss +1014 -0
  76. data/app/assets/stylesheets/red_base/dashboard/sidebar.css.scss +93 -0
  77. data/app/assets/stylesheets/red_base/devise.css.scss +34 -0
  78. data/app/assets/stylesheets/red_base/groups.css +4 -0
  79. data/app/assets/stylesheets/red_base/home.css.scss +14 -0
  80. data/app/assets/stylesheets/red_base/ltr/application.css +20 -0
  81. data/app/assets/stylesheets/red_base/ltr/buttons.css.scss.erb +48 -0
  82. data/app/assets/stylesheets/red_base/ltr/foundation_and_overrides.scss.erb +1012 -0
  83. data/app/assets/stylesheets/red_base/mixins.css.scss +15 -0
  84. data/app/assets/stylesheets/red_base/mixins.css.scss~ +7 -0
  85. data/app/assets/stylesheets/red_base/rtl/application.css +20 -0
  86. data/app/assets/stylesheets/red_base/rtl/buttons.css.scss.erb +48 -0
  87. data/app/assets/stylesheets/red_base/rtl/foundation_and_overrides.scss.erb +1012 -0
  88. data/app/assets/stylesheets/red_base/users.css +4 -0
  89. data/app/assets/stylesheets/red_base/variables.css.scss +100 -0
  90. data/app/controllers/red_base/api/v1/groups_controller.rb +65 -0
  91. data/app/controllers/red_base/api/v1/logs_controller.rb +12 -0
  92. data/app/controllers/red_base/api/v1/permissions_controller.rb +17 -0
  93. data/app/controllers/red_base/api/v1/users_controller.rb +54 -0
  94. data/app/controllers/red_base/api_controller.rb +51 -0
  95. data/app/controllers/red_base/application_controller.rb +34 -0
  96. data/app/controllers/red_base/dashboard_controller.rb +40 -0
  97. data/app/controllers/red_base/home_controller.rb +19 -0
  98. data/app/controllers/red_base/omniauth/callbacks_controller.rb +43 -0
  99. data/app/controllers/red_base/users/omniauth_callbacks_controller.rb~ +2 -0
  100. data/app/helpers/red_base/application_helper.rb +4 -0
  101. data/app/helpers/red_base/dashboard_helper.rb +5 -0
  102. data/app/helpers/red_base/groups_helper.rb +4 -0
  103. data/app/helpers/red_base/home_helper.rb +4 -0
  104. data/app/helpers/red_base/users_helper.rb +4 -0
  105. data/app/models/ability.rb +39 -0
  106. data/app/models/red_base/group.rb +27 -0
  107. data/app/models/red_base/permission.rb +15 -0
  108. data/app/models/red_base/user.rb +77 -0
  109. data/app/views/angularjs_templates/auth/groups/details.html +21 -0
  110. data/app/views/angularjs_templates/auth/groups/index.html +5 -0
  111. data/app/views/angularjs_templates/auth/groups/new.html +40 -0
  112. data/app/views/angularjs_templates/auth/index.html +30 -0
  113. data/app/views/angularjs_templates/auth/users/details.html +28 -0
  114. data/app/views/angularjs_templates/auth/users/index.html +6 -0
  115. data/app/views/angularjs_templates/auth/users/new.html +45 -0
  116. data/app/views/angularjs_templates/index.html +8 -0
  117. data/app/views/angularjs_templates/list-view/index.html +66 -0
  118. data/app/views/angularjs_templates/locale/fa.po +25 -0
  119. data/app/views/angularjs_templates/locale/templates.pot +24 -0
  120. data/app/views/angularjs_templates/logs/index.html +6 -0
  121. data/app/views/angularjs_templates/modules.html +17 -0
  122. data/app/views/angularjs_templates/nav.html.erb +38 -0
  123. data/app/views/angularjs_templates/nav.html.erb~ +43 -0
  124. data/app/views/devise/confirmations/new.html.erb +34 -0
  125. data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
  126. data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
  127. data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
  128. data/app/views/devise/passwords/edit.html.erb +44 -0
  129. data/app/views/devise/passwords/new.html.erb +32 -0
  130. data/app/views/devise/registrations/edit.html.erb +29 -0
  131. data/app/views/devise/registrations/new.html.erb +91 -0
  132. data/app/views/devise/sessions/new.html.erb +98 -0
  133. data/app/views/devise/shared/_links.erb +25 -0
  134. data/app/views/devise/unlocks/new.html.erb +30 -0
  135. data/app/views/layouts/red_base/application.html.erb +90 -0
  136. data/app/views/layouts/red_base/dashboard.html.erb +21 -0
  137. data/app/views/red_base/api/v1/groups/create.json.jbuilder +4 -0
  138. data/app/views/red_base/api/v1/groups/destroy.html.erb +2 -0
  139. data/app/views/red_base/api/v1/groups/destroy.json.jbuilder +1 -0
  140. data/app/views/red_base/api/v1/groups/edit.html.erb +2 -0
  141. data/app/views/red_base/api/v1/groups/index.html.erb +2 -0
  142. data/app/views/red_base/api/v1/groups/index.json.jbuilder +6 -0
  143. data/app/views/red_base/api/v1/groups/new.html.erb +2 -0
  144. data/app/views/red_base/api/v1/groups/show.html.erb +2 -0
  145. data/app/views/red_base/api/v1/groups/show.json.jbuilder +5 -0
  146. data/app/views/red_base/api/v1/groups/update.json.jbuilder +4 -0
  147. data/app/views/red_base/api/v1/logs/index.json.jbuilder +1 -0
  148. data/app/views/red_base/api/v1/permissions/index.json.jbuilder +1 -0
  149. data/app/views/red_base/api/v1/users/create.html.erb +2 -0
  150. data/app/views/red_base/api/v1/users/create.json.jbuilder +1 -0
  151. data/app/views/red_base/api/v1/users/destroy.json.jbuilder +1 -0
  152. data/app/views/red_base/api/v1/users/distroy.html.erb +2 -0
  153. data/app/views/red_base/api/v1/users/edit.html.erb +2 -0
  154. data/app/views/red_base/api/v1/users/index.html.erb +2 -0
  155. data/app/views/red_base/api/v1/users/index.json.jbuilder +4 -0
  156. data/app/views/red_base/api/v1/users/show.html.erb +2 -0
  157. data/app/views/red_base/api/v1/users/show.json.jbuilder +2 -0
  158. data/app/views/red_base/api/v1/users/update.json.jbuilder +1 -0
  159. data/app/views/red_base/dashboard/index.html.erb +37 -0
  160. data/app/views/red_base/home/index.html.erb +119 -0
  161. data/config/initializers/devise.rb +28 -0
  162. data/config/locales/devise.en.yml +59 -0
  163. data/config/locales/devise.fa.yml +56 -0
  164. data/config/locales/fa/LC_MESSAGES/red_base.mo +0 -0
  165. data/config/locales/fa/messages.mo +0 -0
  166. data/config/locales/fa/red_base.po +181 -0
  167. data/config/locales/red_base.pot +181 -0
  168. data/config/routes.rb +33 -0
  169. data/db/migrate/20131013091000_devise_create_red_base_users.rb +64 -0
  170. data/db/migrate/20131020124701_create_red_base_groups.rb +9 -0
  171. data/db/migrate/20131021170923_create_red_base_permissions.rb +10 -0
  172. data/db/migrate/20131123120422_add_permissions_groups_table.rb +8 -0
  173. data/db/seeds.rb +15 -0
  174. data/lib/devise_patch.rb~ +5 -0
  175. data/lib/generators/red_base/USAGE +8 -0
  176. data/lib/generators/red_base/angularjs_resource_generator.rb +74 -0
  177. data/lib/generators/red_base/install_all_generator.rb +38 -0
  178. data/lib/generators/red_base/install_generator.rb +42 -0
  179. data/lib/generators/red_base/install_specs_generator.rb +48 -0
  180. data/lib/generators/red_base/js_scaffold_generator.rb +232 -0
  181. data/lib/generators/red_base/templates/README +41 -0
  182. data/lib/generators/red_base/templates/README~ +4 -0
  183. data/lib/generators/red_base/templates/SPECS +13 -0
  184. data/lib/generators/red_base/templates/angularjs/details.html.erb +20 -0
  185. data/lib/generators/red_base/templates/angularjs/details.html.erb~ +0 -0
  186. data/lib/generators/red_base/templates/angularjs/index.html.erb +59 -0
  187. data/lib/generators/red_base/templates/angularjs/module.js.erb +259 -0
  188. data/lib/generators/red_base/templates/angularjs/new.html.erb +43 -0
  189. data/lib/generators/red_base/templates/api/controller.rb.erb +54 -0
  190. data/lib/generators/red_base/templates/api/controller.rb.erb~ +37 -0
  191. data/lib/generators/red_base/templates/devise.rb +251 -0
  192. data/lib/generators/red_base/templates/devise.rb~ +238 -0
  193. data/lib/generators/red_base/templates/fast_gettext.rb +4 -0
  194. data/lib/generators/red_base/templates/features/api.feature +92 -0
  195. data/lib/generators/red_base/templates/features/api.step.rb +7 -0
  196. data/lib/generators/red_base/templates/features/step_definitions/email_steps.rb +206 -0
  197. data/lib/generators/red_base/templates/features/support/email_spec.rb +1 -0
  198. data/lib/generators/red_base/templates/features/support/env.rb +79 -0
  199. data/lib/generators/red_base/templates/formtastic.rb +76 -0
  200. data/lib/generators/red_base/templates/js_scaffold.README +25 -0
  201. data/lib/generators/red_base/templates/red_base.rb +14 -0
  202. data/lib/generators/red_base/templates/red_base.rb~ +251 -0
  203. data/lib/generators/red_base/templates/seeds.rb +1 -0
  204. data/lib/generators/red_base/templates/spec/factories/groups.rb +5 -0
  205. data/lib/generators/red_base/templates/spec/factories/users.rb +10 -0
  206. data/lib/generators/red_base/templates/spec/spec_helper.rb +69 -0
  207. data/lib/generators/red_base/templates/spec/support/devise.rb +3 -0
  208. data/lib/generators/red_base/templates/views/create.json.jbuilder.erb +2 -0
  209. data/lib/generators/red_base/templates/views/destroy.json.jbuilder.erb +1 -0
  210. data/lib/generators/red_base/templates/views/index.json.jbuilder.erb +10 -0
  211. data/lib/generators/red_base/templates/views/index.json.jbuilder.erb~ +0 -0
  212. data/lib/generators/red_base/templates/views/show.json.jbuilder.erb +6 -0
  213. data/lib/generators/red_base/templates/views/update.json.jbuilder.erb +6 -0
  214. data/lib/generators/red_base/views_generator.rb +41 -0
  215. data/lib/red_base/active_record.rb +78 -0
  216. data/lib/red_base/active_record.rb~ +0 -0
  217. data/lib/red_base/api/groups_api.rb +41 -0
  218. data/lib/red_base/api/permissions_api.rb +24 -0
  219. data/lib/red_base/api/root.rb +15 -0
  220. data/lib/red_base/api/users_api.rb +20 -0
  221. data/lib/red_base/api.rb +61 -0
  222. data/lib/red_base/cucumber/auth.rb +45 -0
  223. data/lib/red_base/cucumber/exceptions.rb +40 -0
  224. data/lib/red_base/cucumber/interaction.rb +43 -0
  225. data/lib/red_base/cucumber/query.rb +28 -0
  226. data/lib/red_base/cucumber/urls.rb +76 -0
  227. data/lib/red_base/cucumber.rb +25 -0
  228. data/lib/red_base/dashboard/controller.rb +42 -0
  229. data/lib/red_base/dashboard/module.rb +45 -0
  230. data/lib/red_base/dashboard/module.rb~ +25 -0
  231. data/lib/red_base/dashboard.rb +60 -0
  232. data/lib/red_base/dashboard.rb~ +18 -0
  233. data/lib/red_base/engine.rb +132 -0
  234. data/lib/red_base/exceptions.rb +26 -0
  235. data/lib/red_base/i18n.rb +35 -0
  236. data/lib/red_base/initialize.rb +7 -0
  237. data/lib/red_base/omniauth/callbacks.rb +58 -0
  238. data/lib/red_base/omniauth/callbakcs.rb~ +7 -0
  239. data/lib/red_base/omniauth.rb +24 -0
  240. data/lib/red_base/omniauth.rb~ +1 -0
  241. data/lib/red_base/plugins.rb +44 -0
  242. data/lib/red_base/version.rb +22 -0
  243. data/lib/red_base.rb +30 -0
  244. data/lib/tasks/grunt/Gruntfile.js +25 -0
  245. data/lib/tasks/red_base_tasks.rake +23 -0
  246. data/spec/dummy/README.rdoc +28 -0
  247. data/spec/dummy/Rakefile +6 -0
  248. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  249. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  250. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  251. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  252. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  253. data/spec/dummy/bin/bundle +3 -0
  254. data/spec/dummy/bin/rails +4 -0
  255. data/spec/dummy/bin/rake +4 -0
  256. data/spec/dummy/config/application.rb +23 -0
  257. data/spec/dummy/config/boot.rb +5 -0
  258. data/spec/dummy/config/database.yml +25 -0
  259. data/spec/dummy/config/environment.rb +5 -0
  260. data/spec/dummy/config/environments/development.rb +29 -0
  261. data/spec/dummy/config/environments/production.rb +80 -0
  262. data/spec/dummy/config/environments/test.rb +36 -0
  263. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  264. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  265. data/spec/dummy/config/initializers/inflections.rb +16 -0
  266. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  267. data/spec/dummy/config/initializers/secret_token.rb +12 -0
  268. data/spec/dummy/config/initializers/session_store.rb +3 -0
  269. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  270. data/spec/dummy/config/locales/en.yml +23 -0
  271. data/spec/dummy/config/routes.rb +4 -0
  272. data/spec/dummy/config.ru +4 -0
  273. data/spec/dummy/public/404.html +58 -0
  274. data/spec/dummy/public/422.html +58 -0
  275. data/spec/dummy/public/500.html +57 -0
  276. data/spec/dummy/public/favicon.ico +0 -0
  277. data/spec/spec_helper.rb +52 -0
  278. metadata +661 -0
@@ -0,0 +1,98 @@
1
+ <div class="wrapper_signin">
2
+ <div class="row">
3
+ <div class="layout_signin">
4
+ <div class="row">
5
+ <div class="large-7 columns">
6
+
7
+ <h1><%= _("Sign in") %></h1>
8
+
9
+
10
+ <div class="justify big_box ">
11
+
12
+ <i class="fa-desktop fa fa-5x"></i>
13
+ <p>
14
+ <%= _("For sign in enter your information !") %>
15
+ </p>
16
+ </div>
17
+ <div class="inline">
18
+ <div class="justify large-5 left ">
19
+ <i class="fa-eye fa fa-5x"></i>
20
+ <p>
21
+ <%= _("you can use members area with registratio") %>
22
+ </p>
23
+ </div>
24
+
25
+ <div class="justify large-5 right">
26
+ <i class="fa-bar-chart-o fa fa-5x"></i>
27
+ <p>
28
+ <%= _("Its simple to register this site") %>
29
+ </p>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ <div class="large-4 columns">
34
+ <div class="row">
35
+ <section id="form_signin">
36
+ <div id="formbox_login" class="panel radius form">
37
+ <%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>
38
+
39
+ <%= devise_error_messages! %>
40
+ <div class="field">
41
+ <label><%=_("E-mail") %></label>
42
+ <%= f.email_field :email, :autofocus => true, :type => "text", :class => " input email ", :placeholder=>_("E-mail") %>
43
+ <% if resource.errors[:email] -%>
44
+ <dd class="danger abel"><%= resource.errors[:first_name][0]%></dd>
45
+ <% end -%>
46
+
47
+ </div>
48
+
49
+ <div class="field">
50
+ <label><%=_("Password") %></label>
51
+ <%= f.password_field :password, :class => "input password" %>
52
+ <% if resource.errors[:first_name] -%>
53
+ <dd class="danger abel"><%= resource.errors[:first_name][0] %></dd> <% end -%>
54
+
55
+ </div>
56
+ <div class="field">
57
+ <% if devise_mapping.rememberable? -%>
58
+ <div><%= f.check_box :remember_me, :class=>"checkbox" %> <%= f.label _("remember me") %></div>
59
+ <% end %>
60
+ </div>
61
+ <div class="submit">
62
+ <%= f.submit _(" Sign in "), :class => "button"%><br><br>
63
+
64
+ <%= render "devise/shared/links" %>
65
+ </div>
66
+
67
+ <% end %>
68
+ </div>
69
+ </section>
70
+ </div>
71
+
72
+ <br />
73
+ <div class="form row panel radius">
74
+
75
+ <h3><%= _("Login using") %>:</h3>
76
+ <div class="text-left">
77
+ <a href="/auth/google_oauth2/" class="pull_right">
78
+ <i class="fa-google-plus-square fa fa-3x"></i>
79
+ </a>
80
+
81
+ <a href="/auth/facebook/" class="pull_right">
82
+ <i class="fa-facebook-square fa fa-3x"></i>
83
+ </a>
84
+
85
+ <a href="/auth/twitter/" class="pull_right">
86
+ <i class="fa-twitter-square fa fa-3x"></i>
87
+ </a>
88
+ </div>
89
+ </div>
90
+
91
+ </div>
92
+
93
+ </div>
94
+ </div>
95
+
96
+ <br><br>
97
+ </div>
98
+ </div>
@@ -0,0 +1,25 @@
1
+ <%- if controller_name != 'sessions' %>
2
+ <%= link_to "Sign in", new_session_path(resource_name) %><br />
3
+ <% end -%>
4
+
5
+ <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6
+ <%= link_to "Sign up", new_registration_path(resource_name) %><br />
7
+ <% end -%>
8
+
9
+ <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
10
+ <%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
11
+ <% end -%>
12
+
13
+ <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14
+ <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
15
+ <% end -%>
16
+
17
+ <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18
+ <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
19
+ <% end -%>
20
+
21
+ <%- if devise_mapping.omniauthable? %>
22
+ <%- resource_class.omniauth_providers.each do |provider| %>
23
+ <%= link_to "Sign in with #{provider.to_s.titleize}", red_base.user_omniauth_authorize_path(provider) %><br />
24
+ <% end -%>
25
+ <% end -%>
@@ -0,0 +1,30 @@
1
+ <div class="wrapper_signin">
2
+ <div class="row">
3
+ <div class="layout_signin">
4
+ <div class="row">
5
+
6
+ <div class="large-7 columns">
7
+
8
+ <h1>Resend unlock instructions</h1>
9
+ </div>
10
+ <div class="large-5 columns">
11
+ <div class="form radius panel">
12
+ <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
13
+ <%= devise_error_messages! %>
14
+
15
+ <div class="field"><%= f.label :email %><br />
16
+ <%= f.email_field :email, :autofocus => true %></div>
17
+
18
+ <div class="submit"><%= f.submit "Resend unlock instructions" , :class => "button"%>
19
+ <% end %>
20
+ <br /><br /><br />
21
+ <%= render "devise/shared/links" %>
22
+ </div>
23
+ <br />
24
+ </div>
25
+
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </div>
@@ -0,0 +1,90 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title><%= RedBase::Engine.site_title %></title>
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <%= stylesheet_link_tag "red_base/" + RedBase::I18n.direction(I18n.locale) + "/application", media: "all" %>
7
+ <%= javascript_include_tag :modernizr %>
8
+ <%= csrf_meta_tags %>
9
+ </head>
10
+ <body>
11
+ <div class="header">
12
+ <div class="large-12 columns">
13
+ <div class="">
14
+ <!-- Navigation -->
15
+ <nav class="top-bar">
16
+ <ul class="title-area">
17
+ <!-- Title Area -->
18
+ <li class="name">
19
+ <h1>
20
+ <a href="<%= red_base.root_path %>">
21
+ <%= RedBase::Engine.site_title %>
22
+ </a>
23
+ </h1>
24
+ </li>
25
+ <li class="toggle-topbar menu-icon"><a href="#"><span>menu</span></a></li>
26
+ </ul>
27
+
28
+ <section class="top-bar-section">
29
+ <ul class="float-right">
30
+ <li class="has-dropdown"><a href="#"> <%= _("Languages") %></a>
31
+ <ul class="dropdown">
32
+ <% ::I18n.available_locales.each do |locale| %>
33
+ <li><a href="<%= "/#{locale.to_s}/" %>"><%= locale %></a></li>
34
+ <% end %>
35
+ </ul>
36
+ </li>
37
+
38
+ <li class="has-dropdown">
39
+ <% if not user_signed_in? %>
40
+ <a href="#"><%= _("Membership")%></a>
41
+ <%else%>
42
+ <a href="#">User<%= current_user.first_name %> <%= current_user.first_name %></a>
43
+ <%end%>
44
+
45
+ <ul class="dropdown">
46
+ <% if user_signed_in? %>
47
+ <li><a href="<%= red_base.dashboard_path %>"><%= _("Dashboard") %></a></li>
48
+ <li><a href="">Change Password</a></li>
49
+ <li><a href="<%= red_base.destroy_user_session_path %>" data-method="delete">Sign Out</a></li>
50
+ <%else%>
51
+ <li><%= link_to _("Register"), red_base.new_user_registration_path %></li>
52
+ <li><%= link_to _("Sign in"), red_base.user_session_path %></li>
53
+ <%end%>
54
+ </ul>
55
+ </li>
56
+ </ul>
57
+ </section>
58
+ </nav>
59
+
60
+ <!-- End Navigation -->
61
+ </div>
62
+ </div>
63
+ </div>
64
+
65
+ <%= yield %>
66
+
67
+ <%= debug I18n.locale %>
68
+ <!-- Footer -->
69
+
70
+ <footer class="">
71
+ <div class="large-12 columns">
72
+ <hr>
73
+ <div class="row">
74
+ <div class="large-6 columns">
75
+ <p>&copy; Copyright no one at all. Go to town.</p>
76
+ </div>
77
+ <div class="large-6 columns">
78
+ <ul class="inline-list right">
79
+ <li><a href="#">Link 1</a></li>
80
+ <li><a href="#">Link 2</a></li>
81
+ <li><a href="#">Link 3</a></li>
82
+ <li><a href="#">Link 4</a></li>
83
+ </ul>
84
+ </div>
85
+ </div>
86
+ </div>
87
+ </footer>
88
+ <%= javascript_include_tag "red_base/application" %>
89
+ </body>
90
+ </html>
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html>
2
+ <html lang="<%= ::I18n.locale %>" dir="<%= RedBase::I18n.direction(I18n.locale) %>" ng-app="Dashboard">
3
+ <head>
4
+ <title><%= RedBase::Engine.site_title %></title>
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <%= stylesheet_link_tag "red_base/dashboard/" + RedBase::I18n.direction(I18n.locale) + "/application", media: "all" %>
7
+ <%= javascript_include_tag :modernizr %>
8
+ <%= csrf_meta_tags %>
9
+ </head>
10
+ <body data-current-user="<%= current_user.to_json %>">
11
+
12
+ <%= yield %>
13
+
14
+ <%= javascript_include_tag RedBase::Engine.dashboard_js_manifest %>
15
+ <div id="auth" style="display: none;">
16
+ <p class="notice"><%= notice %></p>
17
+ <p class="alert"><%= alert %></p>
18
+ </div>
19
+
20
+ </body>
21
+ </html>
@@ -0,0 +1,4 @@
1
+ json.extract! @group, :id, :name
2
+ json.permissions @group.permissions do |json, permission|
3
+ json.(permission, :string_repr)
4
+ end
@@ -0,0 +1,2 @@
1
+ <h1>Groups#destroy</h1>
2
+ <p>Find me in app/views/red_base/groups/destroy.html.erb</p>
@@ -0,0 +1 @@
1
+ json.msg _("Items removed successfully.")
@@ -0,0 +1,2 @@
1
+ <h1>Groups#edit</h1>
2
+ <p>Find me in app/views/red_base/groups/edit.html.erb</p>
@@ -0,0 +1,2 @@
1
+ <h1>Groups#index</h1>
2
+ <p>Find me in app/views/red_base/groups/index.html.erb</p>
@@ -0,0 +1,6 @@
1
+ json.array! @groups do |group|
2
+ json.extract! group, :id, :name
3
+ json.permissions group.permissions do |json, permission|
4
+ json.(permission, :string_repr)
5
+ end
6
+ end
@@ -0,0 +1,2 @@
1
+ <h1>Groups#new</h1>
2
+ <p>Find me in app/views/red_base/groups/new.html.erb</p>
@@ -0,0 +1,2 @@
1
+ <h1>Groups#show</h1>
2
+ <p>Find me in app/views/red_base/groups/show.html.erb</p>
@@ -0,0 +1,5 @@
1
+ json.extract! @group, :id, :name
2
+ json.permissions @group.permissions do |json, permission|
3
+ json.name permission.id_repr
4
+ json.string permission.string_repr
5
+ end
@@ -0,0 +1,4 @@
1
+ json.extract! @group, :id, :name
2
+ json.permissions @group.permissions do |json, permission|
3
+ json.(permission, :string_repr)
4
+ end
@@ -0,0 +1 @@
1
+ json.content @data
@@ -0,0 +1 @@
1
+ json.array! @permissions, :name, :string
@@ -0,0 +1,2 @@
1
+ <h1>Users#create</h1>
2
+ <p>Find me in app/views/red_base/users/create.html.erb</p>
@@ -0,0 +1 @@
1
+ json.extract! @user, :id, :email, :group_id
@@ -0,0 +1 @@
1
+ json.msg _("Items removed successfully.")
@@ -0,0 +1,2 @@
1
+ <h1>Users#distroy</h1>
2
+ <p>Find me in app/views/red_base/users/distroy.html.erb</p>
@@ -0,0 +1,2 @@
1
+ <h1>Users#edit</h1>
2
+ <p>Find me in app/views/red_base/users/edit.html.erb</p>
@@ -0,0 +1,2 @@
1
+ <h1>Users#index</h1>
2
+ <p>Find me in app/views/red_base/users/index.html.erb</p>
@@ -0,0 +1,4 @@
1
+ json.array! @users do |user|
2
+ json.extract! user, :id, :email, :first_name, :last_name
3
+ json.group user.group, :id, :name
4
+ end
@@ -0,0 +1,2 @@
1
+ <h1>Users#show</h1>
2
+ <p>Find me in app/views/red_base/users/show.html.erb</p>
@@ -0,0 +1,2 @@
1
+ json.extract! @user, :id, :email, :first_name, :last_name
2
+ json.group @user.group.id
@@ -0,0 +1 @@
1
+ json.extract! @user, :id, :email, :group
@@ -0,0 +1,37 @@
1
+ <div id="content" class="">
2
+ <header>
3
+ <div ng-include="'<%= @jstemplates_path %>/nav.html'">
4
+ </div>
5
+ </header>
6
+
7
+ <section class="dashboard-body">
8
+ <div class="row">
9
+
10
+ <aside class="modulebar small-2 columns">
11
+ <div ng-include="'<%= @jstemplates_path %>/modules.html'">
12
+ </div>
13
+ </aside>
14
+
15
+ <section class="small-10 columns dashboard-content">
16
+
17
+ <div class="row content">
18
+ <div id="flash" class="row success">
19
+ <div class="small-12 columns">
20
+ </div>
21
+ </div>
22
+ </div>
23
+
24
+ <div class="row search-bar">
25
+
26
+ </div>
27
+
28
+
29
+ <div class="row content">
30
+ <div ng-view></div>
31
+ </div>
32
+
33
+ </section>
34
+
35
+ </div>
36
+ </section>
37
+ </div>
@@ -0,0 +1,119 @@
1
+ <div class="row">
2
+ <div class="large-12 columns">
3
+
4
+ <!-- Desktop Slider -->
5
+
6
+ <div class="hide-for-small">
7
+ <div id="featured">
8
+ <img src="http://placehold.it/1000x400&text=Slide Image" alt="slide image">
9
+ <!-- <img src="http://placehold.it/1000x400&text=Slide Image" alt="slide image">
10
+ <img src="http://placehold.it/1000x400&text=Slide Image" alt="slide image"> -->
11
+ </div>
12
+ </div>
13
+
14
+ <!-- End Desktop Slider -->
15
+
16
+
17
+ <!-- Mobile Header -->
18
+
19
+
20
+ <div class="row">
21
+ <div class="small-12 show-for-small"><br>
22
+ <img src="http://placehold.it/1000x600&text=For Small Screens" />
23
+ </div>
24
+ </div>
25
+
26
+
27
+ <!-- End Mobile Header -->
28
+
29
+ </div>
30
+ </div><br>
31
+
32
+ <div class="row">
33
+ <div class="large-12 columns">
34
+ <div class="row">
35
+
36
+ <!-- Thumbnails -->
37
+
38
+ <div class="large-3 small-6 columns">
39
+ <img src="http://placehold.it/250x250&text=Thumbnail" />
40
+ <h6 class="panel">Description</h6>
41
+ </div>
42
+
43
+ <div class="large-3 small-6 columns">
44
+ <img src="http://placehold.it/250x250&text=Thumbnail" />
45
+ <h6 class="panel">Description</h6>
46
+ </div>
47
+
48
+ <div class="large-3 small-6 columns">
49
+ <img src="http://placehold.it/250x250&text=Thumbnail" />
50
+ <h6 class="panel">Description</h6>
51
+ </div>
52
+
53
+ <div class="large-3 small-6 columns">
54
+ <img src="http://placehold.it/250x250&text=Thumbnail" />
55
+ <h6 class="panel">Description</h6>
56
+ </div>
57
+
58
+ <!-- End Thumbnails -->
59
+
60
+ </div>
61
+ </div>
62
+ </div>
63
+
64
+ <div class="row">
65
+ <div class="large-12 columns">
66
+ <div class="row">
67
+
68
+ <!-- Content -->
69
+
70
+
71
+ <div class="large-8 columns">
72
+ <div class="panel radius">
73
+
74
+ <div class="row">
75
+ <div class="large-6 small-6 columns">
76
+
77
+ <h4>Header</h4><hr/>
78
+ <h5 class="subheader">Risus ligula, aliquam nec fermentum vitae, sollicitudin eget urna. Donec dignissim nibh fermentum odio ornare sagittis.
79
+ </h5>
80
+
81
+ <div class="show-for-small" align="center">
82
+ <a href="#" class="small radius button">Call To Action!</a><br>
83
+
84
+ <a href="#" class="small radius button">Call To Action!</a>
85
+ </div>
86
+
87
+ </div>
88
+ <div class="large-6 small-6 columns">
89
+
90
+ <p>Suspendisse ultrices ornare tempor. Aenean eget ultricies libero. Phasellus non ipsum eros. Vivamus at dignissim massa. Aenean dolor libero, blandit quis interdum et, malesuada nec ligula. Nullam erat erat, eleifend sed pulvinar ac. Suspendisse ultrices ornare tempor. Aenean eget ultricies libero.
91
+ </p>
92
+ </div>
93
+
94
+ </div>
95
+ </div>
96
+ </div>
97
+
98
+ <div class="large-4 columns hide-for-small">
99
+
100
+ <h4>Get In Touch!</h4><hr/>
101
+
102
+ <a href="<%= red_base.new_user_registration_path %>" class="btn-big">
103
+ <div class="panel radius callout" align="center">
104
+ <strong><%= _("Sign UP") %></strong>
105
+ </div>
106
+ </a>
107
+
108
+ <a href="red_base.user_session_path" class="btn-big">
109
+ <div class="panel radius callout" align="center">
110
+ <strong><%= _("Sign In") %></strong>
111
+ </div>
112
+ </a>
113
+
114
+ </div>
115
+
116
+ <!-- End Content -->
117
+ </div>
118
+ </div>
119
+ </div>
@@ -0,0 +1,28 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth.
2
+ # Many of these configuration options can be set straight in your model.
3
+ Devise.setup do |config|
4
+
5
+ # ==> ORM configuration
6
+ # Load and configure the ORM. Supports :active_record (default) and
7
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
8
+ # available as additional gems.
9
+ require 'devise/orm/active_record'
10
+
11
+
12
+ config.secret_key = '04671846f794e5df0e032abb7d3d3876016f1cf0a1ced726429b2807c798de67f08035cc45e953eca23e08661a7f8030f4bcaec91ef184d89f4c721b5925d36b'
13
+
14
+
15
+ # ==> Mountable engine configurations
16
+ # When using Devise inside an engine, let's call it `MyEngine`, and this engine
17
+ # is mountable, there are some extra configurations to be taken into account.
18
+ # The following options are available, assuming the engine is mounted as:
19
+ #
20
+ # mount MyEngine, at: '/my_engine'
21
+ #
22
+ # The router that invoked `devise_for`, in the example above, would be:
23
+ config.router_name = :red_base
24
+ #
25
+ # When using omniauth, Devise cannot automatically set Omniauth path,
26
+ # so you need to do it manually. For the users scope, it would be:
27
+ # config.omniauth_path_prefix = '/my_engine/users/auth'
28
+ end
@@ -0,0 +1,59 @@
1
+ # Additional translations at https://github.com/plataformatec/devise/wiki/I18n
2
+
3
+ en:
4
+ devise:
5
+ confirmations:
6
+ confirmed: "Your account was successfully confirmed. You are now signed in."
7
+ send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
8
+ send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
9
+ failure:
10
+ already_authenticated: "You are already signed in."
11
+ inactive: "Your account is not activated yet."
12
+ invalid: "Invalid email or password."
13
+ invalid_token: "Invalid authentication token."
14
+ locked: "Your account is locked."
15
+ not_found_in_database: "Invalid email or password."
16
+ timeout: "Your session expired. Please sign in again to continue."
17
+ unauthenticated: "You need to sign in or sign up before continuing."
18
+ unconfirmed: "You have to confirm your account before continuing."
19
+ mailer:
20
+ confirmation_instructions:
21
+ subject: "Confirmation instructions"
22
+ reset_password_instructions:
23
+ subject: "Reset password instructions"
24
+ unlock_instructions:
25
+ subject: "Unlock Instructions"
26
+ omniauth_callbacks:
27
+ failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
28
+ success: "Successfully authenticated from %{kind} account."
29
+ passwords:
30
+ no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
31
+ send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes."
32
+ send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
33
+ updated: "Your password was changed successfully. You are now signed in."
34
+ updated_not_active: "Your password was changed successfully."
35
+ registrations:
36
+ destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
37
+ signed_up: "Welcome! You have signed up successfully."
38
+ signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
39
+ signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
40
+ signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
41
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
42
+ updated: "You updated your account successfully."
43
+ sessions:
44
+ signed_in: "Signed in successfully."
45
+ signed_out: "Signed out successfully."
46
+ unlocks:
47
+ send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
48
+ send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
49
+ unlocked: "Your account has been unlocked successfully. Please sign in to continue."
50
+ errors:
51
+ messages:
52
+ already_confirmed: "was already confirmed, please try signing in"
53
+ confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
54
+ expired: "has expired, please request a new one"
55
+ not_found: "not found"
56
+ not_locked: "was not locked"
57
+ not_saved:
58
+ one: "1 error prohibited this %{resource} from being saved:"
59
+ other: "%{count} errors prohibited this %{resource} from being saved:"