-
Notifications
You must be signed in to change notification settings - Fork 194
Expand file tree
/
Copy pathdefault.php
More file actions
145 lines (113 loc) · 4.82 KB
/
default.php
File metadata and controls
145 lines (113 loc) · 4.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?php
/**
* Default.php
*
* Main markup file for AdminThemeReno
* Copyright (C) 2015 by Tom Reno (Renobird)
* http://www.tomrenodesign.com
*
* ProcessWire 2.x
* Copyright (C) 2015 by Ryan Cramer
* This file licensed under Mozilla Public License v2.0 http://mozilla.org/MPL/2.0/
*
* https://processwire.com
*
*/
if(!defined("PROCESSWIRE")) die();
if(!isset($content)) $content = '';
$version = $adminTheme->version . 'h';
$ext = $config->debug ? "js" : "min.js";
// Search form
$searchForm = $user->hasPermission('page-edit') ? $modules->get('ProcessPageSearch')->renderSearchForm() : '';
// Admin Theme colors
$adminTheme->colors = $adminTheme->colors ? $adminTheme->colors : "main";
$defaultColors = "styles/" . $adminTheme->colors . ".css";
$customColors = "AdminTheme/$adminTheme/styles/" . $adminTheme->colors . ".css";
$colorFile = file_exists($config->paths->adminTemplates . $defaultColors) ? $config->urls->adminTemplates . $defaultColors : $config->urls->siteModules . $customColors;
// Styles
$config->styles->prepend($colorFile . "?v=" . $version);
$config->styles->append($config->urls->root . "wire/templates-admin/styles/font-awesome/css/font-awesome.min.css?v=$version");
// Scripts
$config->scripts->append($config->urls->root . "wire/templates-admin/scripts/inputfields.$ext?v=$version");
$config->scripts->append($config->urls->adminTemplates . "scripts/main.$ext?v=$version");
require_once(dirname(__FILE__) . "/AdminThemeRenoHelpers.php");
$helpers = new AdminThemeRenoHelpers();
$extras = $adminTheme->getExtraMarkup();
?>
<!DOCTYPE html>
<html class="<?php echo $helpers->renderBodyClass(); ?>" lang="<?php echo $helpers->_('en');
/* this intentionally on a separate line */ ?>">
<head>
<meta charset="utf-8" />
<meta name="robots" content="noindex, nofollow" />
<meta name="google" content="notranslate" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><?php echo $helpers->renderBrowserTitle(); ?></title>
<script type="text/javascript"><?php echo $helpers->renderJSConfig(); ?></script>
<?php foreach($config->styles as $file) echo "\n\t<link type='text/css' href='$file' rel='stylesheet' />"; ?>
<?php foreach($config->scripts as $file) echo "\n\t<script type='text/javascript' src='$file'></script>"; ?>
</head>
<body class="<?php echo $helpers->renderBodyClass(); ?>">
<div id="wrap">
<div id='branding'>
<a id="logo" href="<?php echo $config->urls->admin?>">
<img src="<?php echo $config->urls->adminTemplates?>styles/images/logo.png" alt="ProcessWire" />
<img src="<?php echo $config->urls->adminTemplates?>styles/images/logo-sm.png" class='sm' alt="ProcessWire" />
</a>
</div>
<a href="#" class='main-nav-toggle'><i class="fa fa-bars"></i></a>
<div id="masthead" class="masthead ui-helper-clearfix">
<?php echo $extras['masthead']; ?>
<ul id="topnav">
<?php echo $helpers->renderTopNav(); ?>
</ul>
</div>
<div id="search"><?php echo tabIndent($searchForm, 3);?> <a href='#' class='search-close'><i class="fa fa-times"></i></a></div>
<div id="sidebar" class="mobile">
<ul id="main-nav">
<?php echo $helpers->renderSideNavItems($page); ?>
</ul>
<?php echo $extras['sidebar']; ?>
</div>
<div id="main">
<?php
echo $helpers->renderAdminNotices($notices);
echo $extras['notices'];
?>
<div id="breadcrumbs">
<ul class="nav"><?php echo $helpers->renderBreadcrumbs(false); ?></ul>
</div>
<div id="headline">
<?php if(in_array($page->id, array(2,3,8))) echo $helpers->renderAdminShortcuts(); /* 2,3,8=page-list admin page IDs */ ?>
<h1 id="title"><?php echo $helpers->getHeadline(); ?></h1>
</div>
<div id="content" class="content fouc_fix">
<?php
if($page->body) echo $page->body;
echo $content;
echo $extras['content'];
?>
</div>
<div id="footer" class="footer">
<p>
<?php if(!$user->isGuest()): ?>
<span id="userinfo">
<?php if($user->hasPermission('profile-edit')): ?>
<a class="action" href="<?php echo $config->urls->admin; ?>profile/"><i class="fa <?php echo $adminTheme->profile;?>"></i> <?php echo $helpers->_('Profile'); ?></a>
<?php endif; ?>
<a class="action" href="<?php echo $config->urls->admin; ?>login/logout/"><i class="fa <?php echo $adminTheme->signout;?>"></i> <?php echo $helpers->_('Logout'); ?></a>
</span>
<?php endif; ?>
ProcessWire <?php echo $config->versionName . ' <!--v' . $config->systemVersion; ?>--> © <?php echo date("Y"); ?>
</p>
<?php
echo $extras['footer'];
if($config->debug && $user->isSuperuser()) include($config->paths->root . "wire/templates-admin/debug.inc");
?>
</div><!--/#footer-->
</div> <!-- /#main -->
</div> <!-- /#wrap -->
<?php echo $extras['body']; ?>
</body>
</html>