From 176dafe188b2c2486db9889d1c8b56c7f4ebe18a Mon Sep 17 00:00:00 2001 From: stevetruckstuff Date: Thu, 17 Aug 2006 22:26:41 +0000 Subject: [PATCH] Add template for field ordering git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11610 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/options_order.php | 93 ++++------------------------- templates/default/options_order.tpl | 91 ++++++++++++++++++++++++++++ templates/default/stylesheet.tpl | 37 ++++++++++++ 3 files changed, 139 insertions(+), 82 deletions(-) create mode 100644 templates/default/options_order.tpl diff --git a/src/options_order.php b/src/options_order.php index cd3c2d40..77f2b4ad 100644 --- a/src/options_order.php +++ b/src/options_order.php @@ -1,5 +1,4 @@ assign('fields', $available); +$oTemplate->assign('current_order', $index_order); +$oTemplate->assign('not_used', $opts); +$oTemplate->assign('always_show', array(SQM_COL_SUBJ, SQM_COL_FLAGS)); -viewOrderForm($available, $index_order,$opts,urldecode($mailbox)); - - -// FOOD for html designers -function viewOrderForm($aColumns, $aOrder, $aOpts, $mailbox) { - global $color; -?> - - - - -
- - - - - -
- - - - -
- -
-
- - - - $iCol) { - $sQuery = "&num=$iCol"; - if (isset($mailbox) && $mailbox) { - $sQuery .= '&mailbox='.urlencode($mailbox); - } - -?> - - - - - - - - - - - - - - - - - - - - - - -
  |    |    | 
+$oTemplate->assign('move_up', $PHP_SELF .'?method=move&positions=-1'. $x .'&num='); +$oTemplate->assign('move_down', $PHP_SELF .'?method=move&positions=1'. $x .'&num='); +$oTemplate->assign('remove', $PHP_SELF .'?method=remove'. $x .'&num='); +$oTemplate->assign('addField_action', $PHP_SELF); -'; - } -?> -


-
-
+$oTemplate->display('options_order.tpl'); -display('footer.tpl'); ?> \ No newline at end of file diff --git a/templates/default/options_order.tpl b/templates/default/options_order.tpl new file mode 100644 index 00000000..ca933b85 --- /dev/null +++ b/templates/default/options_order.tpl @@ -0,0 +1,91 @@ + +
+ + + + + + + + + + + 0) { + ?> + + + + + + + +
+ +
+ +
+ + $index) { + echo " \n"; + + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + + echo " \n"; + } + ?> +
\n" .($order > 0 ? '' ._("up") .'' : ' '). "\n \n" .($order < count($current_order)-1 ? '' ._("down") .'' : ' '). "\n \n" .(!in_array($index, $always_show) ? '' ._("remove") .'' : ' '). "\n \n" .$fields[$index]. "\n
+
+
method="GET"> + + + name="submit" /> +
+
+ +
+
\ No newline at end of file diff --git a/templates/default/stylesheet.tpl b/templates/default/stylesheet.tpl index e43d58a6..98d92ffe 100644 --- a/templates/default/stylesheet.tpl +++ b/templates/default/stylesheet.tpl @@ -530,4 +530,41 @@ tr.odd { #optionDisplay td.optionValue { text-align: left; +} + +#optionHighlight { + text-align:center; +} + +#optionHighlight table { + margin-left: auto; + margin-right: auto; + margin-top: 8px; + margin-bottom: 8px; + width: 95%; + border: 1px solid +} + +#optionHighlight table.moveFields { + width: auto; +} + +#optionHighlight table.moveFields td { + border-left: 1px solid ; + border-right: 1px solid ; + padding-left: 2px; + padding-right: 2px; +} + +#optionHighlight td.moveLink { + text-align: center; + font-size: 75%; +} + +#optionHighlight td.fieldName { + text-align: left; +} + +#optionHighlight select,input { + font-size: 75%; } \ No newline at end of file -- 2.25.1