forked from projects/fipamo
cleaned up date formatting for display
This commit is contained in:
parent
72c9b3f9e6
commit
395850adb8
4 changed files with 9 additions and 6 deletions
|
@ -28,6 +28,7 @@ class DashControl
|
||||||
"stats" => $data["stats"],
|
"stats" => $data["stats"],
|
||||||
"pages" => $data["pages"],
|
"pages" => $data["pages"],
|
||||||
"paginate" => $data["paginate"],
|
"paginate" => $data["paginate"],
|
||||||
|
"status" => Session::active(),
|
||||||
];
|
];
|
||||||
break;
|
break;
|
||||||
case "page":
|
case "page":
|
||||||
|
@ -41,11 +42,13 @@ class DashControl
|
||||||
"title" => "Fipamo | Edit Page",
|
"title" => "Fipamo | Edit Page",
|
||||||
"page" => (new Book("../content/pages"))->findPageById($uuid),
|
"page" => (new Book("../content/pages"))->findPageById($uuid),
|
||||||
"mode" => $mode,
|
"mode" => $mode,
|
||||||
|
"status" => Session::active(),
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
$pageOptions = [
|
$pageOptions = [
|
||||||
"title" => "Fipamo | Create Page",
|
"title" => "Fipamo | Create Page",
|
||||||
"mode" => $mode,
|
"mode" => $mode,
|
||||||
|
"status" => Session::active(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -118,8 +118,6 @@ class Book
|
||||||
$doc = $parser->parse(file_get_contents($file), false);
|
$doc = $parser->parse(file_get_contents($file), false);
|
||||||
|
|
||||||
$meta = $doc->getYAML();
|
$meta = $doc->getYAML();
|
||||||
//$date = getdate($meta["created"]);
|
|
||||||
$newDate = date("Y M D d", $meta["created"]);
|
|
||||||
$page = [
|
$page = [
|
||||||
"id" => $meta["id"],
|
"id" => $meta["id"],
|
||||||
"uuid" => $meta["uuid"],
|
"uuid" => $meta["uuid"],
|
||||||
|
@ -129,8 +127,8 @@ class Book
|
||||||
"layout" => $meta["layout"],
|
"layout" => $meta["layout"],
|
||||||
"tags" => $meta["tags"],
|
"tags" => $meta["tags"],
|
||||||
"author" => $meta["author"],
|
"author" => $meta["author"],
|
||||||
"prettyDate" => $newDate,
|
"created" => date("Y M D d", $meta["created"]),
|
||||||
"created" => $meta["created"],
|
"updated" => date("Y M D d", $meta["updated"]),
|
||||||
"deleted" => $meta["deleted"],
|
"deleted" => $meta["deleted"],
|
||||||
"menu" => $meta["menu"],
|
"menu" => $meta["menu"],
|
||||||
"featured" => $meta["featured"],
|
"featured" => $meta["featured"],
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
{% set _title = page['title'] %}
|
{% set _title = page['title'] %}
|
||||||
{% set tags = page['tags'] %}
|
{% set tags = page['tags'] %}
|
||||||
{% set content = page['content'] %}
|
{% set content = page['content'] %}
|
||||||
|
{% set date = page['created'] %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set id = '' %}
|
{% set id = '' %}
|
||||||
{% set uuid = '' %}
|
{% set uuid = '' %}
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
{% set title = '' %}
|
{% set title = '' %}
|
||||||
{% set tags = '' %}
|
{% set tags = '' %}
|
||||||
{% set content = '' %}
|
{% set content = '' %}
|
||||||
|
{% set date = '' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
|
@ -62,7 +64,7 @@
|
||||||
<label>CREATED</label>
|
<label>CREATED</label>
|
||||||
<br/>
|
<br/>
|
||||||
<span id="post-date" type="text">
|
<span id="post-date" type="text">
|
||||||
PRETTY DATE
|
{{ date }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="post-meta" class="column">
|
<div id="post-meta" class="column">
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
<span class="item-options" data-active="{{ featured }}">
|
<span class="item-options" data-active="{{ featured }}">
|
||||||
Featured</span>
|
Featured</span>
|
||||||
</div>
|
</div>
|
||||||
<span>{{ page.prettyDate }}</span>
|
<span>{{ page.updated }}</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
Loading…
Reference in a new issue