adjusted to new system api, included missing files

This commit is contained in:
Ulf Gebhardt 2018-11-18 22:22:48 +01:00
parent 129593b51d
commit 4a2ad5598c
No known key found for this signature in database
GPG Key ID: 44C888923CC8E7F3
6 changed files with 43 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<?php
namespace SAI;
class saimod_webcraft_updates extends \SYSTEM\SAI\SaiModule {
class saimod_webcraft_updates extends \SYSTEM\SAI\sai_module {
public static function sai_mod__SAI_saimod_webcraft_updates($update = null, $project = null){
$vars = array('updates' => '', 'projects' => '', 'commits' => '', 'error' => '');
$token = \SYSTEM\CONFIG\config::get(\config_ids::WEBCRAFT_BILLING_TOKEN);
@ -40,7 +40,9 @@ class saimod_webcraft_updates extends \SYSTEM\SAI\SaiModule {
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('time'));
return \SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_webcraft_updates/tpl/saimod_webcraft_updates.tpl'))->SERVERPATH(),$vars);}
public static function html_li_menu(){return '<li id="menu_updates"><a data-toggle="tooltip" data-placement="left" title="Vote Servers" href="#!updates"><span class="glyphicon glyphicon-check" aria-hidden="true"></span>&nbsp;&nbsp;Updates</a></li>';}
public static function menu(){
return new \SYSTEM\SAI\sai_module_menu( 10, \SYSTEM\SAI\sai_module_menu::POISITION_RIGHT, \SYSTEM\SAI\sai_module_menu::DIVIDER_RIGHT,
\SYSTEM\PAGE\replace::replaceFile((new \PSAI('saimod_webcraft_updates/tpl/menu.tpl'))->SERVERPATH()));}
public static function right_public(){return false;}
public static function right_right(){return \SYSTEM\SECURITY\security::check(\SYSTEM\SECURITY\RIGHTS::SYS_SAI);}

7
tpl/menu.tpl Normal file
View File

@ -0,0 +1,7 @@
<li class="nav-item">
<a id="menu_updates" class="nav-link" data-toggle="tooltip" title="Updates" href="#!updates">
<span class="d-lg-none" style="padding-left: 15px;"></span>
<i class="fa fa-check" aria-hidden="true"></i>
<span class="d-lg-none">&nbsp;&nbsp;Updates</span>
</a>
</li>

View File

@ -0,0 +1,11 @@
<hr>
<h4 style="word-break: break-all;">Commits of Project ${project}</h4>
<table style="width: 100%;" class="sai_table">
<tr>
<th>time</th>
<th>author</th>
<th>log</th>
<th>commit</th>
</tr>
${commit}
</table>

View File

@ -0,0 +1,5 @@
<tr>
<td>${time}</td>
<td><a href="#!updates;update.${update};project.${path}">${path}</a></td>
<td>${git}</td>
</tr>

View File

@ -0,0 +1,10 @@
<hr>
<h4 style="word-break: break-all;">Projects of Update ${update}</h4>
<table style="width: 100%;" class="sai_table">
<tr>
<th>time</th>
<th>path</th>
<th>git</th>
</tr>
${project}
</table>

View File

@ -0,0 +1,6 @@
<tr>
<td>${time}</td>
<td><a href="#!updates;update.${commit}">${commit}</a></td>
<td>${commit_last}</td>
<td>${complete}</td>
</tr>