-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.inc
165 lines (100 loc) · 4.75 KB
/
main.inc
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<body class='<?php echo $helpers->renderBodyClass(); ?>'>
<div id="wrapper">
<?php echo $helpers->checkExtension(); ?>
<?php echo $helpers->renderAdminNotices($notices); ?>
<!-- Header -->
<div id="header">
<div class="container ui-helper-clearfix">
<a class="switch" href="#panel"></a>
<a class="logo" href='<?php echo $config->urls->admin?>'><?php echo $helpers->renderSitename(); ?></a>
<?php echo $helpers->renderDate(); ?>
<ul class="info">
<li><?php echo "<span>" . $user->name . "</span>" . $helpers->renderCounter(); ?></li>
<?php if($user->hasPermission('profile-edit')) { ?>
<li><i class="fa fa-cog"></i><a href='<?php echo $config->urls->admin; ?>profile/'><?php echo $helpers->_('Profile'); ?></a></li>
<li><i class="fa fa-globe"></i><a href='<?php echo $config->urls->root; ?>'><?php echo $helpers->_('View Site'); ?></a></li>
<?php } ?>
<li><i class="fa fa-arrow-circle-right"></i><a href='<?php echo $config->urls->admin; ?>login/logout/'><?php echo $helpers->_('Logout'); ?></a></li>
</ul>
<div id="unpublished" class="modality">
<div class="content">
<h1><?php echo $helpers->_('Unpublished pages'); ?></h1>
<?php echo $helpers->renderUnpublished(); ?>
<div class="modality-close"></div>
</div>
</div>
</div>
</div>
<!-- Navigation -->
<div id="navigation">
<div class="container ui-helper-clearfix">
<?php echo $helpers->renderNavigation(); ?>
</div>
</div>
<!-- Breadcrumbs -->
<div id="breadcrumbs">
<div class="container ui-helper-clearfix">
<?php echo $helpers->renderBreadcrumbs(); ?>
<?php echo $searchForm; ?>
</div>
</div>
<?php if(in_array($page->id, array(2,3,8))) echo $helpers->renderAdminShortcuts(); ?>
<!-- Title -->
<div id="title">
<div class="container ui-helper-clearfix">
<?php echo $helpers->renderPageId(); ?>
<h1><?php echo $helpers->getHeadline(); ?></h1>
</div>
</div>
<!-- Content -->
<div id="content" class="content">
<div class="container">
<?php
if(trim($page->summary)) echo "<h2>{$page->summary}</h2>";
if($page->body) echo $page->body;
echo $content;
?>
</div>
</div>
<!-- Footer -->
<div id="footer" class="footer">
<div class="container ui-helper-clearfix">
<span>ProcessWire <?php echo $config->version . ' <!--v' . $config->systemVersion; ?>--> © <?php echo date("Y."); ?><?php echo $helpers->renderThemeName(); ?></span>
<?php
if($config->debug && $this->user->isSuperuser()) {
include($config->paths->root . '/wire/templates-admin/debug.inc');
echo "<p>IP: " . $helpers->getIp() . "</p>";
}
?>
</div>
<a class="top" href="#"></a>
</div>
</div>
<!-- Panelslider -->
<div id="panel">
<div class="content">
<?php
if($this->wire('adminTheme')->modestaNumCreated > 0) {
echo '<h2>' . $helpers->_('Last created pages') . '</h2>';
echo $helpers->renderPageStatus("created", $this->wire('adminTheme')->modestaTemplate, $this->wire('adminTheme')->modestaNumCreated);
}
if($this->wire('adminTheme')->modestaNumModified > 0) {
echo '<h2>' . $helpers->_('Last modified pages') . '</h2>';
echo $helpers->renderPageStatus("modified", $this->wire('adminTheme')->modestaTemplate, $this->wire('adminTheme')->modestaNumModified);
}
?>
</div>
<div class="content-mobile">
<h2><?php echo $user->name; ?></h2>
<ul class="info">
<?php if($user->hasPermission('profile-edit')) { ?>
<li><a href='<?php echo $config->urls->admin; ?>profile/'><?php echo $helpers->_('Profile'); ?></a></li>
<li><a href='<?php echo $config->urls->root; ?>'><?php echo $helpers->_('View Site'); ?></a></li>
<?php } ?>
<li><a href='<?php echo $config->urls->admin; ?>login/logout/'><?php echo $helpers->_('Logout'); ?></a></li>
</ul>
<h2><?php echo $helpers->_('Navigation'); ?></h2>
<?php echo $helpers->renderNavigation(); ?>
</div>
</div>
</body>