ADD вывод доп. информации на странице точки

This commit is contained in:
Krivchikov Dmitry 2015-09-19 11:18:07 +03:00
parent d84458ae13
commit e2f39ebf1b
3 changed files with 24 additions and 2 deletions

View File

@ -99,6 +99,7 @@ class PointController extends Controller
'user' => App::$user, 'user' => App::$user,
'photoLinks' => $photoLinksRes, 'photoLinks' => $photoLinksRes,
'articles' => $articles, 'articles' => $articles,
'extraParams' => $point->getExtraParams(),
)); ));
} else { } else {
App::error404(); App::error404();

View File

@ -78,8 +78,8 @@
<div class="form-group extraParam" style="display: none;"> <div class="form-group extraParam" style="display: none;">
<div class="input-group"> <div class="input-group">
<div class="input-group-addon type ico" title="Можно перетаскивать вверх и вних"><span class="glyphicon glyphicon-align-justify"></span></div> <div class="input-group-addon type ico" title="Можно перетаскивать вверх и вних"><span class="glyphicon glyphicon-align-justify"></span></div>
<input type="text" name="extraParamNames[]" class="form-control names" placeholder="Имя параметра (тел., сайт, …)" /> <input type="text" name="extraParamNames[]" class="form-control names" placeholder="Имя параметра (тел., сайт, …)" maxlength="128" />
<input type="text" name="extraParamValues[]" class="form-control values" placeholder="Значение параметра" /> <input type="text" name="extraParamValues[]" class="form-control values" placeholder="Значение параметра" maxlength="256" />
<div class="input-group-addon remove button" onclick="removeInput($(this))" title="Удалить это поле"><span class="glyphicon glyphicon-trash"></span></div> <div class="input-group-addon remove button" onclick="removeInput($(this))" title="Удалить это поле"><span class="glyphicon glyphicon-trash"></span></div>
</div> </div>
</div> </div>

View File

@ -66,6 +66,27 @@ $index = 0;
} }
?> ?>
<?php if($extraParams): ?>
<div style="width: 100%; text-align: center;">
<table class="table table-bordered table-hover" style="background-color: #fff; display: inline-table; width: 75%; text-align: left;">
<thead>
<tr>
<th>Параметр</th>
<th>Значение</th>
</tr>
</thead>
<?php foreach ($extraParams as $extraParam) {
print '<tr>';
print '<td>'.$extraParam->name.'</td>';
print '<td>'.$extraParam->value.'</td>';
print '</tr>';
}
?>
</table>
</div>
<?php endif;
?>
<?php if ($photoLinks): ?> <?php if ($photoLinks): ?>
Использованы фотоматериалы с сайтов: <?= $photoLinks ?> Использованы фотоматериалы с сайтов: <?= $photoLinks ?>
<?php endif; ?> <?php endif; ?>