jabysoft-bootstrap_generators 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +7 -0
  2. data/.DS_Store +0 -0
  3. data/.gitignore +9 -0
  4. data/.rspec +2 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +41 -0
  9. data/Rakefile +6 -0
  10. data/app/assets/javascripts/jabysoft.js +1 -0
  11. data/app/assets/stylesheets/jabysoft.sass +38 -0
  12. data/app/assets/stylesheets/mixins.scss +68 -0
  13. data/app/views/layouts/admin.html.haml +46 -0
  14. data/app/views/layouts/application.html.haml +31 -0
  15. data/app/views/shared/_datepicker_field.html.haml +9 -0
  16. data/app/views/shared/_layout.html.haml +7 -0
  17. data/app/views/shared/_messages.html.haml +7 -0
  18. data/app/views/shared/_panel.html.haml +5 -0
  19. data/app/views/shared/_search_form.html.haml +6 -0
  20. data/app/views/shared/form/_error_messages.html.haml +6 -0
  21. data/app/views/shared/modals/_delete_confirmation.html.haml +17 -0
  22. data/bin/console +14 -0
  23. data/bin/setup +8 -0
  24. data/config/locales/en.yml +35 -0
  25. data/config/locales/pt-BR.yml +35 -0
  26. data/jabysoft-bootstrap_generators.gemspec +40 -0
  27. data/lib/generators/haml/scaffold/scaffold_generator.rb +35 -0
  28. data/lib/generators/jabysoft/setup/USAGE +19 -0
  29. data/lib/generators/jabysoft/setup/setup_generator.rb +57 -0
  30. data/lib/generators/jabysoft/setup/templates/.rspec +3 -0
  31. data/lib/generators/jabysoft/setup/templates/Gemfile +52 -0
  32. data/lib/generators/jabysoft/setup/templates/assets/stylesheets/bootstrap-variables.scss +876 -0
  33. data/lib/generators/jabysoft/setup/templates/layouts/admin.html.haml +46 -0
  34. data/lib/generators/jabysoft/setup/templates/layouts/application.html.haml +32 -0
  35. data/lib/generators/jabysoft/setup/templates/spec/rails_helper.rb +95 -0
  36. data/lib/generators/jabysoft/setup/templates/spec/spec_helper.rb +97 -0
  37. data/lib/generators/rspec/scaffold/scaffold_generator.rb +157 -0
  38. data/lib/jabysoft/bootstrap_generators.rb +15 -0
  39. data/lib/jabysoft/bootstrap_generators/version.rb +5 -0
  40. data/lib/templates/haml/scaffold/_form.html.haml +14 -0
  41. data/lib/templates/haml/scaffold/_index.html.haml +25 -0
  42. data/lib/templates/haml/scaffold/edit.html.haml +1 -0
  43. data/lib/templates/haml/scaffold/index.html.haml +1 -0
  44. data/lib/templates/haml/scaffold/new.html.haml +1 -0
  45. data/lib/templates/haml/scaffold/show.html.haml +1 -0
  46. data/lib/templates/rails/scaffold_controller/controller.rb +28 -0
  47. data/lib/templates/rspec/scaffold/controller_spec.rb +148 -0
  48. data/lib/templates/rspec/scaffold/model_spec.rb +14 -0
  49. data/lib/templates/rspec/scaffold/request_spec.rb +10 -0
  50. data/lib/templates/rspec/scaffold/routing_spec.rb +44 -0
  51. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
  52. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
  53. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
  54. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
  55. data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
  56. data/vendor/assets/images/.keep +0 -0
  57. data/vendor/assets/javascripts/bootstrap-sprockets.js +12 -0
  58. data/vendor/assets/javascripts/bootstrap.js +2377 -0
  59. data/vendor/assets/javascripts/bootstrap.min.js +7 -0
  60. data/vendor/assets/javascripts/bootstrap/affix.js +162 -0
  61. data/vendor/assets/javascripts/bootstrap/alert.js +94 -0
  62. data/vendor/assets/javascripts/bootstrap/button.js +125 -0
  63. data/vendor/assets/javascripts/bootstrap/carousel.js +237 -0
  64. data/vendor/assets/javascripts/bootstrap/collapse.js +212 -0
  65. data/vendor/assets/javascripts/bootstrap/dropdown.js +165 -0
  66. data/vendor/assets/javascripts/bootstrap/modal.js +339 -0
  67. data/vendor/assets/javascripts/bootstrap/popover.js +108 -0
  68. data/vendor/assets/javascripts/bootstrap/scrollspy.js +172 -0
  69. data/vendor/assets/javascripts/bootstrap/tab.js +155 -0
  70. data/vendor/assets/javascripts/bootstrap/tooltip.js +520 -0
  71. data/vendor/assets/javascripts/bootstrap/transition.js +59 -0
  72. data/vendor/assets/stylesheets/_bootstrap-compass.scss +9 -0
  73. data/vendor/assets/stylesheets/_bootstrap-mincer.scss +19 -0
  74. data/vendor/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
  75. data/vendor/assets/stylesheets/_bootstrap.scss +56 -0
  76. data/vendor/assets/stylesheets/bootstrap/_alerts.scss +73 -0
  77. data/vendor/assets/stylesheets/bootstrap/_badges.scss +68 -0
  78. data/vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss +28 -0
  79. data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +244 -0
  80. data/vendor/assets/stylesheets/bootstrap/_buttons.scss +168 -0
  81. data/vendor/assets/stylesheets/bootstrap/_carousel.scss +270 -0
  82. data/vendor/assets/stylesheets/bootstrap/_close.scss +36 -0
  83. data/vendor/assets/stylesheets/bootstrap/_code.scss +69 -0
  84. data/vendor/assets/stylesheets/bootstrap/_component-animations.scss +37 -0
  85. data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +216 -0
  86. data/vendor/assets/stylesheets/bootstrap/_forms.scss +617 -0
  87. data/vendor/assets/stylesheets/bootstrap/_glyphicons.scss +307 -0
  88. data/vendor/assets/stylesheets/bootstrap/_grid.scss +84 -0
  89. data/vendor/assets/stylesheets/bootstrap/_input-groups.scss +171 -0
  90. data/vendor/assets/stylesheets/bootstrap/_jumbotron.scss +54 -0
  91. data/vendor/assets/stylesheets/bootstrap/_labels.scss +66 -0
  92. data/vendor/assets/stylesheets/bootstrap/_list-group.scss +130 -0
  93. data/vendor/assets/stylesheets/bootstrap/_media.scss +66 -0
  94. data/vendor/assets/stylesheets/bootstrap/_mixins.scss +40 -0
  95. data/vendor/assets/stylesheets/bootstrap/_modals.scss +150 -0
  96. data/vendor/assets/stylesheets/bootstrap/_navbar.scss +662 -0
  97. data/vendor/assets/stylesheets/bootstrap/_navs.scss +242 -0
  98. data/vendor/assets/stylesheets/bootstrap/_normalize.scss +424 -0
  99. data/vendor/assets/stylesheets/bootstrap/_pager.scss +54 -0
  100. data/vendor/assets/stylesheets/bootstrap/_pagination.scss +89 -0
  101. data/vendor/assets/stylesheets/bootstrap/_panels.scss +271 -0
  102. data/vendor/assets/stylesheets/bootstrap/_popovers.scss +131 -0
  103. data/vendor/assets/stylesheets/bootstrap/_print.scss +101 -0
  104. data/vendor/assets/stylesheets/bootstrap/_progress-bars.scss +87 -0
  105. data/vendor/assets/stylesheets/bootstrap/_responsive-embed.scss +35 -0
  106. data/vendor/assets/stylesheets/bootstrap/_responsive-utilities.scss +179 -0
  107. data/vendor/assets/stylesheets/bootstrap/_scaffolding.scss +161 -0
  108. data/vendor/assets/stylesheets/bootstrap/_tables.scss +234 -0
  109. data/vendor/assets/stylesheets/bootstrap/_theme.scss +291 -0
  110. data/vendor/assets/stylesheets/bootstrap/_thumbnails.scss +38 -0
  111. data/vendor/assets/stylesheets/bootstrap/_tooltip.scss +101 -0
  112. data/vendor/assets/stylesheets/bootstrap/_type.scss +298 -0
  113. data/vendor/assets/stylesheets/bootstrap/_utilities.scss +55 -0
  114. data/vendor/assets/stylesheets/bootstrap/_variables.scss +874 -0
  115. data/vendor/assets/stylesheets/bootstrap/_wells.scss +29 -0
  116. data/vendor/assets/stylesheets/bootstrap/mixins/_alerts.scss +14 -0
  117. data/vendor/assets/stylesheets/bootstrap/mixins/_background-variant.scss +12 -0
  118. data/vendor/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
  119. data/vendor/assets/stylesheets/bootstrap/mixins/_buttons.scss +65 -0
  120. data/vendor/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
  121. data/vendor/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
  122. data/vendor/assets/stylesheets/bootstrap/mixins/_forms.scss +88 -0
  123. data/vendor/assets/stylesheets/bootstrap/mixins/_gradients.scss +58 -0
  124. data/vendor/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
  125. data/vendor/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
  126. data/vendor/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
  127. data/vendor/assets/stylesheets/bootstrap/mixins/_image.scss +33 -0
  128. data/vendor/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
  129. data/vendor/assets/stylesheets/bootstrap/mixins/_list-group.scss +32 -0
  130. data/vendor/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
  131. data/vendor/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
  132. data/vendor/assets/stylesheets/bootstrap/mixins/_opacity.scss +8 -0
  133. data/vendor/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
  134. data/vendor/assets/stylesheets/bootstrap/mixins/_panels.scss +24 -0
  135. data/vendor/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +10 -0
  136. data/vendor/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
  137. data/vendor/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
  138. data/vendor/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
  139. data/vendor/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +21 -0
  140. data/vendor/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
  141. data/vendor/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
  142. data/vendor/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
  143. data/vendor/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
  144. data/vendor/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
  145. data/vendor/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +222 -0
  146. metadata +316 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d3b6f2f7f0e2b02e6a0adfd1d0ab3d7aa863f3c4
