included on-click opening of article
This commit is contained in:
parent
2220e3e848
commit
1b199afa7d
@ -3,4 +3,6 @@
|
||||
class elements {
|
||||
public static function getAllElementsOfTag($tag){
|
||||
return \DBD\NEOPOLIMATRIX_GENERATE_ELEMENTLIST::QA(array($tag));}
|
||||
public static function getText($tag){
|
||||
return \DBD\NEOPOLIMATRIX_GET_TEXT::Q1(array($tag));}
|
||||
}
|
||||
11
neopolimatrix/dbd/qq/NEOPOLIMATRIX_GET_TEXT.php
Normal file
11
neopolimatrix/dbd/qq/NEOPOLIMATRIX_GET_TEXT.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace DBD;
|
||||
|
||||
class NEOPOLIMATRIX_GET_TEXT extends \SYSTEM\DB\QP {
|
||||
protected static function query(){
|
||||
return new \SYSTEM\DB\QQuery(get_class(),
|
||||
//pg
|
||||
'',
|
||||
//mys
|
||||
'SELECT * FROM system_locale_string LEFT JOIN system_locale_string_tag_strings ON (system_locale_string.id = system_locale_string_tag_strings.id) WHERE tag_id = ?;'
|
||||
);}}
|
||||
@ -2,5 +2,6 @@
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_page','');
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_list','');
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_element','');
|
||||
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/impressum','');
|
||||
|
||||
|
||||
30
neopolimatrix/page/default_element/default_element.php
Normal file
30
neopolimatrix/page/default_element/default_element.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
class default_element extends \SYSTEM\PAGE\Page {
|
||||
|
||||
var $text_id = null;
|
||||
public function __construct($text_id) {
|
||||
|
||||
$this->text_id = $text_id;
|
||||
}
|
||||
|
||||
|
||||
public function get_text(){
|
||||
$result = '';
|
||||
$element = elements::getText($this->text_id);
|
||||
$element['title'] = $element['id'];
|
||||
$result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_element/element.tpl'), $element);
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function html(){
|
||||
$vars = array();
|
||||
$vars['text'] = $this->get_text();
|
||||
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_element/default_element.tpl'), $vars);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
1
neopolimatrix/page/default_element/default_element.tpl
Normal file
1
neopolimatrix/page/default_element/default_element.tpl
Normal file
@ -0,0 +1 @@
|
||||
${text}
|
||||
10
neopolimatrix/page/default_element/element.tpl
Normal file
10
neopolimatrix/page/default_element/element.tpl
Normal file
@ -0,0 +1,10 @@
|
||||
<div class="list_element" text_id="${tag_id}" style="width: 750px; margin: auto; margin-bottom: 50px; padding: 20px;">
|
||||
<p style="float: left; font-size: 10pt; margin-top: 7px;">Author: <i>${author}</i></p>
|
||||
<p style="float: right; font-size: 10pt; margin-top: 7px;">Veröffentlicht: ${timestamp}</p>
|
||||
<div style="clear: both;"></div>
|
||||
<div style="border-top: solid 1px black; width: 100%;"></div>
|
||||
<h2>${title}</h2>
|
||||
<br>
|
||||
${deDE}
|
||||
<br>
|
||||
</div>
|
||||
@ -3,7 +3,6 @@ class default_list extends \SYSTEM\PAGE\Page {
|
||||
|
||||
var $filter = null;
|
||||
public function __construct($filter) {
|
||||
new \SYSTEM\LOG\INFO($filter);
|
||||
$this->filter = $filter;
|
||||
}
|
||||
|
||||
@ -30,7 +29,6 @@ class default_list extends \SYSTEM\PAGE\Page {
|
||||
$element['title'] = $element['id'];
|
||||
$result .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_list/element.tpl'), $element);
|
||||
}
|
||||
new \SYSTEM\LOG\INFO($result);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div class="list_element" style="width: 750px; margin: auto; margin-bottom: 50px; padding: 20px;">
|
||||
<div class="list_element" text_id="${tag_id}" style="width: 750px; margin: auto; margin-bottom: 50px; padding: 20px;">
|
||||
<p style="float: left; font-size: 10pt; margin-top: 7px;">Author: <i>${author}</i></p>
|
||||
<p style="float: right; font-size: 10pt; margin-top: 7px;">Veröffentlicht: ${timestamp}</p>
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
@ -10,24 +10,26 @@
|
||||
<body>
|
||||
<div style="margin: auto;">
|
||||
<img src="http://www.mojotrollz.eu/web/smaLi/api.php?call=files&cat=files&id=neopolimatrix.png"/>
|
||||
</div>
|
||||
|
||||
<div style="float: right; text-align: left;">
|
||||
<div style="float: right; text-align: left;">
|
||||
<a href="http://www.mojotrollz.eu/web/Neopolimatrix">Blog</a>
|
||||
<a href="#" id="btn_impressum">Impressum</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="clear: both;"></div>
|
||||
<div class="tabbable" style="margin-bottom: 20px;">
|
||||
<ul class="nav nav-tabs" id="tabs_user_list">
|
||||
<li><p style="padding-top: 10px; font-size: 13pt; margin-right: 30px; margin-left: 7px;">Nach Themen</p></li>
|
||||
<p style="padding-top: 10px; font-size: 13pt; margin-right: 30px; margin-left: 7px; float: left;">Nach Themen</p>
|
||||
<ul class="nav nav-tabs" id="tabs_user_list">
|
||||
<li class="active"><a href="#" filter="1">Neu</a></li>
|
||||
<li><a href="#" filter="2">Überwachung</a></li>
|
||||
<li><a href="#" filter="3">Ungleicheit</a></li>
|
||||
<li><a href="#" filter="3">Ungleichheit</a></li>
|
||||
<li><a href="#" filter="4">Korruption</a></li>
|
||||
<button style="float: right; margin-top: 7px; margin-right: 7px; padding: 2px;"class="btn btn-info" id="nav_search_btn">los geht's!</button>
|
||||
<input style="float: right; margin-top: 7px; margin-right: 7px;" type="text" id="nav_search" placeholder="Suchbegriff eingeben">
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div id="contentframe" style="margin: auto;">
|
||||
</div>
|
||||
|
||||
@ -4,6 +4,18 @@ $(document).ready(function() {
|
||||
load_list(1);
|
||||
});
|
||||
|
||||
|
||||
function btn_element(){
|
||||
$(".list_element").click(function(){
|
||||
load_element($(this).attr('text_id'));
|
||||
});
|
||||
}
|
||||
|
||||
function load_element(text_id){
|
||||
$('#contentframe').load('./?page=get_element&text_id=' + text_id, function(){
|
||||
});
|
||||
}
|
||||
|
||||
function impressum(){
|
||||
$("#btn_impressum").click(function(){
|
||||
$('#contentframe').load('./?page=impressum', function(){
|
||||
@ -15,14 +27,15 @@ function impressum(){
|
||||
|
||||
function tabs(){
|
||||
$("#tabs_user_list a").click(function(){
|
||||
load_list($(this).attr('filter'));
|
||||
load_list($(this).attr('filter'));
|
||||
$(this).tab('show');
|
||||
btn_element();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function load_list(filter){
|
||||
$('#contentframe').load('./?page=get_list&filter=' + filter, function(){
|
||||
|
||||
btn_element();
|
||||
});
|
||||
}
|
||||
@ -5,6 +5,9 @@ class page_neopolimatrix extends \SYSTEM\API\api_default {
|
||||
|
||||
public static function page_get_list($filter){
|
||||
return new default_list($filter);}
|
||||
|
||||
public static function page_get_element($text_id){
|
||||
return new default_element($text_id);}
|
||||
|
||||
public static function page_impressum(){
|
||||
return new impressum();}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user