refinerycms-admin_restyle 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d3f97a3cc22c4b474b300f90786cc1b5e5073e79
4
+ data.tar.gz: cc424249299ff83630f264ec48265f2d8bd0583b
5
+ SHA512:
6
+ metadata.gz: e39103b22753493405110f6f25ac30dd3f271f514edcf2a34d8eb1c6ba1de8dac6765258c43e4b1ebd8b3c5e795440c95ec708a766bba5393ea29a4899d5e208
7
+ data.tar.gz: 6638cd03cab0ea84c6250bf3568a48ef40d971ca5159e5b96a44aa67a9e2726600f450f34d89e2b8fda7d5d0160b1eaa2a525191fa4ef7b44f068072a1232399
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in refinerycms-admin_restyle.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Anton Ivanopoulos
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.
@@ -0,0 +1,28 @@
1
+ # RefineryCMS::AdminRestyle
2
+
3
+ This gem will override the default admin layouts and css to provide an interface I've found a little more usable for client work.
4
+
5
+ - Plugins will now appear down the left side of the scren, as opposed to tabs along the top of the content area.
6
+ - The content area will now scale with the screen.
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ gem 'refinerycms-admin_restyle'
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install refinerycms-admin_restyle
21
+
22
+ ## Contributing
23
+
24
+ 1. Fork it
25
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
26
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
27
+ 4. Push to the branch (`git push origin my-new-feature`)
28
+ 5. Create new Pull Request
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,17 @@
1
+ <!DOCTYPE html>
2
+ <%= render '/refinery/html_tag' %>
3
+ <% content_for :meta, "<meta refinerycms='#{Refinery.version}' />".html_safe %>
4
+ <%= render 'refinery/admin/head' %>
5
+ <body class="<%= action_name %> <%= I18n.locale %>">
6
+ <div id='tooltip_container'></div>
7
+ <%= render '/refinery/site_bar' %>
8
+
9
+ <div id="navigation">
10
+ <%= render 'refinery/admin/menu' %>
11
+ </div>
12
+
13
+ <div id="content">
14
+ <%= yield %>
15
+ </div>
16
+ </body>
17
+ </html>
@@ -0,0 +1,18 @@
1
+ <ul>
2
+ <%- navigation_menu.each do |key, item| %>
3
+ <%- if item.kind_of? Array %>
4
+ <li class="accordion">
5
+ <a class="expanded" href="javascript:void(0);"><%= key.to_s.humanize %></a>
6
+ <ul>
7
+ <%- item.each do |plugin| %>
8
+ <li>
9
+ <%= link_to plugin.title, refinery.url_for(plugin.url), :class => ("active" if plugin.highlighted?(params)), :id => "plugin_#{plugin.name}" %>
10
+ </li>
11
+ <% end %>
12
+ <%- else %>
13
+ <li>
14
+ <%= link_to item.title, refinery.url_for(item.url), :class => ("active" if item.highlighted?(params)), :id => "plugin_#{item.name}" if !item.blank? %>
15
+ </li>
16
+ <% end %>
17
+ <% end %>
18
+ </ul>
@@ -0,0 +1,3 @@
1
+ require "refinerycms/admin_restyle/version"
2
+ require 'refinerycms/admin_restyle/engine'
3
+ require 'refinerycms/admin_restyle/railtie' if defined? Rails
@@ -0,0 +1,34 @@
1
+ module Refinerycms
2
+ module AdminRestyle
3
+ module AdminViewHelpers
4
+
5
+ def current_plugin path
6
+ path == request.path
7
+ end
8
+
9
+ def navigation_menu
10
+ plugins = ::Refinery::Plugins.active.in_menu
11
+
12
+ menu = {
13
+ dashboard: '',
14
+ content: [],
15
+ users: ''
16
+ }
17
+
18
+ plugins.each do |plugin|
19
+ case plugin.name
20
+ when 'refinery_dashboard'
21
+ menu[:dashboard] = plugin
22
+ when 'refinery_users'
23
+ menu[:users] = plugin
24
+ else
25
+ menu[:content] << plugin
26
+ end
27
+ end
28
+
29
+ menu
30
+ end
31
+
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,6 @@
1
+ module Refinerycms
2
+ module AdminRestyle
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,11 @@
1
+ require 'refinerycms/admin_restyle/admin_view_helpers'
2
+
3
+ module Refinerycms
4
+ module AdminRestyle
5
+ class Railtie < Rails::Railtie
6
+ initializer "refinerycms.admin_restyle.admin_view_helpers" do |app|
7
+ ActionView::Base.send :include, AdminViewHelpers
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ module Refinerycms
2
+ module AdminRestyle
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
@@ -0,0 +1,23 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'refinerycms/admin_restyle/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "refinerycms-admin_restyle"
8
+ spec.version = Refinerycms::AdminRestyle::VERSION
9
+ spec.authors = ["Anton Ivanopoulos"]
10
+ spec.email = ["a.ivanopoulos@gmail.com"]
11
+ spec.description = "Admin layout redesign for the Ruby on Rails CMS, Refinery CMS."
12
+ spec.summary = "Admin layout redesign for the Ruby on Rails CMS, Refinery CMS."
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+ end
@@ -0,0 +1,7 @@
1
+ $ ->
2
+ $('#navigation .accordion > a').click () ->
3
+ target = $(this)
4
+
5
+ target.toggleClass('expanded')
6
+ target.toggleClass('collapsed')
7
+ target.next('ul').toggle()
@@ -0,0 +1,336 @@
1
+ * {
2
+ margin: 0;
3
+ padding: 0;
4
+ }
5
+
6
+ html {
7
+ height: 100%;
8
+ }
9
+
10
+ body {
11
+ background-image: url(bg_stripe.gif);
12
+ background-repeat: repeat;
13
+ height: 100%;
14
+ font-family: Arial, Helvetica, sans-serif;
15
+ }
16
+
17
+ h1 {
18
+ font-size: 1.5em;
19
+ margin: 0 0 1em 0;
20
+ }
21
+
22
+ h2 {
23
+ font-size: 1.25em;
24
+ margin: 0 0 1em 0;
25
+ }
26
+
27
+ h3 {
28
+ font-size: 1em;
29
+ margin: 0 0 1em 0;
30
+ }
31
+
32
+ p {
33
+ font-size: 0.8em;
34
+ margin: 0 0 1em 0;
35
+ }
36
+
37
+ p {
38
+ font-size: 14px !important;
39
+ line-height: 18px;
40
+ }
41
+
42
+ #header {
43
+ background-color: #22a7f2;
44
+ position: relative;
45
+ z-index: 1;
46
+ width: 100%;
47
+ display: block;
48
+ height: 50px;
49
+ }
50
+
51
+ .view_website {
52
+ float: left;
53
+ }
54
+
55
+ .logo {
56
+ width: 200px;
57
+ background-color: #FCF;
58
+ margin: 0 auto;
59
+ display: block;
60
+ }
61
+
62
+ .user_links {
63
+ float: right;
64
+ clear: both;
65
+ }
66
+
67
+ #navigation {
68
+ background-color: #303030;
69
+ width: 215px;
70
+ min-width: 215px;
71
+ height: 100%;
72
+ float: left;
73
+ position: absolute;
74
+ z-index: 0;
75
+ top: 0;
76
+ left: 0;
77
+ padding-top: 50px;
78
+ box-sizing: border-box;
79
+ -webkit-box-sizing: border-box;
80
+ -moz-box-sizing: border-box;
81
+ color: #FFF;
82
+ }
83
+
84
+ #navigation a {
85
+ color: #afafaf;
86
+ display: block;
87
+ text-decoration: none;
88
+ }
89
+
90
+ #navigation a:hover {
91
+ color: #22a7f2;
92
+ }
93
+
94
+ #navigation a.expanded {
95
+ background-image: url(icons_collapseexpand.gif);
96
+ background-repeat: no-repeat;
97
+ background-position: right -12px;
98
+ }
99
+
100
+ #navigation a.collapsed {
101
+ background-image: url(icons_collapseexpand.gif);
102
+ background-repeat: no-repeat;
103
+ background-position: right 4px;
104
+ }
105
+
106
+ #navigation ul {
107
+ position: relative;
108
+ margin: 30px 0 0 0;
109
+ }
110
+
111
+ #navigation ul ul {
112
+ margin: 0;
113
+ }
114
+
115
+ #navigation li {
116
+ text-transform: uppercase;
117
+ display: block;
118
+ font-weight: bold;
119
+ padding: 10px;
120
+ border-top: 1px solid #434343;
121
+ border-bottom: 1px solid #222222;
122
+ list-style: none;
123
+ }
124
+
125
+ #navigation li:first-child {
126
+ border-top: none;
127
+ }
128
+
129
+ #navigation li:last-child {
130
+ border-bottom: none;
131
+ }
132
+
133
+ #navigation li li {
134
+ text-transform: none;
135
+ border: none;
136
+ font-weight: normal;
137
+ padding: 0;
138
+ }
139
+
140
+ #navigation ul li li a {
141
+ color: #FFF;
142
+ padding: 5px 20px 5px 10px;
143
+ }
144
+
145
+ #content {
146
+ float: left;
147
+ background-color: #FFF;
148
+ width: 850px;
149
+ min-height: 300px;
150
+ margin: 75px 0 0 250px;
151
+ padding: 20px;
152
+ -webkit-border-radius: 4px;
153
+ -moz-border-radius: 4px;
154
+ border-radius: 4px;
155
+ }
156
+
157
+ #records {
158
+ float: left;
159
+ width: 540px;
160
+ margin: 0 20px 0 0;
161
+ }
162
+
163
+ #actions {
164
+ float: left;
165
+ width: 275px;
166
+ }
167
+
168
+ #actions li {
169
+ list-style: none;
170
+ }
171
+
172
+ #actions li a {
173
+ display: block;
174
+ clear: both;
175
+ background-color: #cfcfcf;
176
+ border: 1px solid #b0b0b0;
177
+
178
+ margin: 0 0 10px 0;
179
+ text-decoration: none;
180
+ color: #000;
181
+ }
182
+
183
+ #actions li a:hover {
184
+ background-color: #dedede;
185
+ }
186
+
187
+ #actions a.add {
188
+ background-color: #dbedff;
189
+ border: 1px solid #65c3f7;
190
+ }
191
+
192
+ table {
193
+ margin: 20px 0 20px;
194
+ }
195
+
196
+ table.record-table {
197
+ width: 100%;
198
+ }
199
+
200
+ #content table.record-table a {
201
+ border-bottom: none;
202
+ }
203
+
204
+ tr:nth-child(odd) {
205
+ background-color:#fff;
206
+ }
207
+
208
+ tr:nth-child(even) {
209
+ background-color:#eaeaea;
210
+ }
211
+
212
+ th {
213
+ text-align: left;
214
+ background-color:#eaeaea;
215
+ padding: 5px;
216
+ }
217
+
218
+ td {
219
+ text-align: left;
220
+ font-size: 0.8em;
221
+ padding: 5px;
222
+ }
223
+
224
+ form {
225
+ margin: 0 0 20px;
226
+ display: block;
227
+ }
228
+
229
+ input[type="text"], input[type="password"] {
230
+ border: 1px solid #b2b2b2;
231
+ padding: 3px;
232
+ margin: 0 10px 0 0;
233
+ width: 217px;
234
+ }
235
+
236
+ input[type="submit"] {
237
+ background-color: #25a7f0;
238
+ border: none;
239
+ -webkit-border-radius: 4px;
240
+ -moz-border-radius: 4px;
241
+ border-radius: 4px;
242
+ padding: 3px;
243
+ color: #FFF;
244
+ }
245
+
246
+ #actions form {
247
+ float: left;
248
+ width: 100%;
249
+ margin-bottom: 20px;
250
+ }
251
+
252
+ #actions select {
253
+ width: 215px;
254
+ float: left;
255
+ padding: 3px;
256
+ }
257
+
258
+ #actions input[type="submit"] {
259
+ float: right;
260
+ }
261
+
262
+ #site_bar {
263
+ z-index: 1;
264
+ position: relative;
265
+ }
266
+
267
+ #navigation a:hover {
268
+ border-bottom: none;
269
+ }
270
+
271
+ #navigation a.active {
272
+ color: #22a7f2;
273
+ }
274
+
275
+ #actions ul#current_locale {
276
+ display: none;
277
+ }
278
+
279
+ iframe #content {
280
+ width: auto;
281
+ height: auto;
282
+ }
283
+
284
+ body.login #content {
285
+ width: 220px;
286
+ margin: 75px auto;
287
+ min-height: 220px;
288
+ }
289
+
290
+ body.login header {
291
+ display: none;
292
+ }
293
+
294
+ body.login #page_container div.forgot_password {
295
+ float: left;
296
+ }
297
+
298
+ body.login .field.forgot_password {
299
+ text-align: left;
300
+ }
301
+
302
+ body.login #page_container {
303
+ width: 220px;
304
+ padding: 0;
305
+ }
306
+
307
+ #content > h1 {
308
+ text-align: left;
309
+ }
310
+
311
+ #actions li a.active {
312
+ background-color: #aee2ff;
313
+ }
314
+
315
+ .ui-dialog .ui-dialog-titlebar-close {
316
+ width: 20px;
317
+ }
318
+
319
+ .ui-dialog .ui-dialog-titlebar-close span {
320
+ background-position: center;
321
+ }
322
+
323
+ .dialog #content {
324
+ margin: 0;
325
+ min-height: 0;
326
+ padding: 0;
327
+ width: auto;
328
+ }
329
+
330
+ .table-actions {
331
+ width: 60px;
332
+ }
333
+
334
+ .chosen-container {
335
+ min-width: 380px !important;
336
+ }
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: refinerycms-admin_restyle
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Anton Ivanopoulos
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-03-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: Admin layout redesign for the Ruby on Rails CMS, Refinery CMS.
42
+ email:
43
+ - a.ivanopoulos@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - .gitignore
49
+ - Gemfile
50
+ - LICENSE.txt
51
+ - README.md
52
+ - Rakefile
53
+ - app/views/layouts/refinery/admin.html.erb
54
+ - app/views/refinery/admin/_menu.html.erb
55
+ - lib/refinerycms/admin_restyle.rb
56
+ - lib/refinerycms/admin_restyle/admin_view_helpers.rb
57
+ - lib/refinerycms/admin_restyle/engine.rb
58
+ - lib/refinerycms/admin_restyle/railtie.rb
59
+ - lib/refinerycms/admin_restyle/version.rb
60
+ - refinerycms-admin_restyle.gemspec
61
+ - vendor/assets/images/refinery/bg_stripe.gif
62
+ - vendor/assets/images/refinery/icons_collapseexpand.gif
63
+ - vendor/assets/javascripts/refinery/menu.js.coffee
64
+ - vendor/assets/stylesheets/refinery/admin.css
65
+ homepage: ''
66
+ licenses:
67
+ - MIT
68
+ metadata: {}
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ requirements: []
84
+ rubyforge_project:
85
+ rubygems_version: 2.0.3
86
+ signing_key:
87
+ specification_version: 4
88
+ summary: Admin layout redesign for the Ruby on Rails CMS, Refinery CMS.
89
+ test_files: []