rails_admin_aaf_theme 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 502693c25d8ea4962d88d58637ab5ef4c908f25f
4
+ data.tar.gz: f9507a29d7837c5e2557f3f026d9d7fce52e4e46
5
+ SHA512:
6
+ metadata.gz: b48d1b0c7c8d7041b5c50372986f0654e8f80ffe6bde9c7f12fc57a9f1f03b9b7fd275a2bd1d4a970ea85bb9d90fcaac2b887a45232416323863c0b0fb4bfe7f
7
+ data.tar.gz: f788123fd083fdba9b30d6733c1ccec5c484e057dd9c529b486a9538d49815f1c7695b3f03b2424d6d1a71f0a199f823ef4818014cf26b1dde071e02aadf9856
@@ -0,0 +1,20 @@
1
+ Copyright 2016 Ryan Caught
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,58 @@
1
+ # RailsAdminAAFTheme
2
+
3
+ ## Installation
4
+ Add this line to your application's Gemfile (after `gem 'rails_admin'`):
5
+
6
+ ```ruby
7
+ gem 'rails_admin_aaf_theme'
8
+ ```
9
+
10
+ And then execute:
11
+ ```bash
12
+ $ bundle
13
+ ```
14
+
15
+ ### RailsAdmin initializer
16
+
17
+ In your RailsAdmin initializer, adding the following is suggested.
18
+
19
+ ```
20
+ AAF::SecureHeaders.development_mode! if Rails.env.development?
21
+
22
+ SecureHeaders::Configuration.override(:rails_admin) do |config|
23
+ config.csp[:style_src] << "'unsafe-inline'"
24
+ config.csp[:connect_src] = ["'self'"]
25
+ config.csp[:script_src] = config.csp[:script_src] + [
26
+ "'unsafe-eval'",
27
+ "'sha256-2IZ3eH4vQ4iO/yUXEJx3CWqGvsT1mFTk9j1WeznailE='"
28
+ # <script>
29
+ # jQuery(function($) {
30
+ #
31
+ # });
32
+ # </script>
33
+ ]
34
+ end
35
+
36
+ Kaminari.configure do |config|
37
+ config.page_method_name = :per_page_kaminari
38
+ end
39
+ ```
40
+
41
+ ### Theme usage by RailsAdmin
42
+
43
+ In your `config/application.rb` add:
44
+
45
+ ```
46
+ ENV['RAILS_ADMIN_THEME'] = 'aaf_theme'
47
+ ```
48
+
49
+ ## Conflicts
50
+
51
+ RailsAdmin can have a conflict with Lipstick's FormHelper.
52
+
53
+ If you are not using Lipstick form helpers, it's suggested to remove the
54
+ following from your `application_helper.rb`:
55
+
56
+ ```
57
+ include Lipstick::Helpers::FormHelper
58
+ ```
@@ -0,0 +1,19 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = 'RailsAdminAaf'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.md')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ load 'rails/tasks/statistics.rake'
18
+
19
+ require 'bundler/gem_tasks'
@@ -0,0 +1,27 @@
1
+ / https://github.com/sferik/rails_admin/blob/master/app/views/layouts/rails_admin/application.html.haml
2
+
3
+ !!! 5
4
+ %html{lang: I18n.locale}
5
+ %head
6
+ %meta{content: "IE=edge", "http-equiv" => "X-UA-Compatible"}
7
+ %meta{content: "text/html; charset=utf-8", "http-equiv" => "Content-Type"}
8
+ %meta{content: "width=device-width, initial-scale=1", name: "viewport; charset=utf-8"}
9
+ %meta{content: "NONE,NOARCHIVE", name: "robots"}
10
+ = csrf_meta_tag
11
+ = stylesheet_link_tag "rails_admin/rails_admin.css", media: :all
12
+ = javascript_include_tag "rails_admin/rails_admin.js"
13
+ -# Initialize JS simple i18n
14
+ = nonced_javascript_tag do
15
+ :plain
16
+ RailsAdmin.I18n.init('#{I18n.locale}', JSON.parse("#{j I18n.t("admin.js").to_json}"))
17
+ %body.rails_admin
18
+ #loading.label.label-warning{style: 'display:none; position:fixed; right:20px; bottom:20px; z-index:100000'}= t('admin.loading')
19
+ = render 'layouts/aaf_header'
20
+ %section.content
21
+ .container-fluid
22
+ .row
23
+ .col-sm-3.custom-sidebar-nav
24
+ = render "layouts/rails_admin/sidebar_navigation"
25
+ .col-sm-9
26
+ .content{:'data-pjax-container' => true}= render template: 'layouts/rails_admin/pjax'
27
+ = render 'layouts/aaf_footer'
@@ -0,0 +1,18 @@
1
+ / https://github.com/sferik/rails_admin/blob/master/app/views/layouts/rails_admin/pjax.html.haml
2
+
3
+ = nonced_javascript_tag do
4
+ :plain
5
+ $('.nav.nav-pills li.active').removeClass('active');
6
+ $('.nav.nav-pills li[data-model="#{@abstract_model.to_param}"]').addClass('active');
7
+ %title= "#{@abstract_model.try(:pretty_name) || @page_name} | #{[_get_plugin_name[0] || 'Rails', _get_plugin_name[1] || 'Admin'].join(' ')}"
8
+ .page-header
9
+ %h1= @page_name
10
+ - flash && flash.each do |key, value|
11
+ .alert.alert-dismissible{class: flash_alert_class(key)}
12
+ %button.close{type: 'button', :'data-dismiss' => "alert"} &times;
13
+ = value
14
+ = breadcrumb
15
+ %ul.nav.nav-tabs
16
+ = menu_for((@abstract_model ? (@object.try(:persisted?) ? :member : :collection) : :root), @abstract_model, @object)
17
+ = content_for :contextual_tabs
18
+ = yield
@@ -0,0 +1,5 @@
1
+ require 'rails_admin_aaf_theme/engine'
2
+
3
+ # Module
4
+ module RailsAdminAAFTheme
5
+ end
@@ -0,0 +1,4 @@
1
+ module RailsAdminAAFTheme
2
+ class Engine < ::Rails::Engine
3
+ end
4
+ end
@@ -0,0 +1,3 @@
1
+ module RailsAdminAAFTheme
2
+ VERSION = '0.1.0'.freeze
3
+ end
@@ -0,0 +1,8 @@
1
+ /*
2
+ Customize Sass mixins from Twitter-Bootstrap/RailsAdmin theme or add new ones for your own use.
3
+
4
+ Available mixins to use/override:
5
+
6
+ https://github.com/twbs/bootstrap-sass/tree/master/assets/stylesheets/bootstrap/mixins
7
+ https://github.com/sferik/rails_admin/blob/master/app/assets/stylesheets/rails_admin/base/mixins.scss
8
+ */
@@ -0,0 +1,37 @@
1
+ @import 'aaf-lipstick';
2
+ @import 'rails_admin/bootstrap/_variables';
3
+ .page-header {
4
+ margin-top: 0;
5
+ }
6
+
7
+ body.rails_admin {
8
+ padding-top: 0;
9
+ }
10
+
11
+ .custom-sidebar-nav {
12
+ padding: 0;
13
+ background-color: $navbar-default-bg;
14
+ .dropdown-header {
15
+ padding: ($grid-gutter-width / 2) ($grid-gutter-width / 2) 3px;
16
+ font-weight: bold;
17
+ color: $gray;
18
+ text-transform: uppercase;
19
+ }
20
+ >.nav-stacked>li>a {
21
+ padding: $padding-base-vertical ($grid-gutter-width / 2);
22
+ border-radius: 0;
23
+ &.nav-level-1 {
24
+ padding-left: $grid-gutter-width;
25
+ }
26
+ &.nav-level-2 {
27
+ padding-left: ($grid-gutter-width * 1.5);
28
+ }
29
+ &.nav-level-3 {
30
+ padding-left: ($grid-gutter-width * 2);
31
+ }
32
+ }
33
+ }
34
+
35
+ .normal-white-space {
36
+ white-space: normal !important;
37
+ }
@@ -0,0 +1,3 @@
1
+ $navbar-height: 0 !default;
2
+ $navbar-padding-horizontal: 15px;
3
+ $navbar-padding-vertical: 15px;
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rails_admin_aaf_theme
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Ryan Caught
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-12-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 5.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 5.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: aaf-lipstick
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: secure_headers
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: AAF theme for Rails Admin
56
+ email:
57
+ - rcaught@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - MIT-LICENSE
63
+ - README.md
64
+ - Rakefile
65
+ - app/views/layouts/rails_admin/application.html.haml
66
+ - app/views/layouts/rails_admin/pjax.html.haml
67
+ - lib/rails_admin_aaf_theme.rb
68
+ - lib/rails_admin_aaf_theme/engine.rb
69
+ - lib/rails_admin_aaf_theme/version.rb
70
+ - vendor/assets/stylesheets/rails_admin/themes/aaf_theme/mixins.scss
71
+ - vendor/assets/stylesheets/rails_admin/themes/aaf_theme/theming.scss
72
+ - vendor/assets/stylesheets/rails_admin/themes/aaf_theme/variables.scss
73
+ homepage: https://github.com/ausaccessfed/rails_admin_aaf_theme
74
+ licenses:
75
+ - MIT
76
+ metadata: {}
77
+ post_install_message:
78
+ rdoc_options: []
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ requirements: []
92
+ rubyforge_project:
93
+ rubygems_version: 2.6.8
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: AAF theme for Rails Admin
97
+ test_files: []