first steps of the gallery module
This commit is contained in:
parent
158344529b
commit
5beeafe2b1
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
class PSAI extends \SYSTEM\PATH {
|
||||
public static function getPath(){
|
||||
return \SYSTEM\C_ROOT.'webcraft/sai/'.\SYSTEM\C_SUBPATH;}
|
||||
return \SYSTEM\C_ROOT.'rhein/sai/'.\SYSTEM\C_SUBPATH;}
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
//SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_webcraft_billing_satelite','');
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_webcraft_gallery','');
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/saimod_webcraft_gallery/qq','DBD');
|
||||
require_once dirname(__FILE__).'/register_modules.php';
|
||||
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace DBD;
|
||||
|
||||
class SAIMOD_WEBCRAFT_GALLERY_GALLERIES extends \SYSTEM\DB\QQ {
|
||||
protected static function query(){
|
||||
return new \SYSTEM\DB\QQuery(get_class(),
|
||||
//pg
|
||||
'',
|
||||
//mys
|
||||
'SELECT DISTINCT gallery FROM webcraft_gallery;'
|
||||
);}}
|
||||
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace DBD;
|
||||
|
||||
class SAIMOD_WEBCRAFT_GALLERY_GALLERY_ID extends \SYSTEM\DB\QP {
|
||||
protected static function query(){
|
||||
return new \SYSTEM\DB\QQuery(get_class(),
|
||||
//pg
|
||||
'',
|
||||
//mys
|
||||
'SELECT * FROM webcraft_gallery WHERE gallery = ?;'
|
||||
);}}
|
||||
@ -1,3 +0,0 @@
|
||||
td.customer_details {
|
||||
font-weight: bold;
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
function init_saimod_webcraft_billing_satelite() {
|
||||
$('#billingtab a').click(function (e) {e.preventDefault(); $(this).tab('show');});
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
<h4>Verwaltung</h4>
|
||||
<hr>
|
||||
<div class="tabbable">
|
||||
<ul class="nav nav-tabs" id="billingtab">
|
||||
<li class="active"><a href="#tab_billing">Rechnungen</a></li>
|
||||
<li><a href="#tab_project">Projekte</a></li>
|
||||
<li><a href="#tab_customer">Kundeninformation</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_billing">
|
||||
<table class="table table-hover table-condensed sai_table" style="overflow: auto;">
|
||||
<tr>
|
||||
<th>Rechnungsnummer</th>
|
||||
<th>Projekt</th>
|
||||
<th>Datum</th>
|
||||
<th>PDF</th>
|
||||
<th>Betrag</th>
|
||||
<th>Bezahlt am</th>
|
||||
</tr>
|
||||
${content_billing}
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab_project">
|
||||
<table class="table table-hover table-condensed sai_table" style="overflow: auto;">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Nutzer</th>
|
||||
<th>Firma</th>
|
||||
<th>seit</th>
|
||||
<th>URL</th>
|
||||
<th>Serverpfad</th>
|
||||
<th>token</th>
|
||||
</tr>
|
||||
${content_project}
|
||||
</table>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab_customer">
|
||||
<table class="table table-hover table-condensed sai_table" style="overflow: auto;">
|
||||
<tr>
|
||||
<td class="customer_details">Nutzer ID</td>
|
||||
<td>${ID}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="customer_details">Firma</td>
|
||||
<td>${company}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="customer_details">Vorname</td>
|
||||
<td>${name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="customer_details">Nachname</td>
|
||||
<td>${name_last}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="customer_details">Addresse</td>
|
||||
<td>${address}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="customer_details">Beigetreten</td>
|
||||
<td>${join}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -1,8 +0,0 @@
|
||||
<tr>
|
||||
<td>${ID}</td>
|
||||
<td>${project_name}</td>
|
||||
<td>${date}</td>
|
||||
<td><a href="${pdf_link}" target="_blank">PDF</a></td>
|
||||
<td>${balance} €</td>
|
||||
<td><span class="badge badge-${state}">${payed_date}</span></td>
|
||||
</tr>
|
||||
@ -1,9 +0,0 @@
|
||||
<tr>
|
||||
<td>${ID}</td>
|
||||
<td>${customer_company}${customer_name} ${customer_name_last}</td>
|
||||
<td>${name}</td>
|
||||
<td>${date}</td>
|
||||
<td><a href="${url}" target="_blank">${url}</a></td>
|
||||
<td>${path}</td>
|
||||
<td>${token}</td>
|
||||
</tr>
|
||||
13
rhein/sai/saimod_webcraft_gallery/saimod_webcraft_gallery.js
Normal file
13
rhein/sai/saimod_webcraft_gallery/saimod_webcraft_gallery.js
Normal file
@ -0,0 +1,13 @@
|
||||
function init_saimod_webcraft_gallery() {
|
||||
$('#gallerytab a').click(function (e) {e.preventDefault(); load_tab($(this).attr('gallery')); $(this).tab('show');});
|
||||
register_controlls();
|
||||
}
|
||||
|
||||
function load_tab(name){
|
||||
$('#tab_gallery').load(SAI_ENDPOINT+'sai_mod=saimod_webcraft_gallery&action=tab&name='+name, function(){
|
||||
register_controlls();
|
||||
});
|
||||
}
|
||||
|
||||
function register_controlls(){}
|
||||
|
||||
@ -1,6 +1,24 @@
|
||||
<?php
|
||||
class saimod_webcraft_gallery extends \SYSTEM\SAI\SaiModule {
|
||||
public static function sai_mod_saimod_webcraft_gallery(){}
|
||||
public static function sai_mod_saimod_webcraft_gallery(){
|
||||
$galleries = DBD\SAIMOD_WEBCRAFT_GALLERY_GALLERIES::QQ();
|
||||
$vars = array('tabopts' => '');
|
||||
$first = true;
|
||||
while($gallery = $galleries->next()){
|
||||
$gallery['active'] = $first ? 'active' : '';
|
||||
$first = false;
|
||||
$vars['tabopts'] .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(), 'saimod_webcraft_gallery/saimod_webcraft_gallery_tabopt.tpl'), $gallery);}
|
||||
|
||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(), 'saimod_webcraft_gallery/saimod_webcraft_gallery_tabs.tpl'), $vars);
|
||||
}
|
||||
|
||||
public static function sai_mod_saimod_webcraft_gallery_action_tab($name){
|
||||
$gallery = DBD\SAIMOD_WEBCRAFT_GALLERY_GALLERY_ID::QQ(array($name));
|
||||
$content = '';
|
||||
while($entry = $gallery->next()){
|
||||
$content .= \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(), 'saimod_webcraft_gallery/saimod_webcraft_gallery_tabentry.tpl'), $entry);}
|
||||
return \SYSTEM\PAGE\replace::replaceFile(\SYSTEM\SERVERPATH(new PSAI(), 'saimod_webcraft_gallery/saimod_webcraft_gallery_tab.tpl'), array('content' => $content));
|
||||
}
|
||||
|
||||
public static function html_li_menu(){return '<li><a href="#" saimenu="saimod_webcraft_gallery">Gallery</a></li><li class="divider"></li>';}
|
||||
public static function right_public(){return false;}
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
<table class="table table-hover table-condensed" style="overflow: auto;">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Gallery</th>
|
||||
<th>Position</th>
|
||||
<th>Heading</th>
|
||||
<th>Description</th>
|
||||
<th>file_cat</th>
|
||||
<th>file_id</th>
|
||||
</tr>
|
||||
${content}
|
||||
</table>
|
||||
@ -0,0 +1,9 @@
|
||||
<tr>
|
||||
<td>${ID}</td>
|
||||
<td>${gallery}</td>
|
||||
<td>${position}</td>
|
||||
<td>${heading}</td>
|
||||
<td>${description}</td>
|
||||
<td>${file_cat}</td>
|
||||
<td>${file_id}</td>
|
||||
</tr>
|
||||
@ -0,0 +1 @@
|
||||
<li class="${active}"><a href="#tab_gallery" gallery="${gallery}">Gallery ${gallery}</a></li>
|
||||
@ -0,0 +1,8 @@
|
||||
<div class="tabbable">
|
||||
<ul class="nav nav-tabs" id="gallerytab">
|
||||
${tabopts}
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_gallery"></div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user