tkh_admin_panel 0.0.1
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.
- data/.DS_Store +0 -0
- data/.gitignore +20 -0
- data/CHANGELOG.md +9 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +38 -0
- data/Rakefile +2 -0
- data/app/assets/javascripts/admin.js +10 -0
- data/app/assets/javascripts/custom.js.coffee +4 -0
- data/app/assets/stylesheets/admin.css.scss +172 -0
- data/app/assets/stylesheets/bootstrap_and_overrides.css.scss +25 -0
- data/app/views/layouts/admin.html.erb +57 -0
- data/lib/tkh_admin_panel.rb +9 -0
- data/lib/tkh_admin_panel/version.rb +3 -0
- data/public/.DS_Store +0 -0
- data/public/favicon.ico +0 -0
- data/tkh_admin_panel.gemspec +21 -0
- metadata +110 -0
data/.DS_Store
ADDED
Binary file
|
data/.gitignore
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Swami Atma - Ten Thousand Hours
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# TkhAdminPanel
|
2
|
+
|
3
|
+
This is a Rails engine with an admin panel layout, assets and basic functionality.
|
4
|
+
|
5
|
+
Primarily developed for Ten Thousand Hours but we are happy to share if anybody finds it useful.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
This gem was created in sync with Rails 3.2.6 and there is a railstie dependency of "~> 3.2". Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
gem 'tkh_admin_panel'
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install tkh_admin_panel
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
You also need to do the following:
|
24
|
+
|
25
|
+
* add admin.js and admin.css to your config.assets.precompile in your production environment config file
|
26
|
+
* render layout: 'admin' for the controller actions you want to be linked to this layout
|
27
|
+
* Add a gem 'bootstrap-sass' line to your gemfile in the assets group and run bundle
|
28
|
+
* Restart your server
|
29
|
+
|
30
|
+
## Contributing
|
31
|
+
|
32
|
+
Pull requests for new features and bug fixes are welcome.
|
33
|
+
|
34
|
+
1. Fork it
|
35
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
36
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
37
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
38
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into including all the files listed below.
|
2
|
+
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
3
|
+
// be included in the compiled file accessible from http://example.com/assets/application.js
|
4
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
5
|
+
// the compiled file.
|
6
|
+
//
|
7
|
+
//= require jquery
|
8
|
+
//= require jquery_ujs
|
9
|
+
//= require bootstrap
|
10
|
+
//= require custom
|
@@ -0,0 +1,172 @@
|
|
1
|
+
@import 'bootstrap_and_overrides.css.scss';
|
2
|
+
|
3
|
+
//body {
|
4
|
+
// margin: 0;
|
5
|
+
// padding: 0;
|
6
|
+
//}
|
7
|
+
//
|
8
|
+
//h1, h2, h3, h4, p, ul, ol { padding-left: 1%; padding-right: 2%; }
|
9
|
+
//blockquote {
|
10
|
+
// border-left: 3px solid $red;
|
11
|
+
// margin: 2em 0 2em 5%;
|
12
|
+
// padding-right: 2%;
|
13
|
+
// cite {
|
14
|
+
// font-style: italic;
|
15
|
+
// font-weight: bold;
|
16
|
+
// }
|
17
|
+
// cite:before { content:" ~ "; }
|
18
|
+
//}
|
19
|
+
//
|
20
|
+
//p, ul, ol { font-size: 1em; }
|
21
|
+
//
|
22
|
+
//h1 {
|
23
|
+
// color: $purple;
|
24
|
+
//}
|
25
|
+
//
|
26
|
+
//h2, h3, h4 {
|
27
|
+
// color: $blue;
|
28
|
+
//}
|
29
|
+
//
|
30
|
+
//ul {
|
31
|
+
// list-style-image: image_url('main/bullet.png');
|
32
|
+
//}
|
33
|
+
//
|
34
|
+
//a { text-decoration: underline; }
|
35
|
+
//
|
36
|
+
//footer {
|
37
|
+
// text-align: center;
|
38
|
+
//}
|
39
|
+
//
|
40
|
+
//.navbar { margin-bottom: 0; }
|
41
|
+
//
|
42
|
+
//.navbar, .navbar-inner {
|
43
|
+
// border-radius: 0;
|
44
|
+
// .brand {
|
45
|
+
// font-weight: bold;
|
46
|
+
// text-decoration: none;
|
47
|
+
// }
|
48
|
+
//}
|
49
|
+
//
|
50
|
+
//.navbar .nav li > a { text-decoration: underline; }
|
51
|
+
//
|
52
|
+
//.navbar .nav .active > a {
|
53
|
+
// color: #fff;
|
54
|
+
// font-weight: bold;
|
55
|
+
// text-decoration: none;
|
56
|
+
//}
|
57
|
+
//
|
58
|
+
//
|
59
|
+
//#main-content {
|
60
|
+
// padding: 1.75em 0;
|
61
|
+
// img {
|
62
|
+
// margin: 0 0 5px 3px;
|
63
|
+
// width: 40%;
|
64
|
+
// }
|
65
|
+
//}
|
66
|
+
//
|
67
|
+
//footer {
|
68
|
+
// background-color: $purple;
|
69
|
+
// color: #fff;
|
70
|
+
// margin: 0;
|
71
|
+
// padding: .33em 0 .15em;
|
72
|
+
// width: 100%;
|
73
|
+
// a {
|
74
|
+
// color: #fff;
|
75
|
+
// }
|
76
|
+
// a:hover { color: #fff; font-weight: bold; }
|
77
|
+
//}
|
78
|
+
//
|
79
|
+
//caption { // table titles
|
80
|
+
// color: $blue;
|
81
|
+
// font-size: 1.7em;
|
82
|
+
// font-weight: bold;
|
83
|
+
// padding: .2em 1em;
|
84
|
+
//}
|
85
|
+
//
|
86
|
+
//th {
|
87
|
+
// background-color: $red;
|
88
|
+
// color: $white;
|
89
|
+
//}
|
90
|
+
//
|
91
|
+
//@media (max-width: 480px) {
|
92
|
+
// #big-header {
|
93
|
+
// display: none;
|
94
|
+
// }
|
95
|
+
//}
|
96
|
+
//@media (max-width: 767px) {
|
97
|
+
// #big-header {
|
98
|
+
// margin: 0;
|
99
|
+
// padding: 0;
|
100
|
+
// img {
|
101
|
+
// width: 100%;
|
102
|
+
// }
|
103
|
+
// }
|
104
|
+
//}
|
105
|
+
//
|
106
|
+
//@media (min-width: 768px) {
|
107
|
+
// html {
|
108
|
+
// background-color: #dcd3e5;
|
109
|
+
// }
|
110
|
+
//
|
111
|
+
// body {
|
112
|
+
// margin: 0 auto 2em;
|
113
|
+
// border-radius: 0 0 10px 10px;
|
114
|
+
// width: 95%;
|
115
|
+
// @include box-shadow(5px 8px 18px 3px rgba(0,0,0,.25));
|
116
|
+
// }
|
117
|
+
//
|
118
|
+
// #big-header {
|
119
|
+
// margin: 0;
|
120
|
+
// padding: 0;
|
121
|
+
// img {
|
122
|
+
// width: 100%;
|
123
|
+
// }
|
124
|
+
// }
|
125
|
+
//
|
126
|
+
// #main-content {
|
127
|
+
// background: image_url('main/swooshes-big.jpg') top right no-repeat;
|
128
|
+
// img {
|
129
|
+
// margin: 0 0 6px 4px;
|
130
|
+
// width: 35%;
|
131
|
+
// }
|
132
|
+
// }
|
133
|
+
//
|
134
|
+
// footer { border-radius: 0 0 10px 10px; }
|
135
|
+
//
|
136
|
+
// .table-narrow {
|
137
|
+
// margin: .2em auto 1em;
|
138
|
+
// width: 50%;
|
139
|
+
// }
|
140
|
+
//
|
141
|
+
//}
|
142
|
+
//
|
143
|
+
//@media (min-width: 768px) and (max-width: 979px) {
|
144
|
+
// #main-content {
|
145
|
+
// background: image_url('main/swooshes.jpg') top right no-repeat;
|
146
|
+
// }
|
147
|
+
//}
|
148
|
+
//
|
149
|
+
//@media (min-width: 980px) {
|
150
|
+
// body { width: 84%; }
|
151
|
+
// p, ul, ol { font-size: 1.05em; }
|
152
|
+
// #main-content {
|
153
|
+
// background: image_url('main/swooshes-big.jpg') top right no-repeat;
|
154
|
+
// img {
|
155
|
+
// margin: 0 0 8px 6px;
|
156
|
+
// width: 30%;
|
157
|
+
// }
|
158
|
+
// }
|
159
|
+
//}
|
160
|
+
//
|
161
|
+
//@media (min-width: 1200px) {
|
162
|
+
// body { width: 78%; }
|
163
|
+
// p, ul, ol { font-size: 1.1em; }
|
164
|
+
// #main-content img {
|
165
|
+
// margin: 0 0 9px 7px;
|
166
|
+
// width: 21%;
|
167
|
+
// }
|
168
|
+
//}
|
169
|
+
//
|
170
|
+
//
|
171
|
+
//// generic classes
|
172
|
+
//.text-right { text-align: right; }
|
@@ -0,0 +1,25 @@
|
|
1
|
+
//// setting variables
|
2
|
+
//// some colors
|
3
|
+
//$purple: #52247f;
|
4
|
+
//$blue: #008fc5;
|
5
|
+
//$red: #ad5648;
|
6
|
+
//$purple20: #dcd3e5;
|
7
|
+
//$purple10: #ede9f2;
|
8
|
+
//$purple5: #f6f4f8;
|
9
|
+
//
|
10
|
+
//$linkColor: $purple;
|
11
|
+
//$linkColorHover: $red;
|
12
|
+
//
|
13
|
+
//// Set the correct sprite paths
|
14
|
+
//$iconSpritePath: image-path('glyphicons-halflings.png');
|
15
|
+
//$iconWhiteSpritePath: image-path('glyphicons-halflings-white.png');
|
16
|
+
//
|
17
|
+
//// navbar
|
18
|
+
//$navbarBackground: $red;
|
19
|
+
//$navbarBackgroundHighlight: #ad5648;
|
20
|
+
//$navbarText: #fff;
|
21
|
+
//$navbarLinkColor: #fff;
|
22
|
+
//$navbarLinkColorHover: $purple20;
|
23
|
+
|
24
|
+
@import "bootstrap";
|
25
|
+
@import "bootstrap-responsive";
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="<%= I18n.locale.to_s || 'en' %>">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>Admin Panel<%= " for #{SETTINGS['site_name']}" if SETTINGS['site_name'] %></title>
|
7
|
+
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
8
|
+
<!--[if lt IE 9]>
|
9
|
+
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
10
|
+
<![endif]-->
|
11
|
+
<!-- Le styles -->
|
12
|
+
<%= stylesheet_link_tag "admin", :media => "all" %>
|
13
|
+
<!-- Le fav and touch icons -->
|
14
|
+
<%= favicon_link_tag %>
|
15
|
+
<link href="images/apple-touch-icon.png" rel="apple-touch-icon">
|
16
|
+
<link href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon" sizes="72x72">
|
17
|
+
<link href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon" sizes="114x114">
|
18
|
+
<%= csrf_meta_tag %>
|
19
|
+
</head>
|
20
|
+
|
21
|
+
<body>
|
22
|
+
|
23
|
+
<div class="container-fluid">
|
24
|
+
<div class="row-fluid">
|
25
|
+
|
26
|
+
<div id="main-content" class="span12">
|
27
|
+
<p>
|
28
|
+
<%= I18n.locale == :en ? link_to('switch to Spanish', locale: :es) : link_to('switch to English', locale: :en) %>
|
29
|
+
</p>
|
30
|
+
<h1>Admin Panel<%= " for #{SETTINGS['site_name']}" if SETTINGS['site_name'] %></h1>
|
31
|
+
<% flash.each do |name, msg| %>
|
32
|
+
<div class="alert alert-<%= name == :notice ? "success" : "error" %>">
|
33
|
+
<a class="close" data-dismiss="alert">×</a>
|
34
|
+
<%= msg %>
|
35
|
+
</div>
|
36
|
+
<% end %>
|
37
|
+
|
38
|
+
<%= yield %>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
</div><!--/row-->
|
42
|
+
</div> <!-- /container -->
|
43
|
+
|
44
|
+
<div id="footer">
|
45
|
+
<div id="ohlala-name">
|
46
|
+
<p><%= SETTINGS['web_firm_name'] || "Ten Thousand Hours" %></p>
|
47
|
+
</div>
|
48
|
+
<p><%= SETTINGS['web_firm_short_url'] || "swami@TenThousandHours.eu" %></p>
|
49
|
+
</div>
|
50
|
+
|
51
|
+
<!-- Le javascript
|
52
|
+
================================================== -->
|
53
|
+
<!-- Placed at the end of the document so the pages load faster -->
|
54
|
+
<%= javascript_include_tag "admin" %>
|
55
|
+
|
56
|
+
</body>
|
57
|
+
</html>
|
data/public/.DS_Store
ADDED
Binary file
|
data/public/favicon.ico
ADDED
Binary file
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/tkh_admin_panel/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Swami Atma"]
|
6
|
+
gem.email = ["swami@TenThousandHours.eu"]
|
7
|
+
gem.description = %q{Admin panel layout engine}
|
8
|
+
gem.summary = %q{A Rails admin panel engine with layout, assets, and basic functionality}
|
9
|
+
gem.homepage = ""
|
10
|
+
|
11
|
+
gem.add_dependency "railties", "~> 3.2"
|
12
|
+
gem.add_dependency "sass-rails"
|
13
|
+
gem.add_dependency "bootstrap-sass"
|
14
|
+
|
15
|
+
gem.files = `git ls-files`.split($\)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
+
gem.name = "tkh_admin_panel"
|
19
|
+
gem.require_paths = ["lib"]
|
20
|
+
gem.version = TkhAdminPanel::VERSION
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tkh_admin_panel
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Swami Atma
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-07-24 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: railties
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ~>
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.2'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.2'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: sass-rails
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: bootstrap-sass
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :runtime
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
description: Admin panel layout engine
|
63
|
+
email:
|
64
|
+
- swami@TenThousandHours.eu
|
65
|
+
executables: []
|
66
|
+
extensions: []
|
67
|
+
extra_rdoc_files: []
|
68
|
+
files:
|
69
|
+
- .DS_Store
|
70
|
+
- .gitignore
|
71
|
+
- CHANGELOG.md
|
72
|
+
- Gemfile
|
73
|
+
- LICENSE
|
74
|
+
- README.md
|
75
|
+
- Rakefile
|
76
|
+
- app/assets/javascripts/admin.js
|
77
|
+
- app/assets/javascripts/custom.js.coffee
|
78
|
+
- app/assets/stylesheets/admin.css.scss
|
79
|
+
- app/assets/stylesheets/bootstrap_and_overrides.css.scss
|
80
|
+
- app/views/layouts/admin.html.erb
|
81
|
+
- lib/tkh_admin_panel.rb
|
82
|
+
- lib/tkh_admin_panel/version.rb
|
83
|
+
- public/.DS_Store
|
84
|
+
- public/favicon.ico
|
85
|
+
- tkh_admin_panel.gemspec
|
86
|
+
homepage: ''
|
87
|
+
licenses: []
|
88
|
+
post_install_message:
|
89
|
+
rdoc_options: []
|
90
|
+
require_paths:
|
91
|
+
- lib
|
92
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
94
|
+
requirements:
|
95
|
+
- - ! '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
requirements: []
|
105
|
+
rubyforge_project:
|
106
|
+
rubygems_version: 1.8.23
|
107
|
+
signing_key:
|
108
|
+
specification_version: 3
|
109
|
+
summary: A Rails admin panel engine with layout, assets, and basic functionality
|
110
|
+
test_files: []
|