Merge remote-tracking branch 'origin/feature/redesign' into feature/redesign

This commit is contained in:
Matias Griese
2014-10-07 12:13:40 +03:00
8 changed files with 53 additions and 33 deletions

View File

@@ -125,6 +125,9 @@ class AdminPlugin extends Plugin
// Set original route for the home page.
$home = '/' . trim($this->config->get('system.home.alias'), '/');
// set the default if not set before
$this->session->expert = $this->session->expert ?: true;
// set session variable if it's passed via the url
if ($this->uri->param('mode') == 'expert') {
$this->session->expert = true;

View File

@@ -470,6 +470,9 @@ form p {
padding: 0 3rem; }
form pre {
padding: 1.5rem 3rem; }
form .note {
font-family: "Lato", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif;
color: #DA4B46; }
form .form-field {
margin-bottom: 1rem;
padding-left: 3rem; }
@@ -636,11 +639,11 @@ form .checkboxes {
padding: 10px;
height: 130px; }
ul#ordering {
.form-order-wrapper ul#ordering {
list-style: none;
margin: 0;
padding: 0; }
ul#ordering li {
.form-order-wrapper ul#ordering li {
padding: 0.2rem 1rem;
border-radius: 4px;
border: 1px solid #d4d4d4;
@@ -649,11 +652,11 @@ ul#ordering {
margin: 3px 0;
position: relative;
font-family: "Lato", "Helvetica", "Tahoma", "Geneva", "Arial", sans-serif; }
ul#ordering li.drag-handle {
.form-order-wrapper ul#ordering li.drag-handle {
cursor: move;
background: white;
color: #5b6266; }
ul#ordering li.drag-handle::after {
.form-order-wrapper ul#ordering li.drag-handle::after {
content: '\f0c9';
font-family: FontAwesome;
position: absolute;

File diff suppressed because one or more lines are too long

View File

@@ -55,6 +55,11 @@ form {
padding: 1.5rem 3rem;
}
.note {
font-family: $font-family-default;
color: $notice-bg;
}
.form-field {
margin-bottom: 1rem;
padding-left: $padding-default;
@@ -346,32 +351,35 @@ form {
}
// Sortables
ul#ordering {
list-style: none;
margin: 0;
padding: 0;
.form-order-wrapper {
ul#ordering {
li {
padding: 0.2rem 1rem;
border-radius: $form-border-radius;
border: 1px solid $form-border;
background: lighten($content-bg, 4%);
color: lighten($content-fg,10%);
margin: 3px 0;
position: relative;
font-family: $font-family-default;
list-style: none;
margin: 0;
padding: 0;
&.drag-handle {
cursor: move;
background: lighten($content-bg, 7%);
color: darken($content-fg,10%);
&::after {
content: '\f0c9';
font-family: FontAwesome;
position: absolute;
right: 10px;
li {
padding: 0.2rem 1rem;
border-radius: $form-border-radius;
border: 1px solid $form-border;
background: lighten($content-bg, 4%);
color: lighten($content-fg,10%);
margin: 3px 0;
position: relative;
font-family: $font-family-default;
&.drag-handle {
cursor: move;
background: lighten($content-bg, 7%);
color: darken($content-fg,10%);
&::after {
content: '\f0c9';
font-family: FontAwesome;
position: absolute;
right: 10px;
}
}
}
}
}

View File

@@ -16,6 +16,12 @@
<div class="form-data block size-2-3 pure-u-2-3">
<div class="form-order-wrapper {{ field.size }}">
<input type="hidden" data-order name="{{ (scope ~ field.name)|fieldName }}" value="{{ value }}" />
{% if data.parent.header.content.items %}
<span class="note">Parent setting order, ordering disabled</span>
{% elseif not data.visible %}
<span class="note">Page is not visible, ordering disabled</span>
{% endif %}
<ul id="ordering" class="{{ field.classes }}">
{% for page in siblings %}
<li class="{% if page.order == value %}drag-handle{% else %}ignore{% endif %}" data-id="{{ page.slug }}">{{ page.title() }}</li>

View File

@@ -38,7 +38,7 @@
{% endblock %}
{% macro loop(page, base_url, depth, warn) %}
{% for p in page.children %}
{% for p in page.children(0) %}
{% set description = (not p.page ? 'Folder &bull; ' : 'Page &bull; ') ~
(p.modular ? 'Modular &bull; ' : '') ~
(p.routable ? 'Routable &bull; ' : 'Not Routable &bull; ') ~
@@ -47,7 +47,7 @@
<li class="page-item">
<div class="row">
<span data-hint="{{ description|trim(' &bull; ') }}" class="hint--bottom">
<i class="page-icon fa fa-fw fa-circle-o {{ p.children.count > 0 ? 'children-open' : ''}} {{ p.modular ? 'modular' : (not p.routable ? 'not-routable' : (not p.visible ? 'not-visible' : (not p.page ? 'folder' : ''))) }}"></i>
<i class="page-icon fa fa-fw fa-circle-o {{ p.children(0).count > 0 ? 'children-open' : ''}} {{ p.modular ? 'modular' : (not p.routable ? 'not-routable' : (not p.visible ? 'not-visible' : (not p.page ? 'folder' : ''))) }}"></i>
</span>
<a href="{{ base_url }}/pages/{{ p.route|trim('/') }}" class="page-edit">{{ p.menu }}</a>
<span class="page-home">{{ p.home ? '<i class="fa fa-home"></i>' }}</span>
@@ -60,7 +60,7 @@
</span>
<p class="page-route">{{ p.route }}</p>
</div>
{% if p.children.count > 0 and not p.modular() %}
{% if p.children(0).count > 0 and not p.modular() %}
<ul class="depth-{{ depth + 1 }}">
{{ _self.loop(p, base_url, depth + 1, warn) }}

View File

@@ -67,7 +67,7 @@
{% if plugin.description %}
<tr>
<td>Description:</td>
<td>{{ plugin.description }}</td>
<td>{{ plugin.description_html }}</td>
</tr>
{% endif %}
</table>

View File

@@ -67,7 +67,7 @@
{% if theme.description %}
<tr>
<td>Description:</td>
<td>{{ theme.description }}</td>
<td>{{ theme.description_html }}</td>
</tr>
{% endif %}
</table>