|
From: <txm...@us...> - 2014-03-14 08:46:58
|
Revision: 12375
http://sourceforge.net/p/xoops/svn/12375
Author: txmodxoops
Date: 2014-03-14 08:46:54 +0000 (Fri, 14 Mar 2014)
Log Message:
-----------
Moved all html code in templates files
Modified Paths:
--------------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/footer.php
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php
Added Paths:
-----------
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_about.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_footer.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_header.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_help.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_index.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html
XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php 2014-03-14 08:06:01 UTC (rev 12374)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/about.php 2014-03-14 08:46:54 UTC (rev 12375)
@@ -19,6 +19,7 @@
* @version $Id: about.php 11084 2013-02-23 15:44:20Z timgno $
*/
include 'header.php';
-echo $adminMenu->addNavigation('about.php');
-echo $adminMenu->renderabout('6KJ7RW5DR3VTJ', false);
+$xoopsOption['template_main'] = 'tdmcreate_about.html';
+$xoopsTpl->assign('navigation', $adminMenu->addNavigation('about.php'));
+$xoopsTpl->assign('about', $adminMenu->renderAbout('6KJ7RW5DR3VTJ', false));
include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-03-14 08:06:01 UTC (rev 12374)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/building.php 2014-03-14 08:46:54 UTC (rev 12375)
@@ -50,22 +50,20 @@
$nb_tables = $tablesHandler->getCount($criteria);
$tables_arr = $tablesHandler->getAll($criteria);
-
-echo $adminMenu->addNavigation('building.php');
+$xoopsOption['template_main'] = 'tdmcreate_building.html';
+$xoopsTpl->assign('navigation', $adminMenu->addNavigation('building.php'));
switch ($op) {
case 'build':
// Effacer repertoire of nouveau module s'il existe
TDMCreate_clearDir($modPath.'/modules/'.strtolower($mod_name));
// Debut
- TDMCreate_OpenTable(_AM_TDMCREATE_BUILDING_FILES, _AM_TDMCREATE_BUILDING_SUCCESS, _AM_TDMCREATE_BUILDING_FAILED);
+ $xoopsTpl->assign('open_table', TDMCreate_OpenTable(_AM_TDMCREATE_BUILDING_FILES, _AM_TDMCREATE_BUILDING_SUCCESS, _AM_TDMCREATE_BUILDING_FAILED));
/************************************************/
/*Structure*/
/************************************************/
//Creation of the structure of folders and files
-
- echo 'Under new construction';
-
- TDMCreate_CloseTable();
+ $xoopsTpl->assign('build_list', 'Under new construction - Temporary build');
+ $xoopsTpl->assign('close_table', TDMCreate_CloseTable());
break;
case 'default':
@@ -81,7 +79,7 @@
$form->addElement(new XoopsFormHidden('op', 'build'));
$form->addElement(new XoopsFormButton(_REQUIRED.' <span class="red bold">*</span>', 'submit', _SUBMIT, 'submit'));
- $form->display();
+ $xoopsTpl->assign('form', $form->display());
break;
}
include 'footer.php';
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/footer.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/footer.php 2014-03-14 08:06:01 UTC (rev 12374)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/footer.php 2014-03-14 08:46:54 UTC (rev 12375)
@@ -18,10 +18,7 @@
* @author Txmod Xoops http://www.txmodxoops.org
* @version $Id: footer.php 12207 2013-10-23 02:46:52Z beckmi $
*/
-echo "<div align='center'><a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'>
- <img src='".$pathIcon32."/xoopsmicrobutton.gif' alt='XOOPS' /></a></div>";
-echo "<div class='center smallsmall italic pad5'>
- <strong>" . $xoopsModule->getVar('name') . "</strong> is maintained by the
- <a href='http://xoops.org/forums/newbb' title='Visit Support Forum' class='tooltip' rel='external'>Support Forum</a></div>";
+
+$xoopsTpl->assign('module_name', $xoopsModule->getVar('name'));
xoops_cp_footer();
?>
\ No newline at end of file
Modified: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php 2014-03-14 08:06:01 UTC (rev 12374)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/admin/index.php 2014-03-14 08:46:54 UTC (rev 12375)
@@ -19,14 +19,16 @@
* @version $Id: index.php 11084 2013-02-23 15:44:20Z timgno $
*/
include 'header.php';
- $criteria = new CriteriaCompo();
- $count_modules = $modulesHandler->getCount($criteria);
- $count_tables = $tablesHandler->getCount($criteria);
+$criteria = new CriteriaCompo();
+$count_modules = $modulesHandler->getCount($criteria);
+$count_tables = $tablesHandler->getCount($criteria);
+unset($criteria);
+
$adminMenu->addInfoBox(_AM_TDMCREATE_ADMIN_NUMMODULES) ;
$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' ._AM_TDMCREATE_THEREARE_NUMMODULES. '</label>', $count_modules, 'Green') ;
$adminMenu->addInfoBoxLine(_AM_TDMCREATE_ADMIN_NUMMODULES, '<label>' ._AM_TDMCREATE_THEREARE_NUMTABLES. '</label>', $count_tables, 'Orange');
-
- echo $adminMenu->addNavigation('index.php');
- echo $adminMenu->renderIndex();
+$xoopsOption['template_main'] = 'tdmcreate_index.html';
+$xoopsTpl->assign('navigation', $adminMenu->addNavigation('index.php'));
+$xoopsTpl->assign('index', $adminMenu->renderIndex());
include 'footer.php';
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_about.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_about.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_about.html 2014-03-14 08:46:54 UTC (rev 12375)
@@ -0,0 +1,4 @@
+<!-- Header -->
+<{includeq file="db:tdmcreate_header.html"}>
+<!-- About Page -->
+<div class="top"><{$about}></div>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_building.html 2014-03-14 08:46:54 UTC (rev 12375)
@@ -0,0 +1,9 @@
+<!-- Header -->
+<{includeq file="db:tdmcreate_header.html"}>
+<!-- Display building form -->
+<br />
+<{if $form}>
+ <{$form}>
+<{else}>
+ <{$build_list}>
+<{/if}>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_fields.html 2014-03-14 08:46:54 UTC (rev 12375)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_footer.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_footer.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_footer.html 2014-03-14 08:46:54 UTC (rev 12375)
@@ -0,0 +1,5 @@
+<div class='center'><a href='http://www.xoops.org' title='Visit XOOPS' target='_blank'>
+ <img src="<{$xoModuleIcons32 xoopsmicrobutton.gif}>" alt='XOOPS' /></a></div>
+<div class='center smallsmall italic pad5'>
+ <strong><{$module_name}></strong> is maintained by the
+ <a href='http://xoops.org/forums/newbb' title='Visit Support Forum' class='tooltip' rel='external'>Support Forum</a></div>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_header.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_header.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_header.html 2014-03-14 08:46:54 UTC (rev 12375)
@@ -0,0 +1,4 @@
+<div class="top">
+<span class="left"><{$navigation}></span>
+<{if $button_new}><span class="right"><{$button_new}> </span><{/if}><{if $button_list}><span class="right"> <{$button_list}></span><{/if}>
+</div>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_help.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_help.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_help.html 2014-03-14 08:46:54 UTC (rev 12375)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_index.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_index.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_index.html 2014-03-14 08:46:54 UTC (rev 12375)
@@ -0,0 +1,4 @@
+<!-- Header -->
+<{includeq file="db:tdmcreate_header.html"}>
+<!-- Index Page -->
+<div class="top"><{$index}></div>
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_modules.html 2014-03-14 08:46:54 UTC (rev 12375)
@@ -0,0 +1,60 @@
+<!-- Header -->
+<{includeq file="db:tdmcreate_header.html"}>
+<!-- Display modules list -->
+<{if $modules_list}>
+ <table width='100%' cellspacing='1' class='outer'>
+ <tr>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_ID}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NAME}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_VERSION}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_IMAGE}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_RELEASE}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_STATUS}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_ADMIN_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_USER_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_SUBMENU_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_SEARCH_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_COMMENTS_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NOTIFICATIONS_LIST}></th>
+ <th class='center width5'><{$smarty.const._AM_TDMCREATE_FORMACTION}></th>
+ </tr>
+ <{foreach item=module from=$modules_list}>
+ <tr class="<{cycle values='odd,even'}>">
+ <td class='center'><{$module.mod_id}></td>
+ <td class='center'><{$module.mod_name}></td>
+ <td class='center'><{$module.mod_version}></td>
+ <td class='center'><img src="<{$tdmc_upload_url}>/images/modules/<{$module.mod_image}>" height="32" /></td>
+ <td class='center'><{$module.mod_release}></td>
+ <td class='center'><{$module.mod_status}></td>
+ <td class='center'><{$module.mod_admin}></td>
+ <td class='center'><{$module.mod_user}></td>
+ <td class='center'><{$module.mod_submenu}></td>
+ <td class='center'><{$module.mod_search}></td>
+ <td class='center'><{$module.mod_comments}></td>
+ <td class='center'><{$module.mod_notifications}></td>
+
+ <td class='xo-actions txtcenter width5'>
+ <a href="modules.php?op=edit&mod_id=<{$module.mod_id}>" title="<{$smarty.const._EDIT}>">
+ <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._EDIT}>" height="16" />
+ </a>
+ <a href="modules.php?op=delete&mod_id=<{$module.mod_id}>" title="<{$smarty.const._DELETE}>">
+ <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._DELETE}>" height="16" />
+ </a>
+ </td>
+ </tr>
+ <{/foreach}>
+ </table><br /><br />
+<!-- Display modules navigation -->
+<div class="clear"> </div>
+<{if $pagenav}><div class="xo-pagenav floatright"><{$pagenav}></div><div class="clear spacer"></div><{/if}>
+<{/if}>
+<{if $error}>
+<div class="errorMsg">
+ <strong><{$error}></strong>
+</div>
+<{/if}>
+<!-- Display module form (add,edit) -->
+<{if $form}>
+<div class="spacer"><{$form}></div>
+<{/if}>
+<!-- Display module images on edit page -->
\ No newline at end of file
Added: XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html
===================================================================
--- XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html (rev 0)
+++ XoopsModules/TDMCreate/branches/timgno/1.91/TDMCreate/templates/admin/tdmcreate_tables.html 2014-03-14 08:46:54 UTC (rev 12375)
@@ -0,0 +1,84 @@
+<!-- Header -->
+<{includeq file="db:tdmcreate_header.html"}>
+<!-- Display modules list -->
+<{if $modules_list}>
+ <table width='100%' cellspacing='1' class='outer'>
+ <tr>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_ID}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NAME}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_IMAGE}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NBFIELDS}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_BLOCKS}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_ADMIN_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_USER_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_SUBMENU_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_SEARCH_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_COMMENTS_LIST}></th>
+ <th class='center'><{$smarty.const._AM_TDMCREATE_MODULE_NOTIFICATIONS_LIST}></th>
+ <th class='center width6'><{$smarty.const._AM_TDMCREATE_FORMACTION}></th>
+ </tr>
+ <{foreach item=module from=$modules_list}>
+ <tr class="head toggleTables">
+ <td class='center'><{$module.id}><br /><img src="<{$tdmc_url}>/images/icons/16/toggle.png" alt="Toggle" title="Toggle" /></td>
+ <td class='center'><{$module.name}></td>
+ <td class='center'><img src="<{$tdmc_upload_url}>/images/modules/<{$module.image}>" height="32" /></td>
+ <td class='center'><img src="<{$tdmc_url}>/images/icons/16/nb_fields.png" height="16" /></td>
+ <td class='center'><img src="<{$tdmc_url}>/images/icons/16/blocks.png" height="16" /></td>
+ <td class='center'><{$module.admin}></td>
+ <td class='center'><{$module.user}></td>
+ <td class='center'><{$module.submenu}></td>
+ <td class='center'><{$module.search}></td>
+ <td class='center'><{$module.comments}></td>
+ <td class='center'><{$module.notifications}></td>
+
+ <td class='xo-actions txtcenter width6'>
+ <a href="modules.php?op=edit&mod_id=<{$module.id}>" title="<{$smarty.const._EDIT}>">
+ <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._EDIT}>" height="16" />
+ </a>
+ <a href="modules.php?op=delete&mod_id=<{$module.id}>" title="<{$smarty.const._DELETE}>">
+ <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._DELETE}>" height="16" />
+ </a>
+ </td>
+ </tr>
+ <{foreach item=table from=$module.tables}>
+ <tr class="<{cycle values='even,odd'}> toggleHidden">
+ <td class='center'><{$table.id}></td>
+ <td class='center'><{$table.name}></td>
+ <td class='center'><img src="<{$pathIcon32}>/<{$table.image}>" alt="<{$table.name}>" height="32" /></td>
+ <td class='center'><{$table.nbfields}></td>
+ <td class='center'><{$table.blocks}></td>
+ <td class='center'><{$table.admin}></td>
+ <td class='center'><{$table.user}></td>
+ <td class='center'><{$table.submenu}></td>
+ <td class='center'><{$table.search}></td>
+ <td class='center'><{$table.comments}></td>
+ <td class='center'><{$table.notifications}></td>
+ <td class='xo-actions txtcenter width5'>
+ <a href="tables.php?op=edit&table_id=<{$table.id}>" title="<{$smarty.const._EDIT}>">
+ <img src="<{xoAdminIcons edit.png}>" alt="<{$smarty.const._EDIT}>" height="16" />
+ </a>
+ <a href="fields.php?op=edit&field_tid=<{$table.id}>" title="<{$smarty.const._EDIT}>">
+ <img src="<{$tdmc_url}>/images/icons/16/editfields.png" alt="<{$smarty.const._EDIT}>" height="16" />
+ </a>
+ <a href="tables.php?op=delete&table_id=<{$table.id}>" title="<{$smarty.const._DELETE}>">
+ <img src="<{xoAdminIcons delete.png}>" alt="<{$smarty.const._DELETE}>" height="16" />
+ </a>
+ </td>
+ </tr>
+ <{/foreach}>
+ <{/foreach}>
+ </table><br /><br />
+<!-- Display modules navigation -->
+<div class="clear"> </div>
+<{if $pagenav}><div class="xo-pagenav floatright"><{$pagenav}></div><div class="clear spacer"></div><{/if}>
+<{/if}>
+<{if $error}>
+<div class="errorMsg">
+ <strong><{$error}></strong>
+</div>
+<{/if}>
+<!-- Display module form (add,edit) -->
+<{if $form}>
+<div class="spacer"><{$form}></div>
+<{/if}>
+<!-- Display module images on edit page -->
|