blob: 0acd465f260ce1ffaa1c17aac1d2c46e97f5da2f [file] [log] [blame]
[define category_css]css/ph_list.css[end]
[include "../framework/header.ezt" "showtabs"]
[include "../framework/js-placeholders.ezt"]
[if-any read_only][include "../framework/read-only-rejection.ezt"]
[else]
<form action="adminLabels.do" id="adminLabels" method="POST">
<input type="hidden" name="token" value="[form_token]">
<h4>Predefined issue labels</h4>
<div class="section">
[if-any can_edit_project]
<table class="vt">
<tr><td>
<textarea name="predefinedlabels" rows="12" cols="75" style="tab-size:18">[labels_text]</textarea>
[if-any errors.label_defs]
<div class="fielderror">[errors.label_defs]</div>
[end]
<div>
Each issue may have <b>at most one</b> label with each of these prefixes:<br>
<input type="text" size="75" name="excl_prefixes"
value="[for config.excl_prefixes][config.excl_prefixes][if-index config.excl_prefixes last][else], [end][end]">
</div>
</td>
<td style="padding-left:.7em">
<div class="tip">
<b>Instructions:</b><br> List one label per line in desired sort-order.<br><br>
Optionally, use an equals-sign to document the meaning of each label.
</div>
</td>
</tr>
</table>
[else]
<table cellspacing="0" cellpadding="2" border="0" class="results striped" width="100%">
<tr>
<th style="min-width:14em">Label</th>
<th width="100%">Meaning</th>
</tr>
[for config.issue_labels]
<tr>
<td style="white-space:nowrap; padding-right:2em; color:#363">[config.issue_labels.name]</td>
<td>[config.issue_labels.docstring]</td>
</tr>
[end]
</table>
[end]
</div>
[if-any can_edit_project]
<input type="submit" id="savechanges" name="btn" value="Save changes" class="submit">
[end]
<br>
<br>
<h4>Custom fields</h4>
<div class="section">
<table cellspacing="0" cellpadding="2" border="0" class="results striped vt" id="resultstable" width="100%">
<tbody>
<tr>
<th>ID</th>
<th>Name</th>
<th>Type</th>
<th>Required</th>
<th>Multivalued</th>
<th>Applicable to</th>
<th>Description</th>
</tr>
[if-any field_defs][else]
<tr>
<td colspan="40">
<div style="padding: 3em; text-align: center">
This project has not defined any custom fields.
</div>
</td>
</tr>
[end]
[for field_defs]
[define detail_url]/p/[projectname]/fields/detail?field=[field_defs.field_name][end]
[is field_defs.type_name "INT_TYPE"][define pretty_type_name]Integer[end][end]
[is field_defs.type_name "ENUM_TYPE"][define pretty_type_name]Enum[end][end]
[is field_defs.type_name "USER_TYPE"][define pretty_type_name]User[end][end]
[is field_defs.type_name "STR_TYPE"][define pretty_type_name]String[end][end]
[is field_defs.type_name "DATE_TYPE"][define pretty_type_name]Date[end][end]
[is field_defs.type_name "URL_TYPE"][define pretty_type_name]Url[end][end]
[is field_defs.type_name "APPROVAL_TYPE"][define pretty_type_name]Approval[end][end]
<tr data-url="[detail_url]">
<td>
[field_defs.field_def.field_id]
</td>
<td class="id" style="white-space:nowrap">
<a href="[detail_url]">[field_defs.field_name]</a></td>
<td style="white-space:nowrap">
[pretty_type_name]
</td>
<td style="white-space:nowrap">
[if-any field_defs.is_required_bool]Required[else]Optional[end]
</td>
<td style="white-space:nowrap">
[if-any field_defs.is_multivalued_bool]Multiple[else]Single[end]
</td>
<td style="white-space:nowrap">
[if-any field_defs.applicable_type][field_defs.applicable_type][else]Any issue[end]
</td>
<td>
[field_defs.docstring_short]
</td>
</tr>
[end]
</tbody>
</table>
<div class="list-foot"></div>
[if-any can_edit_project]
<p><a href="/p/[projectname]/fields/create" class="buttonify primary">Add field</a></p>
[end]
</div>
</form>
[end]
<script type="text/javascript" nonce="[nonce]">
runOnLoad(function() {
function _handleResultsClick(event) {
var target = event.target;
if (target.tagName == "A")
return;
while (target && target.tagName != "TR") target = target.parentNode;
_go(target.attributes[[]"data-url"].value,
(event.metaKey || event.ctrlKey || event.button == 1));
};
_addClickListener($("resultstable"), _handleResultsClick);
});
</script>
[include "../framework/footer.ezt"]