renamed libuserlist to syncing, which is more appropriate, also made pagination work! so Now I can start to use it ingame too!

This commit is contained in:
Quitta 2013-08-05 05:37:18 +02:00
parent e5d5cfe0cc
commit cee8bbc495
6 changed files with 17 additions and 90 deletions

View file

@ -1,73 +0,0 @@
{block name=content}
<div class="row-fluid">
<div class="box span12">
<div class="box-header well">
<h2><i class="icon-info-sign"></i>{$libuserlist_title}</h2>
<div class="box-icon">
<a href="#" class="btn btn-round" onclick="javascript:show_help('intro');return false;"><i class="icon-info-sign"></i></a>
<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
</div>
</div>
<div class="box-content">
<center>
<p>{$libuserlist_info}</p>
{if $shard eq "online"}
<div class="alert alert-success">
<i class="icon-refresh icon-white"></i>{$shard_online}<a href="#" id="sync" onclick="sync()">{$libuserlist_sync}</a>
<script>
function sync(){
xmlhttp=new XMLHttpRequest();
xmlhttp.open("POST","../../../ams_lib/cron/sync_cron.php",true);
xmlhttp.send();
}
</script>
</div>
{else}
<div class="alert alert-error">
<strong><i class="icon-refresh icon-white"></i></strong> {$shard_offline}
</div>
{/if}
</center>
<div class="clearfix"></div>
</div>
</div>
</div>
<div class="row-fluid sortable">
<div class="box span12">
<div class="box-header well" data-original-title>
<h2><i class="icon-user"></i> {$members}</h2>
<div class="box-icon">
<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
<a href="#" class="btn btn-close btn-round"><i class="icon-remove"></i></a>
</div>
</div>
<div class="box-content">
<table class="table table-striped table-bordered bootstrap-datatable datatable">
<thead>
<tr>
<th>{$id}</th>
<th>{$type}</th>
</tr>
</thead>
<tbody>
{foreach from=$liblist item=element}
<tr>
<td>{$element.id}</td>
<td class="center">{$element.type}</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div><!--/span-->
</div><!--/row-->
{/block}

View file

@ -7,10 +7,10 @@ home_info = "Welcome to the Ryzom Core - Account Management System"
[settings]
[libuserlist]
libuserlist_title = "LibDB-Query List"
libuserlist_info = "Here you can see the entire list of elements in the LibDB-Query table. You can easily remove elements and by pressing 'Synchronize' you can start the syncing process manually!"
libuserlist_sync = "Synchronize"
[syncing]
syncing_title = "LibDB-Query List"
syncing_info = "Here you can see the entire list of elements in the LibDB-Query table. You can easily remove elements and by pressing 'Synchronize' you can start the syncing process manually!"
syncing_sync = "Synchronize"
shard_online = "The shard seems to be <strong>online</strong>, manually syncing is possible: "
shard_offline = "The shard seems to be <strong>offline</strong>, manually syncing is not possible!"
members = "Members"

View file

@ -7,10 +7,10 @@ home_info = "Bienvenue sur le Ryzom Core - Account Management System"
[settings]
[libuserlist]
libuserlist_title = "LibDB-Query Liste"
libuserlist_info = "Ici vous pouvez voir la liste complete des elements dans le tableau libdb-Query. Vous pouvez facilement supprimer des elements et appuyant sur 'Synchroniser', vous pouvez commencer le processus de synchronisation manuellement!"
libuserlist_sync = "Synchroniser"
[syncing]
syncing_title = "LibDB-Query Liste"
syncing_info = "Ici vous pouvez voir la liste complete des elements dans le tableau libdb-Query. Vous pouvez facilement supprimer des elements et appuyant sur 'Synchroniser', vous pouvez commencer le processus de synchronisation manuellement!"
syncing_sync = "Synchroniser"
shard_online = "Le shard semble etre <strong> ligne </strong>, la synchronisation manuellement est possible: "
shard_offline = "Le shard semble etre <strong> deconnecte </strong>, la synchronisation manuellement n' est pas possible!"
members = "Membres"

View file

@ -1,10 +1,10 @@
<?php
function libuserlist(){
function syncing(){
if(Ticket_User::isAdmin($_SESSION['ticket_user'])){
$pagination = new Pagination("SELECT * FROM ams_querycache","lib",2,"Querycache");
$pagination = new Pagination("SELECT * FROM ams_querycache","lib",5,"Querycache");
$pageResult['liblist'] = Gui_Elements::make_table($pagination->getElements() , Array("getSID","getType"), Array("id","type"));
$pageResult['links'] = $pagination->getLinks(5);
$pageResult['lastPage'] = $pagination->getLast();

View file

@ -9,7 +9,7 @@
<li style="margin-left: -2px;"><a class="ajax-link" href="index.php?page=show_queue&get=todo"><i class="icon-th-list"></i><span class="hidden-tablet"> Queues</span></a></li>
<li style="margin-left: -2px;"><a class="ajax-link" href="index.php?page=sgroup_list"><i class="icon-briefcase"></i><span class="hidden-tablet"> Support Groups</span></a></li>
<li class="nav-header hidden-tablet">Actions</li>
<li style="margin-left: -2px;"><a class="ajax-link" href="index.php?page=libuserlist"><i class="icon-th-list"></i><span class="hidden-tablet"> Syncing</span></a></li>
<li style="margin-left: -2px;"><a class="ajax-link" href="index.php?page=syncing"><i class="icon-th-list"></i><span class="hidden-tablet"> Syncing</span></a></li>
<li style="margin-left: -2px;"><a href="?page=logout"><i class="icon-off"></i><span class="hidden-tablet"> Logout </span></a></li>
{/block}

View file

@ -3,7 +3,7 @@
<div class="row-fluid">
<div class="box span12">
<div class="box-header well">
<h2><i class="icon-info-sign"></i>{$libuserlist_title}</h2>
<h2><i class="icon-info-sign"></i>{$syncing_title}</h2>
<div class="box-icon">
<a href="#" class="btn btn-round" onclick="javascript:show_help('intro');return false;"><i class="icon-info-sign"></i></a>
<a href="#" class="btn btn-setting btn-round"><i class="icon-cog"></i></a>
@ -13,10 +13,10 @@
</div>
<div class="box-content">
<center>
<p>{$libuserlist_info}</p>
<p>{$syncing_info}</p>
{if $shard eq "online"}
<div class="alert alert-success">
<i class="icon-refresh icon-white"></i>{$shard_online}<a href="#" id="sync" onclick="sync()">{$libuserlist_sync}</a>
<i class="icon-refresh icon-white"></i>{$shard_online}<a href="#" id="sync" onclick="sync()">{$syncing_sync}</a>
<script>
function sync(){
xmlhttp=new XMLHttpRequest();
@ -67,11 +67,11 @@
</table>
<div style="width: 300px; margin:0px auto;">
<ul class="pagination">
<li><a href="index.php?page=sync&pagenum=1">&laquo;</a></li>
<li><a href="index.php?page=syncing&pagenum=1">&laquo;</a></li>
{foreach from=$links item=link}
<li {if $link == $currentPage}class="active"{/if}><a href="index.php?page=sync&pagenum={$link}">{$link}</a></li>
<li {if $link == $currentPage}class="active"{/if}><a href="index.php?page=syncing&pagenum={$link}">{$link}</a></li>
{/foreach}
<li><a href="index.php?page=sync&pagenum={$lastPage}">&raquo;</a></li>
<li><a href="index.php?page=syncing&pagenum={$lastPage}">&raquo;</a></li>
</ul>
</div>
</div>