adjusted to new system api, included missing files
This commit is contained in:
parent
129593b51d
commit
4a2ad5598c
@ -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> 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
7
tpl/menu.tpl
Normal 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"> Updates</span>
|
||||
</a>
|
||||
</li>
|
||||
11
tpl/saimod_webcraft_updates_commits.tpl
Normal file
11
tpl/saimod_webcraft_updates_commits.tpl
Normal 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>
|
||||
5
tpl/saimod_webcraft_updates_project.tpl
Normal file
5
tpl/saimod_webcraft_updates_project.tpl
Normal file
@ -0,0 +1,5 @@
|
||||
<tr>
|
||||
<td>${time}</td>
|
||||
<td><a href="#!updates;update.${update};project.${path}">${path}</a></td>
|
||||
<td>${git}</td>
|
||||
</tr>
|
||||
10
tpl/saimod_webcraft_updates_projects.tpl
Normal file
10
tpl/saimod_webcraft_updates_projects.tpl
Normal 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>
|
||||
6
tpl/saimod_webcraft_updates_update.tpl
Normal file
6
tpl/saimod_webcraft_updates_update.tpl
Normal 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>
|
||||
Loading…
x
Reference in New Issue
Block a user