jabysoft-bootstrap_generators 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.DS_Store +0 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/app/assets/javascripts/jabysoft.js +1 -0
- data/app/assets/stylesheets/jabysoft.sass +38 -0
- data/app/assets/stylesheets/mixins.scss +68 -0
- data/app/views/layouts/admin.html.haml +46 -0
- data/app/views/layouts/application.html.haml +31 -0
- data/app/views/shared/_datepicker_field.html.haml +9 -0
- data/app/views/shared/_layout.html.haml +7 -0
- data/app/views/shared/_messages.html.haml +7 -0
- data/app/views/shared/_panel.html.haml +5 -0
- data/app/views/shared/_search_form.html.haml +6 -0
- data/app/views/shared/form/_error_messages.html.haml +6 -0
- data/app/views/shared/modals/_delete_confirmation.html.haml +17 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/config/locales/en.yml +35 -0
- data/config/locales/pt-BR.yml +35 -0
- data/jabysoft-bootstrap_generators.gemspec +40 -0
- data/lib/generators/haml/scaffold/scaffold_generator.rb +35 -0
- data/lib/generators/jabysoft/setup/USAGE +19 -0
- data/lib/generators/jabysoft/setup/setup_generator.rb +57 -0
- data/lib/generators/jabysoft/setup/templates/.rspec +3 -0
- data/lib/generators/jabysoft/setup/templates/Gemfile +52 -0
- data/lib/generators/jabysoft/setup/templates/assets/stylesheets/bootstrap-variables.scss +876 -0
- data/lib/generators/jabysoft/setup/templates/layouts/admin.html.haml +46 -0
- data/lib/generators/jabysoft/setup/templates/layouts/application.html.haml +32 -0
- data/lib/generators/jabysoft/setup/templates/spec/rails_helper.rb +95 -0
- data/lib/generators/jabysoft/setup/templates/spec/spec_helper.rb +97 -0
- data/lib/generators/rspec/scaffold/scaffold_generator.rb +157 -0
- data/lib/jabysoft/bootstrap_generators.rb +15 -0
- data/lib/jabysoft/bootstrap_generators/version.rb +5 -0
- data/lib/templates/haml/scaffold/_form.html.haml +14 -0
- data/lib/templates/haml/scaffold/_index.html.haml +25 -0
- data/lib/templates/haml/scaffold/edit.html.haml +1 -0
- data/lib/templates/haml/scaffold/index.html.haml +1 -0
- data/lib/templates/haml/scaffold/new.html.haml +1 -0
- data/lib/templates/haml/scaffold/show.html.haml +1 -0
- data/lib/templates/rails/scaffold_controller/controller.rb +28 -0
- data/lib/templates/rspec/scaffold/controller_spec.rb +148 -0
- data/lib/templates/rspec/scaffold/model_spec.rb +14 -0
- data/lib/templates/rspec/scaffold/request_spec.rb +10 -0
- data/lib/templates/rspec/scaffold/routing_spec.rb +44 -0
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +288 -0
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
- data/vendor/assets/images/.keep +0 -0
- data/vendor/assets/javascripts/bootstrap-sprockets.js +12 -0
- data/vendor/assets/javascripts/bootstrap.js +2377 -0
- data/vendor/assets/javascripts/bootstrap.min.js +7 -0
- data/vendor/assets/javascripts/bootstrap/affix.js +162 -0
- data/vendor/assets/javascripts/bootstrap/alert.js +94 -0
- data/vendor/assets/javascripts/bootstrap/button.js +125 -0
- data/vendor/assets/javascripts/bootstrap/carousel.js +237 -0
- data/vendor/assets/javascripts/bootstrap/collapse.js +212 -0
- data/vendor/assets/javascripts/bootstrap/dropdown.js +165 -0
- data/vendor/assets/javascripts/bootstrap/modal.js +339 -0
- data/vendor/assets/javascripts/bootstrap/popover.js +108 -0
- data/vendor/assets/javascripts/bootstrap/scrollspy.js +172 -0
- data/vendor/assets/javascripts/bootstrap/tab.js +155 -0
- data/vendor/assets/javascripts/bootstrap/tooltip.js +520 -0
- data/vendor/assets/javascripts/bootstrap/transition.js +59 -0
- data/vendor/assets/stylesheets/_bootstrap-compass.scss +9 -0
- data/vendor/assets/stylesheets/_bootstrap-mincer.scss +19 -0
- data/vendor/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
- data/vendor/assets/stylesheets/_bootstrap.scss +56 -0
- data/vendor/assets/stylesheets/bootstrap/_alerts.scss +73 -0
- data/vendor/assets/stylesheets/bootstrap/_badges.scss +68 -0
- data/vendor/assets/stylesheets/bootstrap/_breadcrumbs.scss +28 -0
- data/vendor/assets/stylesheets/bootstrap/_button-groups.scss +244 -0
- data/vendor/assets/stylesheets/bootstrap/_buttons.scss +168 -0
- data/vendor/assets/stylesheets/bootstrap/_carousel.scss +270 -0
- data/vendor/assets/stylesheets/bootstrap/_close.scss +36 -0
- data/vendor/assets/stylesheets/bootstrap/_code.scss +69 -0
- data/vendor/assets/stylesheets/bootstrap/_component-animations.scss +37 -0
- data/vendor/assets/stylesheets/bootstrap/_dropdowns.scss +216 -0
- data/vendor/assets/stylesheets/bootstrap/_forms.scss +617 -0
- data/vendor/assets/stylesheets/bootstrap/_glyphicons.scss +307 -0
- data/vendor/assets/stylesheets/bootstrap/_grid.scss +84 -0
- data/vendor/assets/stylesheets/bootstrap/_input-groups.scss +171 -0
- data/vendor/assets/stylesheets/bootstrap/_jumbotron.scss +54 -0
- data/vendor/assets/stylesheets/bootstrap/_labels.scss +66 -0
- data/vendor/assets/stylesheets/bootstrap/_list-group.scss +130 -0
- data/vendor/assets/stylesheets/bootstrap/_media.scss +66 -0
- data/vendor/assets/stylesheets/bootstrap/_mixins.scss +40 -0
- data/vendor/assets/stylesheets/bootstrap/_modals.scss +150 -0
- data/vendor/assets/stylesheets/bootstrap/_navbar.scss +662 -0
- data/vendor/assets/stylesheets/bootstrap/_navs.scss +242 -0
- data/vendor/assets/stylesheets/bootstrap/_normalize.scss +424 -0
- data/vendor/assets/stylesheets/bootstrap/_pager.scss +54 -0
- data/vendor/assets/stylesheets/bootstrap/_pagination.scss +89 -0
- data/vendor/assets/stylesheets/bootstrap/_panels.scss +271 -0
- data/vendor/assets/stylesheets/bootstrap/_popovers.scss +131 -0
- data/vendor/assets/stylesheets/bootstrap/_print.scss +101 -0
- data/vendor/assets/stylesheets/bootstrap/_progress-bars.scss +87 -0
- data/vendor/assets/stylesheets/bootstrap/_responsive-embed.scss +35 -0
- data/vendor/assets/stylesheets/bootstrap/_responsive-utilities.scss +179 -0
- data/vendor/assets/stylesheets/bootstrap/_scaffolding.scss +161 -0
- data/vendor/assets/stylesheets/bootstrap/_tables.scss +234 -0
- data/vendor/assets/stylesheets/bootstrap/_theme.scss +291 -0
- data/vendor/assets/stylesheets/bootstrap/_thumbnails.scss +38 -0
- data/vendor/assets/stylesheets/bootstrap/_tooltip.scss +101 -0
- data/vendor/assets/stylesheets/bootstrap/_type.scss +298 -0
- data/vendor/assets/stylesheets/bootstrap/_utilities.scss +55 -0
- data/vendor/assets/stylesheets/bootstrap/_variables.scss +874 -0
- data/vendor/assets/stylesheets/bootstrap/_wells.scss +29 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_alerts.scss +14 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_background-variant.scss +12 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_buttons.scss +65 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_forms.scss +88 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_gradients.scss +58 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_image.scss +33 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_list-group.scss +32 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_opacity.scss +8 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_panels.scss +24 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_progress-bar.scss +10 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_reset-text.scss +18 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +21 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
- data/vendor/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +222 -0
- 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
data/.rspec
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -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
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 @@
|
|
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,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,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">×</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"}
|