Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Маленький предварительный рефакторинг модуля price и перевод его на п…
…оддержку шаблонов mustache
- Loading branch information
1 parent
85db8e6
commit de4fa03
Showing
10 changed files
with
173 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
echo '<div class="form hAsideCharFilter" id="priceFilter">'; | ||
$action = preg_replace('/\?[^\?]*$/','',$_SERVER["REQUEST_URI"]); | ||
$form = $this->beginWidget('CActiveForm', array( | ||
'id'=>'priceFilterForm', | ||
'method'=>'get', | ||
'action'=>$action, | ||
'enableAjaxValidation'=>false, | ||
'enableClientValidation'=>false, | ||
)); | ||
|
||
echo '<p class="row" style="margin-top: 0;padding-top: 0;">' . $form->labelEx($prod, 'name') . $form->textField($prod, 'name') . '</p>'; | ||
// FIXME: убрано до лучших времен. нужно либо сделать настроку отображения фильтрации | ||
// по файлам в админке, либо отказаться от этого функционала | ||
// echo '<p class="row">' . $form->labelEx($prod, 'file_id') . $form->dropDownList($prod, 'file_id', $priceChoises) . '</p>'; | ||
foreach($cats as $columnId => $cat) | ||
echo '<p class="row">' . $form->labelEx($prod, $columnId) . $form->dropDownList($prod, $columnId, $cat) . '</p>'; | ||
|
||
$this->widget('ext.jui.HFilterRangeSlider', array( | ||
'model'=>$prod, | ||
'attribute'=>'min', | ||
'maxAttribute'=>'max', | ||
// additional javascript options for the slider plugin | ||
'options'=>array( | ||
'range'=>true, | ||
'min'=>$prod->minValue, | ||
'max'=>$prod->maxValue, | ||
), | ||
)); | ||
echo '<p class="row" align="center"><br /><br />' . CHtml::submitButton('Поиск') . '</p>'; | ||
|
||
$this->endWidget(); | ||
|
||
echo '</div>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{# hamster }} | ||
{{# title }}Прайсы{{/ title }} | ||
{{!$this->breadcrumbs = array($this->pageTitle);}} | ||
|
||
<h1>{{ title }}</h1> | ||
{{/ hamster }} | ||
|
||
{{# priceDownloadMenu }} | ||
<section class="priceDownload"> | ||
<a href="" id="priceDownloadLink">Скачать прайсы</a> | ||
<ul> | ||
{{# elements }} | ||
<li><a href="{{ link }}">{{ name }}</a></li> | ||
{{/ elements }} | ||
</ul> | ||
</section> | ||
{{/ priceDownloadMenu }} | ||
|
||
{{# hamster.js }} | ||
{{! скрипт для анимации и отображения прайсов }} | ||
$(function() { | ||
$('#priceDownloadLink').click(function() { | ||
$(this).next().show('normal'); | ||
$(this).remove(); | ||
return false; | ||
}); | ||
}); | ||
{{/ hamster.js }} | ||
|
||
{{! выводим таблицу с прайсами }} | ||
{{{ priceTable }}} |
Oops, something went wrong.