panel 0.1.5
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.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +42 -0
- data/Rakefile +34 -0
- data/app/assets/javascripts/panel/index.js +2 -0
- data/app/assets/stylesheets/panel/base.scss +59 -0
- data/app/assets/stylesheets/panel/content.scss +5 -0
- data/app/assets/stylesheets/panel/flash.scss +24 -0
- data/app/assets/stylesheets/panel/footer.scss +13 -0
- data/app/assets/stylesheets/panel/forms.scss +86 -0
- data/app/assets/stylesheets/panel/header.scss +19 -0
- data/app/assets/stylesheets/panel/index.css +3 -0
- data/app/assets/stylesheets/panel/navigation.scss +34 -0
- data/app/assets/stylesheets/panel/options.scss +26 -0
- data/app/assets/stylesheets/panel/page.scss +7 -0
- data/app/assets/stylesheets/panel/pager.scss +39 -0
- data/app/assets/stylesheets/panel/tables.scss +40 -0
- data/app/helpers/panel/base_helper.rb +9 -0
- data/app/views/panel/_errors.html.erb +5 -0
- data/app/views/panel/_options.html.erb +8 -0
- data/config/locales/en.yml +18 -0
- data/config/locales/es.yml +18 -0
- data/lib/generators/panel/install_generator.rb +20 -0
- data/lib/generators/panel/resource_generator.rb +33 -0
- data/lib/generators/panel/templates/install/base_controller.rb +15 -0
- data/lib/generators/panel/templates/install/index.html.erb +0 -0
- data/lib/generators/panel/templates/install/pages_controller.rb +8 -0
- data/lib/generators/panel/templates/install/panel.html.erb +55 -0
- data/lib/generators/panel/templates/resource/_form.html.erb +7 -0
- data/lib/generators/panel/templates/resource/edit.html.erb +3 -0
- data/lib/generators/panel/templates/resource/index.html.erb +20 -0
- data/lib/generators/panel/templates/resource/new.html.erb +3 -0
- data/lib/generators/panel/templates/resource/resource_controller.rb +46 -0
- data/lib/panel.rb +5 -0
- data/lib/panel/engine.rb +4 -0
- data/lib/panel/version.rb +5 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +29 -0
- data/test/dummy/config/environments/production.rb +80 -0
- data/test/dummy/config/environments/test.rb +36 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/public/404.html +58 -0
- data/test/dummy/public/422.html +58 -0
- data/test/dummy/public/500.html +57 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/test_helper.rb +15 -0
- metadata +198 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: abb4ad06a254ddb368f48b341eac7ae44ae32938
|
|
4
|
+
data.tar.gz: 0b6da5b13af3396dded8fe410494b460f0f6db47
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: c6305b331ca8bdb0d50e11b3411fa4b4e5cc9ecb7a3f4401e672a59874a5dfb7b2167cfe08201c4f2f50ded32162128b45f12b78eaeae656e2f6c672adfd495f
|
|
7
|
+
data.tar.gz: a2290fbc08b3d2eaaa95e91a0fa72c867c297c0b84b2732dbc036eeeccd170d974e3f2dd7ab11fb366124d263bdae6fb8800e32074a9952c53c928dace9ae618
|
data/MIT-LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright 2013 Mattways
|
|
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.
|
data/README.rdoc
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{<img src="https://codeclimate.com/github/mattways/panel.png" />}[https://codeclimate.com/github/mattways/panel] {<img src="https://travis-ci.org/mattways/panel.png?branch=master" alt="Build Status" />}[https://travis-ci.org/mattways/panel] {<img src="https://gemnasium.com/mattways/panel.png" alt="Dependency Status" />}[https://gemnasium.com/mattways/panel]
|
|
2
|
+
|
|
3
|
+
= Panel
|
|
4
|
+
|
|
5
|
+
Minimalistic and easy to customize panel.
|
|
6
|
+
|
|
7
|
+
= Install
|
|
8
|
+
|
|
9
|
+
Put this line in your Gemfile:
|
|
10
|
+
gem 'panel'
|
|
11
|
+
|
|
12
|
+
Then bundle:
|
|
13
|
+
$ bundle
|
|
14
|
+
|
|
15
|
+
= Usage
|
|
16
|
+
|
|
17
|
+
To install the panel do:
|
|
18
|
+
rails g panel:install
|
|
19
|
+
|
|
20
|
+
To generate a resource do:
|
|
21
|
+
rails g panel:resource model
|
|
22
|
+
|
|
23
|
+
= Customize
|
|
24
|
+
|
|
25
|
+
To protect the panel directory edit authorize filter in:
|
|
26
|
+
app/controllers/panel/base_controller.rb
|
|
27
|
+
|
|
28
|
+
To change the behavior of a resource:
|
|
29
|
+
app/controllers/panel/models_controller.rb
|
|
30
|
+
|
|
31
|
+
To change the layout edit:
|
|
32
|
+
app/views/layouts/panel.html.erb
|
|
33
|
+
|
|
34
|
+
To change the resource form edit:
|
|
35
|
+
app/views/panel/models/_form.html.erb
|
|
36
|
+
|
|
37
|
+
To change the resource grid edit:
|
|
38
|
+
app/views/panel/models/index.html.erb
|
|
39
|
+
|
|
40
|
+
To change the search scope edit:
|
|
41
|
+
app/models/model.rb
|
|
42
|
+
|
data/Rakefile
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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 = 'Panel'
|
|
12
|
+
rdoc.options << '--line-numbers'
|
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
APP_RAKEFILE = File.expand_path('../test/dummy/Rakefile', __FILE__)
|
|
18
|
+
load 'rails/tasks/engine.rake'
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
Bundler::GemHelper.install_tasks
|
|
23
|
+
|
|
24
|
+
require 'rake/testtask'
|
|
25
|
+
|
|
26
|
+
Rake::TestTask.new(:test) do |t|
|
|
27
|
+
t.libs << 'lib'
|
|
28
|
+
t.libs << 'test'
|
|
29
|
+
t.pattern = 'test/**/*_test.rb'
|
|
30
|
+
t.verbose = false
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
task default: :test
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@import url('//fonts.googleapis.com/css?family=Armata');
|
|
2
|
+
|
|
3
|
+
* {
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
html,
|
|
9
|
+
body {
|
|
10
|
+
height: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
body,
|
|
14
|
+
input,
|
|
15
|
+
textarea,
|
|
16
|
+
select {
|
|
17
|
+
font-family: Armata;
|
|
18
|
+
color: #787878;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
ul,
|
|
22
|
+
li {
|
|
23
|
+
list-style: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
a {
|
|
27
|
+
color: #5d8869;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
text-decoration: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.hidden-text {
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
text-indent: -9999px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.holder {
|
|
38
|
+
margin: auto;
|
|
39
|
+
width: 980px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.button {
|
|
43
|
+
display: block;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.action {
|
|
47
|
+
height: 32px;
|
|
48
|
+
padding: 0 20px;
|
|
49
|
+
background: #f1f3f2;
|
|
50
|
+
font-size: 11px;
|
|
51
|
+
line-height: 32px;
|
|
52
|
+
color: #797878;
|
|
53
|
+
text-transform: uppercase;
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
background: #dbdddc;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
|
|
2
|
+
#flash {
|
|
3
|
+
margin: -15px auto 30px auto;
|
|
4
|
+
padding-top: 5px;
|
|
5
|
+
font-size: 14px;
|
|
6
|
+
|
|
7
|
+
p {
|
|
8
|
+
margin-bottom: 5px;
|
|
9
|
+
padding: 8px 24px;
|
|
10
|
+
|
|
11
|
+
&.notice {
|
|
12
|
+
color: #4f8a10;
|
|
13
|
+
border: 1px solid #629827;
|
|
14
|
+
background: #dff2bf;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.alert {
|
|
18
|
+
color: #d8000c;
|
|
19
|
+
border: 1px solid #d8000c;
|
|
20
|
+
background: #ffbaba;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
|
|
2
|
+
form {
|
|
3
|
+
margin: auto;
|
|
4
|
+
width: 550px;
|
|
5
|
+
|
|
6
|
+
a {
|
|
7
|
+
font-size: 13px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
fieldset {
|
|
11
|
+
border: none;
|
|
12
|
+
|
|
13
|
+
legend {
|
|
14
|
+
float: left;
|
|
15
|
+
width: 100%;
|
|
16
|
+
text-align: right;
|
|
17
|
+
font-size: 14px;
|
|
18
|
+
padding-bottom: 6px;
|
|
19
|
+
margin: 15px 0 18px 0;
|
|
20
|
+
border-bottom: 1px dashed #d1d2d1;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
li {
|
|
25
|
+
width: 100%;
|
|
26
|
+
display: inline-block;
|
|
27
|
+
margin-bottom: 20px;
|
|
28
|
+
|
|
29
|
+
&.actions {
|
|
30
|
+
width: 100%;
|
|
31
|
+
margin-top: 18px;
|
|
32
|
+
text-align: right;
|
|
33
|
+
|
|
34
|
+
button {
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
border: none;
|
|
37
|
+
padding: 10px 22px;
|
|
38
|
+
background: #237b42;
|
|
39
|
+
color: #fff;
|
|
40
|
+
font-size: 12px;
|
|
41
|
+
text-transform: uppercase;
|
|
42
|
+
|
|
43
|
+
&:hover {
|
|
44
|
+
background: #4d4c4c;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
label {
|
|
50
|
+
display: block;
|
|
51
|
+
font-size: 11px;
|
|
52
|
+
color: #908c8c;
|
|
53
|
+
padding-left: 12px;
|
|
54
|
+
margin-bottom: 5px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
input[type='text'],
|
|
58
|
+
input[type='password'],
|
|
59
|
+
textarea {
|
|
60
|
+
border: 1px solid #e8e8e8;
|
|
61
|
+
width: 512px;
|
|
62
|
+
padding: 9px 18px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
input[type='text'],
|
|
66
|
+
input[type='password'] {
|
|
67
|
+
height: 22px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
input[type='checkbox'] {
|
|
71
|
+
float: left;
|
|
72
|
+
margin-right: 8px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
textarea {
|
|
76
|
+
resize: none;
|
|
77
|
+
height: 350px;
|
|
78
|
+
overflow: auto;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
img {
|
|
82
|
+
border: 1px solid #e8e8e8;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
#navigation {
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 48px;
|
|
5
|
+
background: #4d4c4c;
|
|
6
|
+
|
|
7
|
+
* {
|
|
8
|
+
color: #fff;
|
|
9
|
+
font-size: 12px;
|
|
10
|
+
line-height: 48px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
li {
|
|
14
|
+
float: left;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
a {
|
|
18
|
+
line-height: 48px;
|
|
19
|
+
padding: 0 15px;
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
background: #444;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
#menu {
|
|
27
|
+
float: left;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
#session {
|
|
31
|
+
float: right;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
|
|
2
|
+
#options {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
width: 100%;
|
|
5
|
+
margin: 0 0 27px 0;
|
|
6
|
+
|
|
7
|
+
#search {
|
|
8
|
+
float: left;
|
|
9
|
+
|
|
10
|
+
input {
|
|
11
|
+
border: 1px solid #e8e8e8;
|
|
12
|
+
float: left;
|
|
13
|
+
width: 156px;
|
|
14
|
+
line-height: 30px;
|
|
15
|
+
height: 30px;
|
|
16
|
+
padding: 0 36px 0 15px;
|
|
17
|
+
color: #adaeae;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
a {
|
|
22
|
+
float: right;
|
|
23
|
+
margin-top: 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
.pager {
|
|
3
|
+
margin-top: 24px;
|
|
4
|
+
width: 100%;
|
|
5
|
+
text-align: right;
|
|
6
|
+
|
|
7
|
+
* {
|
|
8
|
+
font-size: 12px;
|
|
9
|
+
color: #908c8c;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
a:hover,
|
|
13
|
+
.current {
|
|
14
|
+
color: #237b42;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.page {
|
|
18
|
+
margin: 0 3px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.previous,
|
|
22
|
+
.first {
|
|
23
|
+
margin-right: 3px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.previous {
|
|
27
|
+
margin-right: 6px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.next,
|
|
31
|
+
.last {
|
|
32
|
+
margin-left: 3px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.next {
|
|
36
|
+
margin-left: 6px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
table {
|
|
3
|
+
border-collapse: collapse;
|
|
4
|
+
width: 100%;
|
|
5
|
+
|
|
6
|
+
th,
|
|
7
|
+
td {
|
|
8
|
+
text-align: left;
|
|
9
|
+
color: #787878;
|
|
10
|
+
font-size: 12px;
|
|
11
|
+
padding: 0 15px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
th {
|
|
15
|
+
line-height: 32px;
|
|
16
|
+
height: 32px;
|
|
17
|
+
border: 1px solid #d2d3d3;
|
|
18
|
+
background: #e7e9e8;
|
|
19
|
+
font-weight: normal;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
td {
|
|
23
|
+
line-height: 50px;
|
|
24
|
+
height: 50px;
|
|
25
|
+
border-bottom: 1px solid #eee;
|
|
26
|
+
|
|
27
|
+
img {
|
|
28
|
+
display: block;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&.actions {
|
|
32
|
+
width: 120px;
|
|
33
|
+
|
|
34
|
+
a {
|
|
35
|
+
margin-right: 5px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|