This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "quickfw".
The branch, master has been updated
via 97d4f68175e4d11ec2cb0204f39cfdabf31ba18a (commit)
from f1fb8f6edc5300930e14606b77bba0e99c7e6ceb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 97d4f68175e4d11ec2cb0204f39cfdabf31ba18a
Author: Ivan1986 <iva...@li...>
Date: Wed Aug 4 11:39:31 2010 +0400
* Добавлены опции в скафолдинг
diff --git a/lib/Modules/Scafold/ScafoldController.php b/lib/Modules/Scafold/ScafoldController.php
index f1c9cc2..6c31f06 100644
--- a/lib/Modules/Scafold/ScafoldController.php
+++ b/lib/Modules/Scafold/ScafoldController.php
@@ -38,6 +38,12 @@ abstract class ScafoldController extends Controller
/** @var array ссылка на сессию таблицы */
protected $sess = array();
+ //Опции
+ /** @var bool Ссылка добавить внизу страницы */
+ protected $addOnBottom = false;
+ /** @var bool Показывать картинки при сортировке */
+ protected $sortImages = false;
+
/** @var array Массив методов */
private $methods;
/** @var boolean Флаг окончания настройки */
@@ -126,6 +132,10 @@ abstract class ScafoldController extends Controller
'actions' => $this->actions,
'table' => str_replace('?_', '', $this->table),
'session' => $this->sess,
+ 'options' => array(
+ 'addOnBottom' => $this->addOnBottom,
+ 'sortImages' => $this->sortImages,
+ ),
));
}
diff --git a/lib/Modules/Scafold/scafold/index.html b/lib/Modules/Scafold/scafold/index.html
index d5e4354..75b31ca 100644
--- a/lib/Modules/Scafold/scafold/index.html
+++ b/lib/Modules/Scafold/scafold/index.html
@@ -16,14 +16,16 @@
?>
<th><a href="<?php echo Url::C('sort/'.$key) ?>"><?php echo $i->title ?></a>
<?php if (isset($order) && $order['field'] == $key) { ?><span class="scafoldSort">
- <span><?php echo $order['direction']=='ASC' ? '↓' : '↑' ?></span>
- <?php /*<img src="/buildin/<?php echo $order['direction']=='ASC' ? 'az' : 'za' ?>.png"
- alt="<?php echo $order['direction']=='ASC' ? '↓' : '↑' ?>" />*/?>
+ <?php if ($options['sortImages']) {?>
+ <img src="/buildin/<?php echo $order['direction']=='ASC' ? 'az' : 'za' ?>.png"
+ alt="<?php echo $order['direction']=='ASC' ? '↓' : '↑' ?>" />
+ <?php } else { ?>
+ <span><?php echo $order['direction']=='ASC' ? '↓' : '↑' ?></span>
+ <?php } ?>
</span><?php } ?>
</th>
<?php } ?>
- <th><a href="<?php echo Url::C('edit/-1') ?>">доб.</a></th>
- <th> </th>
+ <th colspan="2"><a href="<?php echo Url::C('edit/-1') ?>">доб.</a></th>
<?php if (count($actions)) { ?><th>действия</th><?php } ?>
</tr>
<?php foreach($data as $id=>$row) { ?>
@@ -49,6 +51,7 @@
</tr>
<?php } ?>
</table>
+<?php if ($options['addOnBottom']) {?><a href="<?php echo Url::C('edit/-1') ?>">добавить</a><?php } ?>
<?php } else { ?>
Записей нет
<a href="<?php echo Url::C('edit/-1') ?>">добавить</a>
-----------------------------------------------------------------------
Summary of changes:
lib/Modules/Scafold/ScafoldController.php | 10 ++++++++++
lib/Modules/Scafold/scafold/index.html | 13 ++++++++-----
2 files changed, 18 insertions(+), 5 deletions(-)
hooks/post-receive
--
quickfw
|