Fix #5 Blueprints for admin and other fixes

This commit is contained in:
Karol Orzeł 2015-10-09 10:52:00 +02:00
parent 92e9e3faa6
commit 29487b7196
9 changed files with 58 additions and 369 deletions

View File

@ -11,18 +11,3 @@ demo: http://demo.getgrav.org/deliver-skeleton/
keywords: deliver, theme, modern, fast, responsive, html5, css3
bugs: https://github.com/getgrav/grav-theme-deliver/issues
license: MIT
form:
validation: loose
fields:
dropdown.enabled:
type: toggle
label: Dropdown in navbar
highlight: 1
default: 0
options:
1: Enabled
0: Disabled
validate:
type: bool

View File

@ -1,70 +0,0 @@
media:
video:
mp4: video/mp4
mov: video/quicktime
m4v: video/x-m4v
swf: video/x-flv
image:
jpg: image/jpeg
jpeg: image/jpeg
png: image/png
gif: image/gif
file:
txt: text/plain
doc: application/msword
html: text/html
pdf: application/pdf
zip: application/zip
gz: application/gzip
form:
key: filename
fields:
upload:
type: upload
label: Upload
allow:
@media.*.keys
accept:
@media.*.values
filename:
type: text
label: Filename
type:
type: hidden
default: video
name:
type: unset
description:
type: textarea
label: Description
url:
type: unset
path:
type: unset
thumb:
type: unset
width:
type: text
label: Width
height:
type: text
label: Height
mime:
type: hidden
default: 'application/octet-stream'
modified:
type: unset

View File

@ -1,8 +1,19 @@
title: Blog
@extends: default
@extends:
type: default
context: blueprints://pages
child_type: item
title: Default
rules:
slug:
pattern: "[a-z][a-z0-9_\-]+"
min: 2
max: 80
form:
fields:
tabs:
@ -10,6 +21,12 @@ form:
active: 1
fields:
advanced:
fields:
overrides:
fields:
header.child_type:
default: item
blog:
type: tab
title: Blog List
@ -28,9 +45,8 @@ form:
default: 5
validate:
required: true
pattern: "[1-9][0-9]*"
validate:
type: int
min: 1
header.content.order.by:
type: select
@ -52,16 +68,9 @@ form:
header.content.pagination:
type: toggle
label: Order
label: Pagination
highlight: 1
default: 1
options:
1: Enabled
0: Disabled
header.pagination:
type: hidden
default: true
header.blog_url:
type: hidden
default: ''

View File

@ -1,157 +0,0 @@
title: Default
rules:
slug:
pattern: "[a-z][a-z0-9_\-]+"
min: 2
max: 80
form:
fields:
type:
type: hidden
label: Page Type
default: default
tabs:
type: tabs
active: 1
fields:
content:
type: tab
title: Content
fields:
route:
type: select
label: Parent
@data-options: '\Grav\Common\Page\Pages::parents'
@data-default: '\Grav\Plugin\admin::route'
options:
'': '- Root -'
order:
type: text
label: Ordering
validate:
type: int
min: 0
folder:
type: text
label: Folder
validate:
type: slug
# required: true
header.title:
type: text
label: Title
validate:
required: true
content:
type: textarea
label: Content
header.process:
type: checkboxes
label: Process
default: [markdown: true, twig: true]
options:
markdown: Markdown
twig: Twig
use: keys
meta:
type: tab
title: Meta
fields:
header.description:
type: textarea
label: Description
validate:
max: 120
header.keywords:
type: text
label: Keywords
validate:
max: 120
header.robots:
type: checkboxes
label: Robots
options:
noindex: No index
nofollow: No follow
use: keys
overrides:
type: tab
title: Overrides
fields:
header.menu:
type: text
label: Menu
header.slug:
type: text
label: Alias
validate:
rule: slug
header.cache_enable:
type: toggle
label: Caching
highlight: 1
options:
'': Global
1: Enabled
0: Disabled
validate:
type: bool
header.routable:
type: toggle
label: Access by URL
highlight: 1
default: ''
options:
'': Global
1: Enabled
0: Disabled
validate:
type: bool
header.child_type:
type: select
label: Default Child Type
default: default
@data-options: '\Grav\Common\Page\Pages::types'
header.order_by:
type: hidden
header.order_manual:
type: hidden
validate:
type: commalist
media:
type: tab
title: Media
fields:
files:
type: spacer
title: Files
media:
type: list
add: Add file
@import: 'medium/file'

View File

@ -1,2 +0,0 @@
title: Nopad
@extends: default

View File

@ -1,40 +0,0 @@
title: Item
@extends: default
form:
fields:
tabs:
fields:
blog:
type: tab
title: Blog Item
fields:
header.date:
type: datetime
label: Date
header.taxonomy.category:
type: text
label: Category
default: blog
header.taxonomy.tag:
type: checkboxes
label: Tags
options:
demo: demo
grav: grav
matias: matias
apple: apple
sample: sample
header.username:
type: text
label: Author
header.blog_url:
type: text
label: Blog URL
default:

View File

@ -1,27 +0,0 @@
title: Modular
@extends: default
form:
fields:
tabs:
type: tabs
active: 1
fields:
content:
fields:
header.modular:
type: select
label: 'Modular page'
default: 0
options:
0: 'False'
1: 'True'
validate:
type: bool
header.order_manual:
type: text
label: Manual ordering
validate:
type: commalist

View File

@ -1,7 +0,0 @@
title: Features
@extends: default
form:
fields:
tabs:
type: tabs

View File

@ -34,7 +34,7 @@
{% endfor %}
{% if config.plugins.pagination.enabled and collection.params.pagination %}
{% include 'pagination.html.twig' with {'pagination':collection.params.pagination} %}
{% include 'partials/pagination.html.twig' with {'pagination':collection.params.pagination} %}
{% endif %}
</div>
<div id="sidebar" class="g-block size-1-3 pure-u-1-3">
@ -44,5 +44,3 @@
{% endblock %}
{% endembed %}