sai start redesign, replace default parameter, config option project name
This commit is contained in:
parent
45fd16f2a6
commit
919b3392cd
@ -30,4 +30,5 @@ class config_ids {
|
|||||||
const SYS_SAI_CONFIG_NAVIMG = 51;
|
const SYS_SAI_CONFIG_NAVIMG = 51;
|
||||||
const SYS_SAI_CONFIG_TITLE = 52;
|
const SYS_SAI_CONFIG_TITLE = 52;
|
||||||
const SYS_SAI_CONFIG_COPYRIGHT = 53;
|
const SYS_SAI_CONFIG_COPYRIGHT = 53;
|
||||||
|
const SYS_SAI_CONFIG_PROJECT = 54;
|
||||||
}
|
}
|
||||||
@ -1,3 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\FILES');
|
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'SYSTEM\FILES');
|
||||||
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/sys/','sys');
|
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/sys/','sys');
|
||||||
|
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/saistart_sys_sai/','saistart_sys_sai');
|
||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace SYSTEM\PAGE;
|
namespace SYSTEM\PAGE;
|
||||||
class replace {
|
class replace {
|
||||||
public static function replace($text, $vars){
|
public static function replace($text, $vars = array()){
|
||||||
if(!$vars){
|
if(!$vars){
|
||||||
$vars = array();}
|
$vars = array();}
|
||||||
$search = array();
|
$search = array();
|
||||||
@ -14,8 +14,8 @@ class replace {
|
|||||||
}
|
}
|
||||||
return @preg_replace($search, $replace, $text);
|
return @preg_replace($search, $replace, $text);
|
||||||
}
|
}
|
||||||
public static function replaceFile($path, $vars){
|
public static function replaceFile($path, $vars = array()){
|
||||||
$buffer = file_get_contents($path);
|
$buffer = file_get_contents($path);
|
||||||
return self::replace($buffer, $vars);}
|
return self::replace($buffer, $vars);}
|
||||||
|
|
||||||
//removes all Variable Handles
|
//removes all Variable Handles
|
||||||
|
|||||||
@ -1,4 +1,23 @@
|
|||||||
|
#container_top .well{
|
||||||
|
height: 220px;
|
||||||
|
}
|
||||||
#project {
|
#project {
|
||||||
font-size: 22px;
|
float: left;
|
||||||
margin: 15px;
|
min-width: 250px;
|
||||||
|
}
|
||||||
|
#analytics {
|
||||||
|
margin-left: 20px;
|
||||||
|
float: left;
|
||||||
|
min-width: 250px;
|
||||||
|
}
|
||||||
|
#git {
|
||||||
|
margin-left: 20px;
|
||||||
|
float: left;
|
||||||
|
min-width: 250px;
|
||||||
|
}
|
||||||
|
#project {
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
#todo {
|
||||||
|
clear: both;
|
||||||
}
|
}
|
||||||
@ -22,7 +22,14 @@ class saistart_sys_sai extends \SYSTEM\SAI\SaiModule {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected static function html_content(){
|
protected static function html_content(){
|
||||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/tpl/content.tpl'), \SYSTEM\SAI\saimod_sys_todo::statistics());}
|
if(!\SYSTEM\SECURITY\Security::isLoggedIn()){
|
||||||
|
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/tpl/content.tpl'));}
|
||||||
|
$vars = array();
|
||||||
|
$vars['project_name'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_SAI_CONFIG_PROJECT);
|
||||||
|
$vars['project_url'] = \SYSTEM\CONFIG\config::get(\SYSTEM\CONFIG\config_ids::SYS_CONFIG_PATH_BASEURL);
|
||||||
|
$vars = array_merge($vars,\SYSTEM\SAI\saimod_sys_todo::statistics());
|
||||||
|
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/tpl/content_loggedin.tpl'), $vars);
|
||||||
|
}
|
||||||
|
|
||||||
protected static function html_login(){
|
protected static function html_login(){
|
||||||
return \SYSTEM\SECURITY\Security::isLoggedIn() ? \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/tpl/logout.tpl'), array()) : \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/tpl/login.tpl'), array());}
|
return \SYSTEM\SECURITY\Security::isLoggedIn() ? \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/tpl/logout.tpl'), array()) : \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\WEBPATH(new \SYSTEM\PSAI(),'modules/saistart_sys_sai/tpl/login.tpl'), array());}
|
||||||
|
|||||||
@ -1,17 +1,14 @@
|
|||||||
Welcome to the SYSTEM Admin Interface - short SAI.<br/>
|
<div class="masthead">
|
||||||
From here you can control and manage your Website.
|
<h3 class="muted">Design. Simple. Fast. Reliable. Innovative.</h3>
|
||||||
|
<h4 class="text-info">We write awesome code and we use <a href="https://github.com/ulfgebhardt/system">SYSTEM</a> and <a href="http://getbootstrap.com/">Twitter Bootstrap.</a></h4>
|
||||||
<div id="project">
|
|
||||||
${project}% Project Progress
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="myCarousel" class="carousel slide" style="margin-right: 300px;">
|
<div id="myCarousel" class="carousel slide" style="margin-right: 300px;">
|
||||||
<div class="carousel-inner">
|
<div class="carousel-inner">
|
||||||
<div class="item active">
|
<div class="item active">
|
||||||
<img class="carousel-img" src="http://mojotrollz.eu/web/system/sai/modules/saistart_sys_sai/img/logo_sai.png" alt="">
|
<img class="carousel-img" src="http://mojotrollz.eu/web/system/sai/modules/saistart_sys_sai/img/logo_sai.png" alt="">
|
||||||
<div class="carousel-caption">
|
<div class="carousel-caption">
|
||||||
<h4>Webcraft</h4>
|
<h4>System features here as pictures</h4>
|
||||||
<p>Showing Logo</p>
|
<p>Showing Dummy Logo</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
43
sai/modules/saistart_sys_sai/tpl/content_loggedin.tpl
Normal file
43
sai/modules/saistart_sys_sai/tpl/content_loggedin.tpl
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<div class="masthead">
|
||||||
|
<h3 class="muted">Welcome to the SYSTEM Admin Interface - short SAI.</h3>
|
||||||
|
<h4 class="text-info">From here you can control and manage your Website.</h4>
|
||||||
|
</div>
|
||||||
|
<div id="container_top">
|
||||||
|
<div class="well" id="project">
|
||||||
|
<h2 class="muted"><a href="#!config">Project</a></h2>
|
||||||
|
<b>Name:</b> ${project_name}<br/>
|
||||||
|
<b>URL:</b> <a href="${project_url}" target="_blank">${project_url}</a><br/>
|
||||||
|
<b>Progress:</b> ${project}%
|
||||||
|
</div>
|
||||||
|
<div class="well" id="analytics">
|
||||||
|
<h2 class="muted"><a href="#!log">Analytics</a></h2>
|
||||||
|
<b>IPs today:</b> ${ip_today}<br/>
|
||||||
|
<b>Users today:</b> ${user_today}<br/>
|
||||||
|
<br/>
|
||||||
|
<b>IPs this week:</b> ${ip_week}<br/>
|
||||||
|
<b>Users this week:</b> ${user_week}<br/>
|
||||||
|
<br/>
|
||||||
|
<b>IPs this month:</b> ${ip_month}<br/>
|
||||||
|
<b>Users this month:</b> ${user_month}
|
||||||
|
</div>
|
||||||
|
<div class="well" id="git">
|
||||||
|
<h2 class="muted">Git</h2>
|
||||||
|
<b>Current Project Version:</b> ${git_project}<br/>
|
||||||
|
<b>Current SYSTEM Version:</b> ${git_system}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="well" id="todo">
|
||||||
|
<h2 class="muted"><a href="#!todo">Todo</a></h2>
|
||||||
|
<b>Status:</b> ${project_count}/${project_all}<br/>
|
||||||
|
<b>Progress:</b> ${project}%
|
||||||
|
<h4 class="muted">5 Latest User Todos</h4>
|
||||||
|
${todo_user_entries}
|
||||||
|
<h4 class="muted">5 Latest Generated Todos</h4>
|
||||||
|
${todo_gen_entries}
|
||||||
|
</div>
|
||||||
|
<div class="well" id="log">
|
||||||
|
<h2 class="muted"><a href="#!log">Log</a></h2>
|
||||||
|
<b>Count:</b> ${log_count}
|
||||||
|
<h4 class="muted">10 Latest Log Entries</h4>
|
||||||
|
${log_entries}
|
||||||
|
</div>
|
||||||
@ -1,7 +1,3 @@
|
|||||||
<div class="masthead">
|
|
||||||
<h3 class="muted">Design. Simple. Fast. Reliable. Innovative.</h3>
|
|
||||||
<h4 class="text-info">We write awesome code and we use <a href="https://github.com/ulfgebhardt/system">SYSTEM</a> and <a href="http://getbootstrap.com/">Twitter Bootstrap.</a></h4>
|
|
||||||
</div>
|
|
||||||
<div id="content_saistart" style="float:left; width: auto;">${content}</div>
|
<div id="content_saistart" style="float:left; width: auto;">${content}</div>
|
||||||
<div class="well" id="login" style="position: fixed; top: 80px; right: 20px; width:220px;">${login}</div>
|
<div class="well" id="login" style="position: fixed; top: 80px; right: 20px; width:220px;">${login}</div>
|
||||||
<div style="clear:both;"></div>
|
<div style="clear:both;"></div>
|
||||||
Loading…
x
Reference in New Issue
Block a user