4
+ data.tar.gz: 1fa220c8a0d8b88591daddc9009e72a7195cdc42
5
+ SHA512:
6
+ metadata.gz: c5aa3b5d468c182cd443e9a5e1b5f25e212c063fd3b7d5418a377ed195b82afbc7297f0859e7c1ea8c25031344054dcc08548e8e37a76730e474d435f49cd900
7
+ data.tar.gz: c56cd27a46b28e4a376b8e562f39533f53be3938382e1ff4eb3edd62aafb01ecd226aebbb3e336db3d285d027cdcada8d7ba6dd852b95e6f0b1fa54f362effae
data/.DS_Store ADDED
Binary file
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at msxavii@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in jabysoft-bootstrap_generators.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Emerson Xavier
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,41 @@
1
+ # Jabysoft::BootstrapGenerators
2
+
3
+ [ ![Codeship Status for jabysoft/jabysoft-bootstrap_generators](https://app.codeship.com/projects/010626d0-a0a9-0134-6f7a-32a482bba10c/status?branch=master)](https://app.codeship.com/projects/189767)
4
+ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/40c6ffa1bb5847b4ae55d4e068c34e0f)](https://www.codacy.com/app/CQ-JABYSOFT/jabysoft-bootstrap_generators?utm_source=github.com&utm_medium=referral&utm_content=jabysoft/jabysoft-bootstrap_generators&utm_campaign=Badge_Grade)
5
+
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'jabysoft-bootstrap_generators'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install jabysoft-bootstrap_generators
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/jabysoft-bootstrap_generators. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
+
37
+
38
+ ## License
39
+
40
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
41
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1 @@
1
+ //= require bootstrap-sprockets
@@ -0,0 +1,38 @@
1
+ @import "bootstrap-compass"
2
+ @import "bootstrap-variables"
3
+ @import "bootstrap-sprockets"
4
+ @import "bootstrap"
5
+ @import "mixins"
6
+
7
+ .page-header
8
+ a.btn
9
+ float: right
10
+
11
+ a.btn + a.btn
12
+ margin-right: 8px
13
+
14
+ input[type="radio"], input[type="checkbox"]
15
+ width: initial
16
+ height: initial
17
+ margin-top: 7px
18
+
19
+
20
+ .field_with_errors
21
+ @extend .has-error !optional
22
+
23
+ .search-field
24
+ width: 30%
25
+
26
+ .alert-notice
27
+ color: #3c763d
28
+ background-color: #dff0d8
29
+ border-color: #d6e9c6
30
+
31
+ .alert-link
32
+ color: #2b542c
33
+
34
+ hr
35
+ border-top-color: #c9e2b3
36
+
37
+ .btn-primary a
38
+ color: white !important
@@ -0,0 +1,68 @@
1
+ // Mixins
2
+
3
+ @mixin transition-all()
4
+ {
5
+ -webkit-transition: all 0.35s;
6
+ -moz-transition: all 0.35s;
7
+ transition: all 0.35s;
8
+ }
9
+
10
+ @mixin background-cover()
11
+ {
12
+ -webkit-background-size: cover;
13
+ -moz-background-size: cover;
14
+ background-size: cover;
15
+ -o-background-size: cover;
16
+ }
17
+
18
+ @mixin button-variant($color, $background, $border)
19
+ {
20
+ color: $color;
21
+ background-color: $background;
22
+ border-color: $border;
23
+ @include transition-all;
24
+
25
+ &:hover,
26
+ &:focus,
27
+ &.focus,
28
+ &:active,
29
+ &.active,
30
+ .open > .dropdown-toggle {
31
+ color: $color;
32
+ background-color: darken($background, 5%);
33
+ border-color: darken($border, 7%);
34
+ }
35
+ &:active,
36
+ &.active,
37
+ .open > .dropdown-toggle {
38
+ background-image: none;
39
+ }
40
+ &.disabled,
41
+ &[disabled],
42
+ fieldset[disabled] & {
43
+ &,
44
+ &:hover,
45
+ &:focus,
46
+ &.focus,
47
+ &:active,
48
+ &.active {
49
+ background-color: $background;
50
+ border-color: $border;
51
+ }
52
+ }
53
+
54
+ .badge {
55
+ color: $background;
56
+ background-color: $color;
57
+ }
58
+ }
59
+
60
+ @mixin sans-serif-font()
61
+ {
62
+ font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
63
+ }
64
+
65
+ @mixin serif-font()
66
+ {
67
+ font-family: 'Merriweather', 'Helvetica Neue', Arial, sans-serif;
68
+ }
@@ -0,0 +1,46 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
5
+ %title= t('title.administration')
6
+ = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
7
+ = javascript_include_tag 'application', 'data-turbolinks-track' => true
8
+ = csrf_meta_tags
9
+ %body
10
+ %nav.navbar.navbar-default.navbar-fixed-top
11
+ .container
12
+ = link_to t('title.administration'), admin_root_path, class: 'navbar-brand'
13
+
14
+ %button{class: "navbar-toggle", "data-toggle" => "collapse", "data-target" => ".navHeaderCollapse"}
15
+ %span.glyphicon.glyphicon-th
16
+ #navbar.collapse.navbar-collapse.navHeaderCollapse
17
+ %ul.nav.navbar-nav.navbar-left
18
+ %li= link_to 'Hello', '#'
19
+ %li= link_to t('about'), '#'
20
+ %li.dropdown
21
+ %a.dropdown-toggle{src: '#', "data-toggle" => 'dropdown'}
22
+ = "Dropdown"
23
+ .glyphicon.glyphicon-chevron-down
24
+ %ul.dropdown-menu
25
+ %li= link_to 'First link', '#'
26
+
27
+ %ul.nav.navbar-nav.navbar-right
28
+ %li
29
+ .user-name User Name
30
+ .logout
31
+ = link_to t('logout'), '#', method: :delete, class: 'btn btn-default glyphicon glyphicon-off'
32
+ %li.user-avatar
33
+ = image_tag("icons/admin.png")
34
+
35
+ .container
36
+ .row
37
+ .col-lg-12
38
+ = render_flash_messages
39
+ .row
40
+ .col-lg-12
41
+ = yield
42
+
43
+ %footer.navbar.navbar-default.navbar-static-bottom
44
+ .container
45
+ %p.navbar-text
46
+ = "© Admin JabySoft - #{Date.today.year}".html_safe
@@ -0,0 +1,31 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %meta{:content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type"}/
5
+ %title= t('title.application')
6
+ = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
7
+ = javascript_include_tag 'application', 'data-turbolinks-track' => true
8
+ = csrf_meta_tags
9
+ %body
10
+ %nav.navbar.navbar-default.navbar-fixed-top{role: 'navigation'}
11
+ .container
12
+ = link_to t('title.application'), '#', class: 'navbar-brand'
13
+ %button{class: "navbar-toggle", "data-toggle" => "collapse", "data-target" => ".navHeaderCollapse"}
14
+ %span.glyphicon.glyphicon-th
15
+ .collapse.navbar-collapse.navHeaderCollapse
16
+ %ul.nav.navbar-nav.navbar-left
17
+ %li= link_to 'Hello', '#'
18
+ %li= link_to 'About', '#'
19
+
20
+ .container
21
+ .row
22
+ .col-lg-12
23
+ = render_flash_messages
24
+ .row
25
+ .col-lg-12
26
+ = yield
27
+
28
+ %footer.navbar.navbar-default.navbar-static-bottom
29
+ .container
30
+ %p.navbar-text
31
+ = "© JabySoft - #{Date.today.year}".html_safe
@@ -0,0 +1,9 @@
1
+ .input-group.date{onclick: remote_request(:get, date_locale_path)}
2
+ = f.text_field field, class: 'form-control datepicker'
3
+ .input-group-addon
4
+ %span.glyphicon.glyphicon-calendar
5
+
6
+ :javascript
7
+ $(function () {
8
+ $('.date').datepicker()
9
+ });
@@ -0,0 +1,7 @@
1
+ .container
2
+ .row
3
+ .col-lg-12
4
+ = render_flash_messages
5
+ .row
6
+ .col-lg-12
7
+ = yield
@@ -0,0 +1,7 @@
1
+ - unless flash.empty?
2
+ - flash.each do |name, msg|
3
+ = content_tag :div, class: "alert alert-#{name} alert-dismissible", role: "alert" do
4
+ %button.close{type: "button", data: {dismiss: "alert"} }
5
+ %span{aria: {hidden: "true"} } ×
6
+ %span.sr-only Close
7
+ = msg
@@ -0,0 +1,5 @@
1
+ .panel.panel-default
2
+ .panel-heading
3
+ %h2= heading
4
+ .panel-body
5
+ = render partial_body
@@ -0,0 +1,6 @@
1
+ = form_tag url, method: :get, html: {class: 'form-inline'} do
2
+ .form-group
3
+ .row
4
+ .col-md-12
5
+ = search_field_tag :search, "", placeholder: t('search'), class: 'search-field'
6
+ = submit_tag t('search'), class: 'btn btn-primary'
@@ -0,0 +1,6 @@
1
+ - if resource.errors.any?
2
+ .alert.alert-danger
3
+ %h4= t "error_message_header", :count => resource.errors.count, :model => resource.class.model_name.human
4
+ %ul
5
+ - resource.errors.full_messages.each do |msg|
6
+ %li= msg
@@ -0,0 +1,17 @@
1
+ - controller = params[:controller].split("/")
2
+ - url = "/#{resource.model_name.name.pluralize.downcase}/#{resource.id}"
3
+ - namespace = ''
4
+ .modal.fade{id: "delete-confirmation", role: "dialog"}
5
+ .modal-dialog
6
+ .modal-content
7
+ .modal-header
8
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
9
+ %h4.modal-title
10
+ = t('confirmation')
11
+ .modal-body
12
+ %p= t('are_you_sure')
13
+ .modal-footer
14
+ = link_to t('close'), "#", class: "btn btn-default", "data-dismiss" => "modal"
15
+ - if controller.size > 1
16
+ - url = "/#{controller[0]}" + url
17
+ = link_to t('confirm'), url, {method: :delete, class: "btn btn-primary"}