list api working now with menu function.

started search fulltext search.
new title img
This commit is contained in:
Naeltard 2015-01-20 22:14:42 +01:00
parent c1ea77e598
commit b3b0baee30
14 changed files with 83 additions and 35 deletions

View File

@ -7,5 +7,5 @@ class NEOPOLIMATRIX_GENERATE_ELEMENTLIST extends \SYSTEM\DB\QP {
//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_string like ?;'
'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_string like ? ORDER by timestamp DESC;'
);}}

View File

@ -0,0 +1,11 @@
<?php
namespace DBD;
class NEOPOLIMATRIX_GENERATE_ELEMENTLIST_FULLTEXT_SEARCH extends \SYSTEM\DB\QP {
protected static function query(){
return new \SYSTEM\DB\QQuery(get_class(),
//pg
'',
//mys
'SELECT * FROM system_locale_string WHERE deDE like ?;'
);}}

View File

@ -1,2 +1,3 @@
<?php
//include here
\SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
require_once dirname(__FILE__).'/register_files.php';

View File

@ -0,0 +1,2 @@
<?php
\SYSTEM\FILES\files::registerFolder(dirname(__FILE__).'/person/','person','*');

View File

@ -2,4 +2,5 @@
SYSTEM\autoload::registerFolder(dirname(__FILE__),'');
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_page','');
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/default_list','');
SYSTEM\autoload::registerFolder(dirname(__FILE__).'/impressum','');

View File

@ -12,7 +12,9 @@ class default_list extends \SYSTEM\PAGE\Page {
case 1:
return '%';
case 2:
return '"%Überwachung%"';
return '%surveillance%';
case 3:
return '%verteilung%';
default:
return 'filter fail';}
@ -26,13 +28,13 @@ 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;
}
public function html(){
$vars = array();
$vars['content'] = $this->generate_list();
new SYSTEM\LOG\INFO(print_r($vars['content']), TRUE);
$vars['list'] = $this->generate_list();
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_list/default_list.tpl'), $vars);
}
}

View File

@ -1,2 +1 @@
${content}
test
${list}

View File

@ -1,4 +1,4 @@
<div style="width: 750px; margin: auto; margin-bottom: 50px;">
<div class="list_element" 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>

View File

@ -6,7 +6,7 @@ body{
text-align: center;
margin: 0;
padding: 0;
padding-top: 50px;
padding-top: 10px;
}
#main_container{
@ -15,17 +15,6 @@ body{
margin: 0 auto;
}
#header_container{
width: 70%;
.list_element:hover {
background-color: #EEE;
}
#header_left{
font-size: 25pt;
float: left;
}
#header_right{
float: right;
}

View File

@ -8,24 +8,27 @@
${js}
</head>
<body>
<h2>Neo-PoliMatrix</h2>
<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;">
<a href="http://www.mojotrollz.eu/web/Neopolimatrix">Blog</a>&nbsp;&nbsp;
<a href="#tab_default" action="user_list_active">Impressum</a>
<a href="#contentframe" id="btn_impressum">Impressum</a>
</div>
<div style="clear: both;"></div>
<div class="tabbable" id="">
<div class="tabbable" style="margin-bottom: 20px;">
<ul class="nav nav-tabs" id="tabs_user_list">
<li class="active"><a href="#contentframe" filter="1">Neu</a></li>
<li class="li_cat"><a href="#contentframe" filter="2">Überwachung</a></li>
<li><p style="padding-top: 10px; font-size: 13pt; margin-right: 30px; margin-left: 7px;">Nach Themen</p></li>
<li class="active"><a href="#" filter="1">Neu</a></li>
<li><a href="#" filter="2">Überwachung</a></li>
<li><a href="#" filter="3">Verteilung</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>
<div id="contentframe" style="margin: auto;">
${content}
<div id="contentframe" style="margin: auto;">
</div>
<div id="bottombar" style="width: 100%; min-height: 30px; background: black; position: relative; bottom: 0;">
</div>

View File

@ -1,11 +1,26 @@
$(document).ready(function() {
tabs();
search();
load_list(1);
});
$(document).ready(function() {
$("#tabs_user_list a").click(function(){
function search(){
$("#btn_impressum").click(function(){
alert('abc');
$('#contentframe').load('./?page=impressum', function(){
});
$(this).tab('show');
});
}
function tabs(){
$("#tabs_user_list a").click(function(){
load_list($(this).attr('filter'));
$(this).tab('show');
});
});
});
}
function load_list(filter){
$('#contentframe').load('./?page=get_list&filter=' + filter, function(){

View File

@ -0,0 +1,17 @@
<?php
class impressum extends \SYSTEM\PAGE\Page {
public function html(){
$vars = array();
$vars = array_merge($vars, \SYSTEM\locale::getStrings(101));
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'impressum/impressum.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.
*/

View File

@ -0,0 +1,3 @@
<div style="width: 750px; margin: auto; margin-bottom: 50px;">
${Impressum}
</div>

View File

@ -5,4 +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_impressum(){
return new impressum();}
}