mirror of
https://github.com/friendica/friendica
synced 2024-11-10 05:02:58 +00:00
Merge pull request #4413 from rabuzarus/20180207_-_frio_admin_summery_tpl
Frio: add admin summary template
This commit is contained in:
commit
96c7640441
7 changed files with 232 additions and 154 deletions
|
@ -2,10 +2,11 @@
|
|||
<h1>{{$title}} - {{$page}}</h1>
|
||||
<p>{{$intro1}}</p>
|
||||
<p>{{$intro2}}</p>
|
||||
</div>
|
||||
|
||||
<form action="{{$baseurl}}/admin/deleteitem" method="post">
|
||||
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
||||
{{include file="field_input.tpl" field=$deleteitemguid}}
|
||||
<div class="submit"><input type="submit" name="page_deleteitem_submit" value="{{$submit}}" /></div>
|
||||
</form>
|
||||
<form action="{{$baseurl}}/admin/deleteitem" method="post">
|
||||
<input type="hidden" name="form_security_token" value="{{$form_security_token}}">
|
||||
{{include file="field_input.tpl" field=$deleteitemguid}}
|
||||
<div class="submit"><input type="submit" name="page_deleteitem_submit" value="{{$submit}}" /></div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,118 +1,123 @@
|
|||
<script src="{{$baseurl}}/vendor/asset/Chart-js/dist/Chart.min.js"></script>
|
||||
<div id="adminpage">
|
||||
<h1>{{$title}} - {{$page}}</h1>
|
||||
<canvas id="FederationChart" class="federation-graph" width="320" height="320"></canvas>
|
||||
<p>{{$intro}}</p>
|
||||
{{if not $autoactive}}
|
||||
<p class="error-message">{{$hint}}</p>
|
||||
{{/if}}
|
||||
<p>{{$legendtext}}</p>
|
||||
<ul>
|
||||
{{foreach $counts as $c}}
|
||||
{{if $c[0]['total'] > 0}}
|
||||
<li>{{$c[0]['platform']}} ({{$c[0]['total']}}/{{$c[0]['users']}})</li>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
</div>
|
||||
<script>
|
||||
var FedData = {
|
||||
datasets: [{
|
||||
data: [
|
||||
{{foreach $counts as $c}}
|
||||
{{$c[0]['total']}},
|
||||
{{/foreach}}
|
||||
],
|
||||
backgroundColor: [
|
||||
{{foreach $counts as $c}}
|
||||
'{{$c[3]}}',
|
||||
{{/foreach}}
|
||||
],
|
||||
hoverBackgroundColor: [
|
||||
{{foreach $counts as $c}}
|
||||
'#EE90A1',
|
||||
{{/foreach}}
|
||||
]
|
||||
}],
|
||||
labels: [
|
||||
{{foreach $counts as $c}}
|
||||
"{{$c[0]['platform']}}",
|
||||
{{/foreach}}
|
||||
]
|
||||
};
|
||||
var ctx = document.getElementById("FederationChart").getContext("2d");
|
||||
var myDoughnutChart = new Chart(ctx, {
|
||||
type: 'doughnut',
|
||||
data: FedData,
|
||||
options: {
|
||||
legend: {display: false},
|
||||
animation: {animateRotate: false},
|
||||
responsive: false
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<h1>{{$title}} - {{$page}}</h1>
|
||||
|
||||
<table id="federation-stats">
|
||||
{{foreach $counts as $c}}
|
||||
{{if $c[0]['total'] > 0}}
|
||||
<tr>
|
||||
<th>{{$c[0]['platform']}}</th>
|
||||
<th><strong>{{$c[0]['total']}}</strong></td>
|
||||
<td>{{$c[0]['network']}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="federation-data">
|
||||
<canvas id="{{$c[2]}}Chart" class="federation-network-graph" width="240" height="240"></canvas>
|
||||
<script>
|
||||
var {{$c[2]}}data = {
|
||||
datasets: [{
|
||||
data: [
|
||||
{{foreach $c[1] as $v}}
|
||||
{{$v['total']}},
|
||||
{{/foreach}}
|
||||
],
|
||||
backgroundColor: [
|
||||
{{foreach $c[1] as $v}}
|
||||
'{{$c[3]}}',
|
||||
{{/foreach}}
|
||||
],
|
||||
hoverBackgroundColor: [
|
||||
{{foreach $c[1] as $v}}
|
||||
'#EE90A1',
|
||||
{{/foreach}}
|
||||
]
|
||||
}],
|
||||
labels: [
|
||||
{{foreach $c[1] as $v}}
|
||||
'{{$v['version']}}',
|
||||
{{/foreach}}
|
||||
]
|
||||
};
|
||||
var ctx = document.getElementById("{{$c[2]}}Chart").getContext("2d");
|
||||
var my{{$c[2]}}DoughnutChart = new Chart(ctx, {
|
||||
type: 'doughnut',
|
||||
data: {{$c[2]}}data,
|
||||
options: {
|
||||
legend: {display: false},
|
||||
animation: {animateRotate: false},
|
||||
responsive: false
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<ul class="federation-stats">
|
||||
{{foreach $c[1] as $v}}
|
||||
<li>
|
||||
{{if ($c[0]['platform']==='Friendica' and $version===$v['version']) }}
|
||||
<span class="version-match">{{$v['version']}}</span>
|
||||
{{else}}
|
||||
{{$v['version']}}
|
||||
{{/if}}
|
||||
({{$v['total']}})
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
</table>
|
||||
<canvas id="FederationChart" class="federation-graph" width="320" height="320"></canvas>
|
||||
<p>{{$intro}}</p>
|
||||
|
||||
{{if not $autoactive}}
|
||||
<p class="error-message">{{$hint}}</p>
|
||||
{{/if}}
|
||||
|
||||
<p>{{$legendtext}}</p>
|
||||
|
||||
<ul>
|
||||
{{foreach $counts as $c}}
|
||||
{{if $c[0]['total'] > 0}}
|
||||
<li>{{$c[0]['platform']}} ({{$c[0]['total']}}/{{$c[0]['users']}})</li>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
|
||||
<script>
|
||||
var FedData = {
|
||||
datasets: [{
|
||||
data: [
|
||||
{{foreach $counts as $c}}
|
||||
{{$c[0]['total']}},
|
||||
{{/foreach}}
|
||||
],
|
||||
backgroundColor: [
|
||||
{{foreach $counts as $c}}
|
||||
'{{$c[3]}}',
|
||||
{{/foreach}}
|
||||
],
|
||||
hoverBackgroundColor: [
|
||||
{{foreach $counts as $c}}
|
||||
'#EE90A1',
|
||||
{{/foreach}}
|
||||
]
|
||||
}],
|
||||
labels: [
|
||||
{{foreach $counts as $c}}
|
||||
"{{$c[0]['platform']}}",
|
||||
{{/foreach}}
|
||||
]
|
||||
};
|
||||
var ctx = document.getElementById("FederationChart").getContext("2d");
|
||||
var myDoughnutChart = new Chart(ctx, {
|
||||
type: 'doughnut',
|
||||
data: FedData,
|
||||
options: {
|
||||
legend: {display: false},
|
||||
animation: {animateRotate: false},
|
||||
responsive: false
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<table id="federation-stats">
|
||||
{{foreach $counts as $c}}
|
||||
{{if $c[0]['total'] > 0}}
|
||||
<tr>
|
||||
<th>{{$c[0]['platform']}}</th>
|
||||
<th><strong>{{$c[0]['total']}}</strong></td>
|
||||
<td>{{$c[0]['network']}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="federation-data">
|
||||
<canvas id="{{$c[2]}}Chart" class="federation-network-graph" width="240" height="240"></canvas>
|
||||
<script>
|
||||
var {{$c[2]}}data = {
|
||||
datasets: [{
|
||||
data: [
|
||||
{{foreach $c[1] as $v}}
|
||||
{{$v['total']}},
|
||||
{{/foreach}}
|
||||
],
|
||||
backgroundColor: [
|
||||
{{foreach $c[1] as $v}}
|
||||
'{{$c[3]}}',
|
||||
{{/foreach}}
|
||||
],
|
||||
hoverBackgroundColor: [
|
||||
{{foreach $c[1] as $v}}
|
||||
'#EE90A1',
|
||||
{{/foreach}}
|
||||
]
|
||||
}],
|
||||
labels: [
|
||||
{{foreach $c[1] as $v}}
|
||||
'{{$v['version']}}',
|
||||
{{/foreach}}
|
||||
]
|
||||
};
|
||||
var ctx = document.getElementById("{{$c[2]}}Chart").getContext("2d");
|
||||
var my{{$c[2]}}DoughnutChart = new Chart(ctx, {
|
||||
type: 'doughnut',
|
||||
data: {{$c[2]}}data,
|
||||
options: {
|
||||
legend: {display: false},
|
||||
animation: {animateRotate: false},
|
||||
responsive: false
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<ul class="federation-stats">
|
||||
{{foreach $c[1] as $v}}
|
||||
<li>
|
||||
{{if ($c[0]['platform']==='Friendica' and $version===$v['version']) }}
|
||||
<span class="version-match">{{$v['version']}}</span>
|
||||
{{else}}
|
||||
{{$v['version']}}
|
||||
{{/if}}
|
||||
({{$v['total']}})
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -1,21 +1,24 @@
|
|||
<h1>{{$title}}</h1>
|
||||
|
||||
<form action="admin/features" method="post" autocomplete="off">
|
||||
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
||||
<div id="adminpage">
|
||||
<h1>{{$title}}</h1>
|
||||
|
||||
{{foreach $features as $g => $f}}
|
||||
<h3 class="settings-heading"><a href="javascript:;">{{$f.0}}</a></h3>
|
||||
<form action="admin/features" method="post" autocomplete="off">
|
||||
<input type='hidden' name='form_security_token' value='{{$form_security_token}}'>
|
||||
|
||||
<div class="settings-content-block">
|
||||
{{foreach $f.1 as $fcat}}
|
||||
{{include file="field_yesno.tpl" field=$fcat.0}}
|
||||
{{include file="field_yesno.tpl" field=$fcat.1}}
|
||||
{{foreach $features as $g => $f}}
|
||||
<h3 class="settings-heading"><a href="javascript:;">{{$f.0}}</a></h3>
|
||||
|
||||
<div class="settings-content-block">
|
||||
{{foreach $f.1 as $fcat}}
|
||||
{{include file="field_yesno.tpl" field=$fcat.0}}
|
||||
{{include file="field_yesno.tpl" field=$fcat.1}}
|
||||
{{/foreach}}
|
||||
|
||||
<div class="settings-submit-wrapper" >
|
||||
<input type="submit" name="submit" class="settings-features-submit" value="{{$submit|escape:'html'}}" />
|
||||
</div>
|
||||
</div>
|
||||
{{/foreach}}
|
||||
|
||||
<div class="settings-submit-wrapper" >
|
||||
<input type="submit" name="submit" class="settings-features-submit" value="{{$submit|escape:'html'}}" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{{/foreach}}
|
||||
|
||||
</form>
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
|
||||
<h2>{{$banner}}</h2>
|
||||
<div id="adminpage">
|
||||
<h2>{{$banner}}</h2>
|
||||
|
||||
<div id="failed_updates_desc">{{$desc}}</div>
|
||||
<div id="failed_updates_desc">{{$desc}}</div>
|
||||
|
||||
{{if $failed}}
|
||||
{{foreach $failed as $f}}
|
||||
{{if $failed}}
|
||||
{{foreach $failed as $f}}
|
||||
<h4>{{$f}}</h4>
|
||||
|
||||
<h4>{{$f}}</h4>
|
||||
<ul>
|
||||
<li><a href="{{$base}}/admin/dbsync/mark/{{$f}}">{{$mark}}</a></li>
|
||||
<li><a href="{{$base}}/admin/dbsync/{{$f}}">{{$apply}}</a></li>
|
||||
</ul>
|
||||
|
||||
<hr />
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
<ul>
|
||||
<li><a href="{{$base}}/admin/dbsync/mark/{{$f}}">{{$mark}}</a></li>
|
||||
<li><a href="{{$base}}/admin/dbsync/{{$f}}">{{$apply}}</a></li>
|
||||
</ul>
|
||||
|
||||
<hr />
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
|
||||
<h2>{{$banner}}</h2>
|
||||
<div id="adminpage">
|
||||
<h2>{{$banner}}</h2>
|
||||
|
||||
<p><a href="{{$base}}/admin/dbsync/check">{{$check}}</a></p>
|
||||
|
||||
<hr />
|
||||
<p><a href="{{$base}}/admin/dbsync/check">{{$check}}</a></p>
|
||||
|
||||
<hr />
|
||||
</div>
|
||||
|
|
|
@ -2112,7 +2112,7 @@ ul.dropdown-menu li:hover {
|
|||
.allfriends-content-wrapper, .match-content-wrapper, .dirfind-content-wrapper,
|
||||
.directory-content-wrapper, .manage-content-wrapper, .notes-content-wrapper,
|
||||
.message-content-wrapper, .apps-content-wrapper, .photos-content-wrapper,
|
||||
.admin-content-wrapper, .viewcontacts-content-wrapper, .dfrn_request-content-wrapper,
|
||||
#adminpage, .viewcontacts-content-wrapper, .dfrn_request-content-wrapper,
|
||||
.friendica-content-wrapper, .credits-content-wrapper, .nogroup-content-wrapper,
|
||||
.profperm-content-wrapper {
|
||||
min-height: calc(100vh - 150px);
|
||||
|
@ -2829,6 +2829,9 @@ section.help-content-wrapper li {
|
|||
#adminpage #frio_background_image.input-group {
|
||||
display: block;
|
||||
}
|
||||
#admin-summary-wrapper {
|
||||
padding-top: 10px;
|
||||
}
|
||||
#adminpage ul#pluginslist, li.plugin {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
|
64
view/theme/frio/templates/admin/summary.tpl
Normal file
64
view/theme/frio/templates/admin/summary.tpl
Normal file
|
@ -0,0 +1,64 @@
|
|||
|
||||
<div id='adminpage-summery' class="adminpage generic-page-wrapper">
|
||||
<h1>{{$title}} - {{$page}}</h1>
|
||||
|
||||
{{if $showwarning}}
|
||||
<div id="admin-warning-message-wrapper" class="alert alert-warning">
|
||||
{{foreach $warningtext as $wt}}
|
||||
<p>{{$wt}}</p>
|
||||
{{/foreach}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div id="admin-summary-wrapper">
|
||||
{{* The work queues short statistic. *}}
|
||||
<div id="admin-summary-queues" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 admin-summary">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 admin-summary-label-name text-muted">{{$queues.label}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 admin-summary-entry"><a href="{{$baseurl}}/admin/queue">{{$queues.queue}}</a> - {{$queues.workerq}}</div>
|
||||
</div>
|
||||
|
||||
{{* Number of pending registrations. *}}
|
||||
<div id="admin-summary-pending" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 admin-summary">
|
||||
<hr class="admin-summary-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 admin-summary-label-name text-muted">{{$pending.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 admin-summary-entry">{{$pending.1}}</div>
|
||||
</div>
|
||||
|
||||
{{* Number of registered users *}}
|
||||
<div id="admin-summary-users" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 admin-summary">
|
||||
<hr class="admin-summary-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 admin-summary-label-name text-muted">{{$users.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 admin-summary-entry">{{$users.1}}</div>
|
||||
</div>
|
||||
|
||||
{{* Account types of registered users. *}}
|
||||
{{foreach $accounts as $p}}
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 admin-summary">
|
||||
<hr class="admin-summary-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 admin-summary-label-name text-muted">{{$p.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 admin-summary-entry">{{if $p.1}}{{$p.1}}{{else}}0{{/if}}</div>
|
||||
</div>
|
||||
{{/foreach}}
|
||||
|
||||
{{* List enabled addons. *}}
|
||||
<div id="admin-summary-addons" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 admin-summary">
|
||||
<hr class="admin-summary-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 admin-summary-label-name text-muted">{{$addons.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 admin-summary-entry">
|
||||
{{foreach $addons.1 as $p}}
|
||||
<a href="/admin/addons/{{$p}}/">{{$p}}</a><br>
|
||||
{{/foreach}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{* The Friendica version. *}}
|
||||
<div id="admin-summary-version" class="col-lg-12 col-md-12 col-sm-12 col-xs-12 admin-summary">
|
||||
<hr class="admin-summary-separator">
|
||||
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-12 admin-summary-label-name text-muted">{{$version.0}}</div>
|
||||
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12 admin-summary-entry">{{$platform}} '{{$codename}}' {{$version.1}} - {{$build}}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div>
|
Loading…
Reference in a new issue