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}{_bug_tracker}{/block}
|
|
|
|
{block header}
|
|
{_bug_tracker}
|
|
{/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">
|
|
{_bug_tracker_reports}
|
|
</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">
|
|
{_bug_tracker_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}">
|
|
{_bug_tracker_reporter_card}
|
|
</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">
|
|
{_create}
|
|
</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">
|
|
{_create}
|
|
</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">{_bug_tracker_product}:</span></td>
|
|
<td class="data"><a href="#">{$bug->getProduct()->getCanonicalName()}</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label"><span class="nobold">{_bug_tracker_sent_by}: </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">{_bug_tracker_reproduced}:</span></td>
|
|
<td class="data"><a href="#">{tr("participants", $bug->getReproducedCount())}</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label"><span class="nobold">{_status}:</span></td>
|
|
<td class="data"><a href="#">{$bug->getStatus()}</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label"><span class="nobold">{_priority}:</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="{_bug_tracker_bug_description}" name="text" style="width: 100%; resize: vertical;"></textarea>
|
|
<br><br>
|
|
<select name="product">
|
|
<option disabled>{_bug_tracker_product}</option>
|
|
<option n:foreach="$open_products as $product" value="{$product->getId()}">{$product->getCanonicalName()}</option>
|
|
</select>
|
|
<br><br>
|
|
<h4>{_bug_tracker_priority}</h4>
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td><input type="radio" name="priority" value="0"></td>
|
|
<td><label for="priority_1">{_bug_tracker_priority_feature}</label></td>
|
|
</tr>
|
|
<tr>
|
|
<td><input type="radio" name="priority" value="1"></td>
|
|
<td><label for="priority_2">{_bug_tracker_priority_low}</label></td>
|
|
</tr>
|
|
<tr>
|
|
<td><input type="radio" name="priority" value="2"></td>
|
|
<td><label for="priority_3">{_bug_tracker_priority_medium}</label></td>
|
|
</tr>
|
|
<tr>
|
|
<td><input type="radio" name="priority" value="3"></td>
|
|
<td><label for="priority_4">{_bug_tracker_priority_high}</label></td>
|
|
</tr>
|
|
<tr>
|
|
<td><input type="radio" name="priority" value="4"></td>
|
|
<td><label for="priority_5">{_bug_tracker_priority_critical}</label></td>
|
|
</tr>
|
|
<tr>
|
|
<td><input type="radio" name="priority" value="5"></td>
|
|
<td><label for="priority_6">{_bug_tracker_priority_vulnerability}</label></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<br>
|
|
<input type="text" name="device" placeholder="{_bug_tracker_device}">
|
|
<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">{_bug_tracker_name}:</span></td>
|
|
<td class="data">
|
|
<a href="#">{$product->getCanonicalName()}</a>
|
|
<b n:if="$product->isClosed()">({_bug_tracker_product_is_closed})</b>
|
|
</td>
|
|
</tr>
|
|
<tr n:if="$canAdminBugTracker">
|
|
<td class="label"><span class="nobold">{_bug_tracker_product_created_by}: </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">{_bug_tracker_product_creation_date}:</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="{_bug_tracker_product_name}">
|
|
<br><br>
|
|
<textarea placeholder="{_bug_tracker_product_description}" name="description" style="width: 100%; resize: vertical;"></textarea>
|
|
|
|
<input type="hidden" name="hash" value="{$csrfToken}" />
|
|
<br><br>
|
|
<input type="submit" value="{_create}" 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>tr("bug_tracker_reporter_card_text", $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">{_bug_tracker_product}:</span></td>
|
|
<td class="data"><a href="#">{$bug->getProduct()->getCanonicalName()}</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label"><span class="nobold">{_bug_tracker_sent_by}: </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">{_bug_tracker_reproduced}:</span></td>
|
|
<td class="data"><a href="#">{tr("participants", $bug->getReproducedCount())}</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label"><span class="nobold">{_status}:</span></td>
|
|
<td class="data"><a href="#">{$bug->getStatus()}</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label"><span class="nobold">{_bug_tracker_priority}:</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>{_profile_not_found}</center>
|
|
</div>
|
|
{/if}
|
|
{/block} |