tkh_admin_panel 0.1 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +7 -0
- data/README.md +6 -4
- data/app/assets/javascripts/custom.js.coffee +1 -1
- data/app/assets/stylesheets/admin.css.scss +1 -168
- data/app/views/layouts/admin.html.erb +2 -2
- data/app/views/shared/_language_switcher.html.erb +1 -1
- data/lib/tkh_admin_panel/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,11 +4,13 @@ This is a Rails engine with an admin panel layout, assets and basic functionalit
|
|
4
4
|
|
5
5
|
Primarily developed for Ten Thousand Hours but we are happy to share if anybody finds it useful.
|
6
6
|
|
7
|
-
|
7
|
+
It's primarily developed to work in sync with the tkh_cms gem suite but over time more and more effort will be made to make it work in isolation.
|
8
|
+
|
9
|
+
Please note that this gem is still in its infancy. I'm just getting started.
|
8
10
|
|
9
11
|
## Installation
|
10
12
|
|
11
|
-
This gem was created
|
13
|
+
This gem was created when Rails 3.2.6 was the latest release and there is a railties dependency of "~> 3.2". Add this line to your application's Gemfile:
|
12
14
|
|
13
15
|
gem 'tkh_admin_panel', '~> 0.0'
|
14
16
|
|
@@ -31,7 +33,7 @@ Update the gem:
|
|
31
33
|
|
32
34
|
$ bundle update tkh_admin_panel
|
33
35
|
|
34
|
-
Update locale files.
|
36
|
+
Update locale files.
|
35
37
|
|
36
38
|
$ rake tkh_admin_panel:update
|
37
39
|
|
@@ -47,7 +49,7 @@ You need an authentication system with the current_user helper method
|
|
47
49
|
|
48
50
|
## Usage
|
49
51
|
|
50
|
-
|
52
|
+
Add this to your controller's relevant methods:
|
51
53
|
|
52
54
|
switch_to_admin_layout
|
53
55
|
|
@@ -1,38 +1,5 @@
|
|
1
1
|
@import 'bootstrap_and_overrides.css.scss';
|
2
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
3
|
footer {
|
37
4
|
margin: 2em 1em .5em;
|
38
5
|
text-align: center;
|
@@ -45,138 +12,4 @@ input, textarea {
|
|
45
12
|
.login-info {
|
46
13
|
margin: 1em;
|
47
14
|
text-align: left;
|
48
|
-
}
|
49
|
-
//
|
50
|
-
//.navbar { margin-bottom: 0; }
|
51
|
-
//
|
52
|
-
//.navbar, .navbar-inner {
|
53
|
-
// border-radius: 0;
|
54
|
-
// .brand {
|
55
|
-
// font-weight: bold;
|
56
|
-
// text-decoration: none;
|
57
|
-
// }
|
58
|
-
//}
|
59
|
-
//
|
60
|
-
//.navbar .nav li > a { text-decoration: underline; }
|
61
|
-
//
|
62
|
-
//.navbar .nav .active > a {
|
63
|
-
// color: #fff;
|
64
|
-
// font-weight: bold;
|
65
|
-
// text-decoration: none;
|
66
|
-
//}
|
67
|
-
//
|
68
|
-
//
|
69
|
-
//#main-content {
|
70
|
-
// padding: 1.75em 0;
|
71
|
-
// img {
|
72
|
-
// margin: 0 0 5px 3px;
|
73
|
-
// width: 40%;
|
74
|
-
// }
|
75
|
-
//}
|
76
|
-
//
|
77
|
-
//footer {
|
78
|
-
// background-color: $purple;
|
79
|
-
// color: #fff;
|
80
|
-
// margin: 0;
|
81
|
-
// padding: .33em 0 .15em;
|
82
|
-
// width: 100%;
|
83
|
-
// a {
|
84
|
-
// color: #fff;
|
85
|
-
// }
|
86
|
-
// a:hover { color: #fff; font-weight: bold; }
|
87
|
-
//}
|
88
|
-
//
|
89
|
-
//caption { // table titles
|
90
|
-
// color: $blue;
|
91
|
-
// font-size: 1.7em;
|
92
|
-
// font-weight: bold;
|
93
|
-
// padding: .2em 1em;
|
94
|
-
//}
|
95
|
-
//
|
96
|
-
//th {
|
97
|
-
// background-color: $red;
|
98
|
-
// color: $white;
|
99
|
-
//}
|
100
|
-
//
|
101
|
-
//@media (max-width: 480px) {
|
102
|
-
// #big-header {
|
103
|
-
// display: none;
|
104
|
-
// }
|
105
|
-
//}
|
106
|
-
//@media (max-width: 767px) {
|
107
|
-
// #big-header {
|
108
|
-
// margin: 0;
|
109
|
-
// padding: 0;
|
110
|
-
// img {
|
111
|
-
// width: 100%;
|
112
|
-
// }
|
113
|
-
// }
|
114
|
-
//}
|
115
|
-
//
|
116
|
-
//@media (min-width: 768px) {
|
117
|
-
// html {
|
118
|
-
// background-color: #dcd3e5;
|
119
|
-
// }
|
120
|
-
//
|
121
|
-
// body {
|
122
|
-
// margin: 0 auto 2em;
|
123
|
-
// border-radius: 0 0 10px 10px;
|
124
|
-
// width: 95%;
|
125
|
-
// @include box-shadow(5px 8px 18px 3px rgba(0,0,0,.25));
|
126
|
-
// }
|
127
|
-
//
|
128
|
-
// #big-header {
|
129
|
-
// margin: 0;
|
130
|
-
// padding: 0;
|
131
|
-
// img {
|
132
|
-
// width: 100%;
|
133
|
-
// }
|
134
|
-
// }
|
135
|
-
//
|
136
|
-
// #main-content {
|
137
|
-
// background: image_url('main/swooshes-big.jpg') top right no-repeat;
|
138
|
-
// img {
|
139
|
-
// margin: 0 0 6px 4px;
|
140
|
-
// width: 35%;
|
141
|
-
// }
|
142
|
-
// }
|
143
|
-
//
|
144
|
-
// footer { border-radius: 0 0 10px 10px; }
|
145
|
-
//
|
146
|
-
// .table-narrow {
|
147
|
-
// margin: .2em auto 1em;
|
148
|
-
// width: 50%;
|
149
|
-
// }
|
150
|
-
//
|
151
|
-
//}
|
152
|
-
//
|
153
|
-
//@media (min-width: 768px) and (max-width: 979px) {
|
154
|
-
// #main-content {
|
155
|
-
// background: image_url('main/swooshes.jpg') top right no-repeat;
|
156
|
-
// }
|
157
|
-
//}
|
158
|
-
//
|
159
|
-
//@media (min-width: 980px) {
|
160
|
-
// body { width: 84%; }
|
161
|
-
// p, ul, ol { font-size: 1.05em; }
|
162
|
-
// #main-content {
|
163
|
-
// background: image_url('main/swooshes-big.jpg') top right no-repeat;
|
164
|
-
// img {
|
165
|
-
// margin: 0 0 8px 6px;
|
166
|
-
// width: 30%;
|
167
|
-
// }
|
168
|
-
// }
|
169
|
-
//}
|
170
|
-
//
|
171
|
-
//@media (min-width: 1200px) {
|
172
|
-
// body { width: 78%; }
|
173
|
-
// p, ul, ol { font-size: 1.1em; }
|
174
|
-
// #main-content img {
|
175
|
-
// margin: 0 0 9px 7px;
|
176
|
-
// width: 21%;
|
177
|
-
// }
|
178
|
-
//}
|
179
|
-
//
|
180
|
-
//
|
181
|
-
//// generic classes
|
182
|
-
//.text-right { text-align: right; }
|
15
|
+
}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
6
|
<title>
|
7
7
|
<% if defined?(APP_SETTINGS) && APP_SETTINGS['site_name'] %>
|
8
|
-
<%= t("admin_panel_for") + APP_SETTINGS['site_name'] %>
|
8
|
+
<%= t("admin_panel_for") + ' ' + APP_SETTINGS['site_name'] %>
|
9
9
|
<% else %>
|
10
10
|
<%= t 'admin_panel' %>
|
11
11
|
<% end %>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<%= render 'shared/login_info' %>
|
33
33
|
<h1>
|
34
34
|
<% if defined?(APP_SETTINGS) && APP_SETTINGS['site_name'] %>
|
35
|
-
<%= (t("admin_panel_for") + link_to(APP_SETTINGS['site_name'], root_path)).html_safe %>
|
35
|
+
<%= (t("admin_panel_for") + ' ' + link_to(APP_SETTINGS['site_name'], root_path)).html_safe %>
|
36
36
|
<% else %>
|
37
37
|
<%= t 'admin_panel' %>
|
38
38
|
<% end %>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
</a>
|
17
17
|
<ul class="dropdown-menu">
|
18
18
|
<% for loc in I18n.available_locales %>
|
19
|
-
<%= link_to full_language_name(loc), :locale => loc unless loc.to_s == I18n.locale.to_s %>
|
19
|
+
<%= content_tag( :li, link_to( full_language_name(loc), :locale => loc )) unless loc.to_s == I18n.locale.to_s %>
|
20
20
|
<% end %>
|
21
21
|
</ul>
|
22
22
|
</div>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tkh_admin_panel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|