caboose-cms 0.9.104 → 0.9.105
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/caboose/admin_crumbtrail.css.scss +141 -0
- data/app/assets/stylesheets/caboose/admin_main.css +1 -1
- data/app/assets/stylesheets/caboose/cart.css.scss +0 -2
- data/app/helpers/caboose/pages_helper.rb +9 -8
- data/app/views/caboose/admin/index.html.erb +0 -4
- data/app/views/caboose/pages/_admin_header.html.erb +4 -3
- data/app/views/caboose/pages/admin_edit_general.html.erb +0 -11
- data/app/views/caboose/pages/admin_index.html.erb +47 -24
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c91b1719a19dc633fe8e4487e7f367d37667a76c
|
4
|
+
data.tar.gz: af5a3af76d2670ea0b1c8b629f8d0ab4ee014883
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c180fba3f360817124a39cece4cf35864314217adaf9699abb0399780bc58cef59f9ebe961c38269b5399ed3cae3aaffd6634c601beb7f8ed326508998ae25de
|
7
|
+
data.tar.gz: b9085bc03d7cecf21126fc5d3361b7cce059acbc93e8645ae6e7f9ff1522aad52d0c0cdc8a4768ca5914058076d8ea033346be925c424723d05730a3f9574439
|
@@ -121,6 +121,147 @@ $current-text-color: #ccc;
|
|
121
121
|
}
|
122
122
|
}
|
123
123
|
}
|
124
|
+
|
125
|
+
#page-list {
|
126
|
+
max-width: 640px;
|
127
|
+
margin: 0 auto;
|
128
|
+
padding: 0 20px 100px 20px;
|
129
|
+
.top {
|
130
|
+
margin-bottom: 20px;
|
131
|
+
p {
|
132
|
+
margin: 0;
|
133
|
+
float: left;
|
134
|
+
}
|
135
|
+
input {
|
136
|
+
border: 1px solid #c5c5c5;
|
137
|
+
border-radius: 8px;
|
138
|
+
padding: 8px 8px 8px 8px;
|
139
|
+
font-size: 14px;
|
140
|
+
height: 33px;
|
141
|
+
float: right;
|
142
|
+
}
|
143
|
+
}
|
144
|
+
ul {
|
145
|
+
list-style-type: none;
|
146
|
+
padding: 0;
|
147
|
+
margin: 0;
|
148
|
+
padding-left: 15px;
|
149
|
+
overflow: hidden;
|
150
|
+
position: relative;
|
151
|
+
&::before {
|
152
|
+
content: " ";
|
153
|
+
display: block;
|
154
|
+
position: absolute;
|
155
|
+
left: 0;
|
156
|
+
top: -21px;
|
157
|
+
width: 1px;
|
158
|
+
height: 100%;
|
159
|
+
background-color: #dadada;
|
160
|
+
}
|
161
|
+
li {
|
162
|
+
display: block;
|
163
|
+
position: relative;
|
164
|
+
a.icon3-settings {
|
165
|
+
position: absolute;
|
166
|
+
right: 4px;
|
167
|
+
top: 8px;
|
168
|
+
font-size: 0;
|
169
|
+
color: transparent;
|
170
|
+
width: 23px;
|
171
|
+
height: 23px;
|
172
|
+
display: inline-block;
|
173
|
+
text-decoration: none;
|
174
|
+
z-index: 2;
|
175
|
+
&::before {
|
176
|
+
font-size: 20px;
|
177
|
+
color: #2d2d2d;
|
178
|
+
}
|
179
|
+
&:hover {
|
180
|
+
&::before {
|
181
|
+
color: #1c1ccc;
|
182
|
+
}
|
183
|
+
}
|
184
|
+
}
|
185
|
+
a.content {
|
186
|
+
text-decoration: none;
|
187
|
+
color: #2d2d2d;
|
188
|
+
display: block;
|
189
|
+
margin-bottom: 5px;
|
190
|
+
border: 1px solid #c5c5c5;
|
191
|
+
border-radius: 8px;
|
192
|
+
padding: 8px 8px 8px 30px;
|
193
|
+
font-size: 14px;
|
194
|
+
&:hover {
|
195
|
+
background-color: #e7e7ff;
|
196
|
+
border-color: #a6a6af;
|
197
|
+
}
|
198
|
+
&::before {
|
199
|
+
content: "\70";
|
200
|
+
font-family: "caboose-admin-menu" !important;
|
201
|
+
font-size: 20px;
|
202
|
+
position: absolute;
|
203
|
+
left: 5px;
|
204
|
+
top: 7px;
|
205
|
+
}
|
206
|
+
}
|
207
|
+
span.disabled {
|
208
|
+
text-decoration: line-through;
|
209
|
+
color: #888888;
|
210
|
+
}
|
211
|
+
&::before {
|
212
|
+
content: " ";
|
213
|
+
display: block;
|
214
|
+
position: absolute;
|
215
|
+
right: 100%;
|
216
|
+
top: 17px;
|
217
|
+
width: 50px;
|
218
|
+
height: 1px;
|
219
|
+
background-color: #dadada;
|
220
|
+
}
|
221
|
+
&.hidden {
|
222
|
+
& > a.content, & > a.icon3-settings {
|
223
|
+
display: none;
|
224
|
+
}
|
225
|
+
&::before {
|
226
|
+
display: none;
|
227
|
+
}
|
228
|
+
}
|
229
|
+
&.shown {
|
230
|
+
& > a.content {
|
231
|
+
display: block;
|
232
|
+
}
|
233
|
+
& > a.icon3-settings {
|
234
|
+
display: inline-block;
|
235
|
+
}
|
236
|
+
}
|
237
|
+
&.small {
|
238
|
+
&::before {
|
239
|
+
top: 11px;
|
240
|
+
}
|
241
|
+
& > a.content {
|
242
|
+
font-size: 11px;
|
243
|
+
padding: 4px 8px 3px 8px;
|
244
|
+
background-color: #eaeaea;
|
245
|
+
&::before {
|
246
|
+
display: none;
|
247
|
+
}
|
248
|
+
}
|
249
|
+
& > a.icon3-settings {
|
250
|
+
display: none;
|
251
|
+
}
|
252
|
+
}
|
253
|
+
}
|
254
|
+
}
|
255
|
+
& > ul {
|
256
|
+
border-left: 0;
|
257
|
+
padding-left: 0;
|
258
|
+
&::before {
|
259
|
+
top: 10px;
|
260
|
+
height: calc(100% - 31px);
|
261
|
+
}
|
262
|
+
}
|
263
|
+
}
|
264
|
+
|
124
265
|
|
125
266
|
ul#crumbtrail {
|
126
267
|
position: absolute;
|
@@ -23,7 +23,6 @@
|
|
23
23
|
border-radius: 0;
|
24
24
|
border-width: 1px;
|
25
25
|
color: #565656;
|
26
|
-
font: 1em "Klinic Slab",serif;
|
27
26
|
padding: 8px 6px 6px;
|
28
27
|
text-align: right !important;
|
29
28
|
}
|
@@ -38,7 +37,6 @@
|
|
38
37
|
color: #fff;
|
39
38
|
cursor: pointer;
|
40
39
|
display: block-inline;
|
41
|
-
font: 20px/1em "Klinic Slab",serif;
|
42
40
|
margin-top: 20px;
|
43
41
|
padding: 8px 15px 6px 15px;
|
44
42
|
text-align: center;
|
@@ -1,23 +1,24 @@
|
|
1
1
|
module Caboose
|
2
2
|
module PagesHelper
|
3
3
|
def pages_list(page)
|
4
|
+
is_admin = @logged_in_user && @logged_in_user.is_allowed('all', 'all')
|
4
5
|
str = "<ul>"
|
5
|
-
str << pages_list_helper(page)
|
6
|
+
str << pages_list_helper(page, is_admin)
|
6
7
|
str << "</ul>"
|
7
8
|
return str
|
8
9
|
end
|
9
10
|
|
10
|
-
def pages_list_helper(page)
|
11
|
-
|
12
|
-
|
13
|
-
str = "<li><a href='/admin/pages/#{page.id}/content'>#{page.title}</a>"
|
11
|
+
def pages_list_helper(page, is_admin)
|
12
|
+
if is_admin || ((@logged_in_user && Page.permissible_actions(@logged_in_user, page.id).include?('edit')) ? true : false)
|
13
|
+
str = "<li><a class='content' href='/admin/pages/#{page.id}/content'>#{page.title}</a><a class='icon3-settings' href='/admin/pages/#{page.id}'>Settings</a>"
|
14
14
|
else
|
15
15
|
str = "<li><span class='disabled'>#{page.title}</span>"
|
16
16
|
end
|
17
|
-
|
17
|
+
pchildren = page.children.select([:id, :title])
|
18
|
+
if pchildren && pchildren.count > 0
|
18
19
|
str << "<ul>"
|
19
|
-
|
20
|
-
str << pages_list_helper(p)
|
20
|
+
pchildren.each do |p|
|
21
|
+
str << pages_list_helper(p, is_admin)
|
21
22
|
end
|
22
23
|
str << "</ul>"
|
23
24
|
end
|
@@ -15,10 +15,6 @@ width = 200
|
|
15
15
|
<p>For assistance, please email <a href="mailto:support@nine.is">support@nine.is</a>.</p>
|
16
16
|
</div>
|
17
17
|
<ul>
|
18
|
-
<!--
|
19
|
-
<li id='nav_item_logout'><a href='/logout'><span class='icon'></span><span class='text'>Logout</span></a>
|
20
|
-
<li id='nav_item_myaccount'><a href='/my-account'><span class='icon'></span><span class='text'>My Account</span></a>
|
21
|
-
-->
|
22
18
|
<% i = 0 %>
|
23
19
|
<% @nav.each do |item| %>
|
24
20
|
<% id = item['id'].nil? ? i.to_s : item['id'] %>
|
@@ -4,12 +4,13 @@
|
|
4
4
|
p.uri {
|
5
5
|
background: #efefef;
|
6
6
|
border: #999 1px solid;
|
7
|
-
padding: 10px;
|
7
|
+
padding: 9px 10px;
|
8
8
|
position: absolute;
|
9
|
-
top:
|
9
|
+
top: 9px;
|
10
10
|
left: 251px;
|
11
|
-
height:
|
11
|
+
height: 36px;
|
12
12
|
margin: 0;
|
13
|
+
font-size: 14px;
|
13
14
|
}
|
14
15
|
|
15
16
|
</style>
|
@@ -20,17 +20,6 @@
|
|
20
20
|
<% content_for :caboose_css do %>
|
21
21
|
<style type='text/css'>
|
22
22
|
|
23
|
-
p.uri {
|
24
|
-
background: #efefef;
|
25
|
-
border: #999 1px solid;
|
26
|
-
padding: 10px;
|
27
|
-
position: absolute;
|
28
|
-
top: 8px;
|
29
|
-
left: 251px;
|
30
|
-
height: 17px;
|
31
|
-
margin: 0;
|
32
|
-
}
|
33
|
-
|
34
23
|
div.field_with_explanation {
|
35
24
|
width: 420px;
|
36
25
|
background: #efefef;
|
@@ -1,35 +1,58 @@
|
|
1
1
|
<h1>Pages</h1>
|
2
2
|
|
3
3
|
<% if @domain %>
|
4
|
-
<% if @user.is_allowed('pages','add') %>
|
5
|
-
<p><a href='/admin/pages/new' class="caboose-btn-white">New Page</a></p>
|
6
|
-
<% end %>
|
7
4
|
<div id="page-list">
|
8
|
-
|
5
|
+
<div class="clearfix top">
|
6
|
+
<% if @user.is_allowed('pages','add') %>
|
7
|
+
<p><a href='/admin/pages/new' class="caboose-btn-white">New Page</a></p>
|
8
|
+
<% end %>
|
9
|
+
<input type="text" id="pages-filter" placeholder="Filter" />
|
10
|
+
</div>
|
11
|
+
<%= raw pages_list(@home_page) %>
|
12
|
+
<p id="no-results"></p>
|
9
13
|
</div>
|
10
14
|
<% else %>
|
11
15
|
<p>It doesn't look like this site is configured for the current domain. Please <a href='/admin/sites'>configure your sites</a>.</p>
|
12
|
-
<% end %>
|
16
|
+
<% end %>
|
13
17
|
|
14
18
|
<% content_for :caboose_css do %>
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
19
|
+
<%= stylesheet_link_tag 'caboose/admin_menu_icons' %>
|
20
|
+
<% end %>
|
21
|
+
|
22
|
+
<% content_for :caboose_js do %>
|
23
|
+
<script>
|
24
|
+
jQuery.expr[":"].Contains = jQuery.expr.createPseudo(function(arg) {
|
25
|
+
return function( elem ) {
|
26
|
+
return jQuery(elem).text().toUpperCase().indexOf(arg.toUpperCase()) >= 0;
|
27
|
+
};
|
28
|
+
});
|
29
|
+
function filter_pages() {
|
30
|
+
var results = 0;
|
31
|
+
var q = $("#pages-filter").val().toUpperCase();
|
32
|
+
if ( !q || q == '' || q == 'FILTER' ) {
|
33
|
+
$("#page-list li").removeClass('small').addClass('shown').removeClass('hidden');
|
34
|
+
$("#no-results").text('');
|
35
|
+
}
|
36
|
+
else {
|
37
|
+
$("#page-list li").addClass('hidden').removeClass('small').removeClass('shown');
|
38
|
+
$("#no-results").text('');
|
39
|
+
$.each($("a.content:Contains(" + q + ")"), function(k,v) {
|
40
|
+
$(v).closest('li').addClass('shown').removeClass('hidden');
|
41
|
+
$.each($(v).parents("li"), function(a,b) {
|
42
|
+
var t1 = $(b).children("a.content").text().toUpperCase();
|
43
|
+
if ( $(b).children("a.content").text().toUpperCase().indexOf(q) < 0 )
|
44
|
+
$(b).addClass('small');
|
45
|
+
$(b).addClass('shown').removeClass('hidden');
|
46
|
+
});
|
47
|
+
$(v).closest("li").removeClass('small');
|
48
|
+
results += 1;
|
49
|
+
});
|
50
|
+
if ( results == 0 )
|
51
|
+
$("#no-results").text("Sorry, no matching pages were found.");
|
52
|
+
}
|
33
53
|
}
|
34
|
-
|
54
|
+
$("#pages-filter").keyup(function() {
|
55
|
+
filter_pages();
|
56
|
+
});
|
57
|
+
</script>
|
35
58
|
<% end %>
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.105
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|