-
Notifications
You must be signed in to change notification settings - Fork 194
Expand file tree
/
Copy pathdefault.php
More file actions
127 lines (97 loc) · 3.9 KB
/
default.php
File metadata and controls
127 lines (97 loc) · 3.9 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
<?php
/**
* default.php
*
* Main markup template file for AdminThemeDefault
*
* __('FOR TRANSLATORS: please translate the file /wire/templates-admin/default.php rather than this one.');
*
*
*/
if(!defined("PROCESSWIRE")) die();
if(!isset($content)) $content = '';
$searchForm = $user->hasPermission('page-edit') ? $modules->get('ProcessPageSearch')->renderSearchForm() : '';
$version = $adminTheme->version . 'f';
$config->styles->prepend($config->urls->adminTemplates . "styles/" . ($adminTheme->colors ? "main-$adminTheme->colors" : "main-classic") . ".css?v=$version");
$config->styles->append($config->urls->root . "wire/templates-admin/styles/font-awesome/css/font-awesome.min.css?v=$version");
$ext = $config->debug ? "js" : "min.js";
$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__) . "/AdminThemeDefaultHelpers.php");
$helpers = new AdminThemeDefaultHelpers();
$extras = $adminTheme->getExtraMarkup();
?><!DOCTYPE html>
<html 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>"; ?>
<?php echo $extras['head']; ?>
</head>
<body class='<?php echo $helpers->renderBodyClass(); ?>'>
<?php
echo $helpers->renderAdminNotices($notices);
echo $extras['notices'];
?>
<div id="masthead" class="masthead ui-helper-clearfix">
<div class="container">
<a id='logo' href='<?php echo $config->urls->admin?>'><img width='130' src="<?php echo $config->urls->adminTemplates?>styles/images/logo.png" alt="ProcessWire" /></a>
<?php
if($user->isLoggedin()) {
echo $searchForm;
echo "\n\n<ul id='topnav'>" . $helpers->renderTopNavItems() . "</ul>";
}
echo $extras['masthead'];
?>
</div>
</div><!--/#masthead-->
<div id='breadcrumbs'>
<div class='container'>
<?php
if($page->process == 'ProcessPageList' || ($page->name == 'lister' && $page->parent->name == 'page')) {
echo $helpers->renderAdminShortcuts();
}
?>
<ul class='nav'><?php echo $helpers->renderBreadcrumbs(); ?></ul>
</div>
</div><!--/#breadcrumbs-->
<div id="content" class="content fouc_fix">
<div class="container">
<?php
if($page->body) echo $page->body;
echo $content;
echo $extras['content'];
?>
</div>
</div><!--/#content-->
<div id="footer" class="footer">
<div class="container">
<p>
<?php if($user->isLoggedin()): ?>
<span id='userinfo'>
<i class='fa fa-user'></i>
<?php
if($user->hasPermission('profile-edit')): ?>
<i class='fa fa-angle-right'></i> <a class='action' href='<?php echo $config->urls->admin; ?>profile/'><?php echo $user->name; ?></a> <i class='fa fa-angle-right'></i>
<?php endif; ?>
<a class='action' href='<?php echo $config->urls->admin; ?>login/logout/'><?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>
</div><!--/#footer-->
<?php echo $extras['body']; ?>
</body>
</html>