mirror of
https://github.com/openvk/openvk
synced 2024-12-26 18:42:37 +03:00
279 lines
No EOL
12 KiB
XML
279 lines
No EOL
12 KiB
XML
{extends "../@layout.xml"}
|
||
|
||
{block title}Баг-трекер{/block}
|
||
|
||
{block header}
|
||
Баг-трекер
|
||
{/block}
|
||
|
||
{block content}
|
||
<div class="tabs">
|
||
<div n:attr='id => $mode === "list" ? "activetabs" : false' class="tab">
|
||
<a n:attr='id => $mode === "list" ? "act_tab_a" : false' href="/bugtracker">
|
||
Отчёты
|
||
</a>
|
||
</div>
|
||
<div n:attr='id => $mode === "products" ? "activetabs" : false' class="tab">
|
||
<a n:attr='id => $mode === "products" ? "act_tab_a" : false' href="/bugtracker?act=products">
|
||
Продукты
|
||
</a>
|
||
</div>
|
||
<div n:attr='id => $mode === "reporter" ? "activetabs" : false' class="tab">
|
||
<a n:attr='id => $mode === "reporter" ? "act_tab_a" : false' href="/bugtracker?act=reporter&id={$user->id}">
|
||
Карточка тестировщика
|
||
</a>
|
||
</div>
|
||
<div n:if='in_array($mode, ["list", "new"])' n:attr='id => $mode === "new" ? "activetabs" : false' class="tab" style="float: right;">
|
||
<a n:attr='id => $mode === "new" ? "act_tab_a" : false' href="/bugtracker?act=new">
|
||
Создать
|
||
</a>
|
||
</div>
|
||
<div n:if='in_array($mode, ["products", "new_product"])' n:attr='id => $mode === "new_product" ? "activetabs" : false' class="tab" style="float: right;">
|
||
<a n:attr='id => $mode === "new_product" ? "act_tab_a" : false' href="/bugtracker?act=new_product">
|
||
Создать
|
||
</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<br><br>
|
||
{if $mode === "list"}
|
||
{if $count < 1}
|
||
{include "../components/nothing.xml"}
|
||
{/if}
|
||
<table border="0" style="font-size: 11px; width: 100%;" class="post">
|
||
<tbody>
|
||
<tr n:foreach="$iterator as $bug">
|
||
<td width="54" >
|
||
<center>
|
||
<img src="/assets/packages/static/openvk/img/note_icon.png">
|
||
</center>
|
||
</td>
|
||
<td width="92%" valign="top">
|
||
<div class="post-author" href="#">
|
||
<a href="/bug{$bug->getId()}">
|
||
<b>{$bug->getCanonicalName()}</b>
|
||
<span>#{$bug->getId()}</span>
|
||
</a>
|
||
</div>
|
||
<div class="post-content" style="padding: 4px 0; font-size: 11px;">
|
||
<table id="basicInfo" class="ugc-table group_info" cellspacing="0" cellpadding="0" border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td class="label"><span class="nobold">Продукт:</span></td>
|
||
<td class="data"><a href="#">{$bug->getProduct()->getCanonicalName()}</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="label"><span class="nobold">Отправил: </span></td>
|
||
<td class="data">
|
||
<a href="/bugtracker?act=reporter&id={$bug->getReporter()->getId()}">{$bug->getReporter()->getCanonicalName()}</a>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="label"><span class="nobold">Воспроизвелось:</span></td>
|
||
<td class="data"><a href="#">{tr("participants", $bug->getReproducedCount())}</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="label"><span class="nobold">Статус:</span></td>
|
||
<td class="data"><a href="#">{$bug->getStatus()}</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="label"><span class="nobold">Приоритет:</span></td>
|
||
<td class="data"><a href="#">{$bug->getPriority()}</a></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<div style="padding: 8px;">
|
||
{include "../components/paginator.xml", conf => (object) [
|
||
"page" => $page,
|
||
"count" => $count,
|
||
"amount" => sizeof($iterator),
|
||
"perPage" => 5,
|
||
"atBottom" => true,
|
||
]}
|
||
</div>
|
||
|
||
{elseif $mode === "new"}
|
||
<form method="post" action="/bugtracker/create">
|
||
<input name="title" type="text" placeholder="Название отчёта">
|
||
<br><br>
|
||
<textarea placeholder="Описание бага" name="text" style="width: 100%;resize: vertical;"></textarea>
|
||
<br><br>
|
||
<select name="product">
|
||
<option disabled>Продукт</option>
|
||
<option n:foreach="$open_products as $product" value="{$product->getId()}">{$product->getCanonicalName()}</option>
|
||
</select>
|
||
<br><br>
|
||
<h4>Приоритет</h4>
|
||
<table>
|
||
<tbody>
|
||
<tr>
|
||
<td><input type="radio" name="priority" value="0"></td>
|
||
<td><label for="priority_1">Пожелание</label></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input type="radio" name="priority" value="1"></td>
|
||
<td><label for="priority_2">Низкий</label></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input type="radio" name="priority" value="2"></td>
|
||
<td><label for="priority_3">Средний</label></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input type="radio" name="priority" value="3"></td>
|
||
<td><label for="priority_4">Высокий</label></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input type="radio" name="priority" value="4"></td>
|
||
<td><label for="priority_5">Критический</label></td>
|
||
</tr>
|
||
<tr>
|
||
<td><input type="radio" name="priority" value="5"></td>
|
||
<td><label for="priority_6">Уязвимость</label></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<br>
|
||
<input type="text" name="device" placeholder="Устройство">
|
||
<br>
|
||
<br>
|
||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||
<input type="submit" value="{_write}" class="button" style="float: right;" />
|
||
<br><br>
|
||
</form>
|
||
|
||
{elseif $mode === "products"}
|
||
<table border="0" style="font-size: 11px; width: 100%;" class="post">
|
||
<tbody>
|
||
<tr n:foreach="$all_products as $product">
|
||
<td width="54" >
|
||
<center>
|
||
<img src="/assets/packages/static/openvk/img/note_icon.png">
|
||
</center>
|
||
</td>
|
||
<td width="92%" valign="top">
|
||
<div class="post-author" href="#">
|
||
<a href="#">
|
||
<b>{$product->getCanonicalName()}</b>
|
||
<span>#{$product->getId()}</span>
|
||
</a>
|
||
</div>
|
||
<div class="post-content" style="padding: 4px 0; font-size: 11px;">
|
||
<table id="basicInfo" class="ugc-table group_info" cellspacing="0" cellpadding="0" border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td class="label"><span class="nobold">Название:</span></td>
|
||
<td class="data">
|
||
<a href="#">{$product->getCanonicalName()}</a>
|
||
<b n:if="$product->isClosed()">(закрыт)</b>
|
||
</td>
|
||
</tr>
|
||
<tr n:if="$canAdminBugTracker">
|
||
<td class="label"><span class="nobold">Создал: </span></td>
|
||
<td class="data">
|
||
<a href="/bugtracker?act=reporter&id={$product->getCreator()->getId()}">{$product->getCreator()->getCanonicalName()}</a>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="label"><span class="nobold">Дата создания:</span></td>
|
||
<td class="data"><a href="#">123</a></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
{elseif $mode === "new_product"}
|
||
<form method="post" action="/bugtracker/createProduct">
|
||
<input type="text" name="title" placeholder="Название">
|
||
<br><br>
|
||
<textarea placeholder="Описание продукта" name="description" style="width: 100%; resize: vertical;"></textarea>
|
||
|
||
<input type="hidden" name="hash" value="{$csrfToken}" />
|
||
<br><br>
|
||
<input type="submit" value="Создать" class="button" style="float: right;" />
|
||
<br><br>
|
||
</form>
|
||
|
||
{elseif $mode === "reporter"}
|
||
<div n:if="$reporter">
|
||
<div class="avatar-list-item" style="padding: 8px;">
|
||
<div class="avatar">
|
||
<a href="{$reporter->getURL()}">
|
||
<img class="ava" src="{$reporter->getAvatarURL()}">
|
||
</a>
|
||
</div>
|
||
<div class="info" style="width: 92%">
|
||
<a href="{$reporter->getURL()}" class="title">{$reporter->getCanonicalName()}</a>
|
||
<div>тестировщик отправил {$reporter_stats[0]} отчётов, из них {$reporter_stats[1]} имеют положительный статус</div>
|
||
</div>
|
||
</div>
|
||
<table border="0" style="font-size: 11px; width: 100%;" class="post">
|
||
<tbody>
|
||
<tr n:foreach="$iterator as $bug">
|
||
<td width="54" >
|
||
<center>
|
||
<img src="/assets/packages/static/openvk/img/note_icon.png">
|
||
</center>
|
||
</td>
|
||
<td width="92%" valign="top">
|
||
<div class="post-author" href="#">
|
||
<a href="/bug{$bug->getId()}">
|
||
<b>{$bug->getCanonicalName()}</b>
|
||
<span>#{$bug->getId()}</span>
|
||
</a>
|
||
</div>
|
||
<div class="post-content" style="padding: 4px 0; font-size: 11px;">
|
||
<table id="basicInfo" class="ugc-table group_info" cellspacing="0" cellpadding="0" border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td class="label"><span class="nobold">Продукт:</span></td>
|
||
<td class="data"><a href="#">{$bug->getProduct()->getCanonicalName()}</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="label"><span class="nobold">Отправил: </span></td>
|
||
<td class="data">
|
||
<a href="/bugtracker?act=reporter&id={$bug->getReporter()->getId()}">{$bug->getReporter()->getCanonicalName()}</a>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="label"><span class="nobold">Воспроизвелось:</span></td>
|
||
<td class="data"><a href="#">{tr("participants", $bug->getReproducedCount())}</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="label"><span class="nobold">Статус:</span></td>
|
||
<td class="data"><a href="#">{$bug->getStatus()}</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="label"><span class="nobold">Приоритет:</span></td>
|
||
<td class="data"><a href="#">{$bug->getPriority()}</a></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<div style="padding: 8px;">
|
||
{include "../components/paginator.xml", conf => (object) [
|
||
"page" => $page,
|
||
"count" => $count,
|
||
"amount" => sizeof($iterator),
|
||
"perPage" => 5,
|
||
"atBottom" => true,
|
||
]}
|
||
</div>
|
||
</div>
|
||
<div n:if="!$reporter">
|
||
<center>Пользователь не найден.</center>
|
||
</div>
|
||
{/if}
|
||
{/block} |