'<%= pkg.assets %>js/application.js'
'<%= pkg.assets %>js/csv.js'
'<%= pkg.assets %>js/dashboard.js'
- '<%= pkg.assets %>js/issue.js'
'<%= pkg.assets %>js/recent-history.js'
]
build:
'<%= pkg.assets %>js/application.js'
'<%= pkg.assets %>js/csv.js'
'<%= pkg.assets %>js/dashboard.js'
- '<%= pkg.assets %>js/issue.js'
'<%= pkg.assets %>js/recent-history.js'
]
+++ /dev/null
-/* Open form for most common actions like comment, assign or plan */
-function issueForm(actionType, elt) {
- var issueElt = $j(elt).closest('[data-issue-key]');
- var issueKey = issueElt.attr('data-issue-key');
- var actionsElt = issueElt.find('.code-issue-actions');
- var formElt = issueElt.find('.code-issue-form');
-
- actionsElt.addClass('hidden');
- formElt.html('<img src="' + baseUrl + '/images/loading-small.gif">').removeClass('hidden');
-
- $j.ajax(baseUrl + '/issue/action_form/' + actionType + '?issue=' + issueKey)
- .done(function (msg) {
- formElt.html(msg);
- var focusField = formElt.find('[autofocus]');
- if (focusField != null) {
- focusField.focus();
- }
- })
- .fail(function (jqXHR, textStatus) {
- alert(textStatus);
- });
- return false;
-}
-
-/* Close forms opened through the method issueForm() */
-function closeIssueForm(elt) {
- var issueElt = $j(elt).closest('[data-issue-key]');
- var actionsElt = issueElt.find('.code-issue-actions');
- var formElt = issueElt.find('.code-issue-form');
-
- formElt.addClass('hidden');
- actionsElt.removeClass('hidden');
- return false;
-}
-
-/* Raise a Javascript event for Eclipse Web View */
-function notifyIssueChange(issueKey) {
- $j(document).trigger('sonar.issue.updated', [issueKey]);
-}
-
-/* Submit forms opened through the method issueForm() */
-function submitIssueForm(elt) {
- var formElt = $j(elt).closest('form');
- formElt.find('.loading').removeClass('hidden');
- formElt.find(':submit').prop('disabled', true);
- var issueElt = formElt.closest('[data-issue-key]');
- var issueKey = issueElt.attr('data-issue-key');
-
- $j.ajax({
- type: 'POST',
- url: baseUrl + '/issue/do_action',
- data: formElt.serialize()}
- ).success(function (htmlResponse) {
- var replaced = $j(htmlResponse);
- issueElt.replaceWith(replaced);
- notifyIssueChange(issueKey);
- }
- ).fail(function (jqXHR) {
- closeIssueForm(elt);
- issueElt.find('.code-issue-actions').replaceWith(jqXHR.responseText);
- });
- return false;
-}
-
-function doIssueAction(elt, action, parameters) {
- var issueElt = $j(elt).closest('[data-issue-key]');
- var issueKey = issueElt.attr('data-issue-key');
-
- issueElt.find('.code-issue-actions').html('<img src="' + baseUrl + '"/images/loading.gif">');
- parameters.issue = issueKey;
-
- $j.ajax({
- type: 'POST',
- url: baseUrl + '/issue/do_action/' + action,
- data: parameters
- }
- ).success(function (htmlResponse) {
- var replaced = $j(htmlResponse);
- issueElt.replaceWith(replaced);
- notifyIssueChange(issueKey);
- }
- ).fail(function (jqXHR) {
- issueElt.find('.code-issue-actions').replaceWith(jqXHR.responseText);
- });
- return false;
-}
-
-// Used for actions defined by plugins
-function doPluginIssueAction(elt, action) {
- var parameters = {};
- return doIssueAction(elt, action, parameters);
-}
-
-function assignIssueToMe(elt) {
- var parameters = {'me': true};
- return doIssueAction(elt, 'assign', parameters);
-}
-
-function doIssueTransition(elt, transition) {
- var parameters = {'transition': transition};
- return doIssueAction(elt, 'transition', parameters);
-}
-
-function deleteIssueComment(elt, confirmMsg) {
- var commentElt = $j(elt).closest('[data-comment-key]');
- var commentKey = commentElt.attr('data-comment-key');
- var issueElt = commentElt.closest('[data-issue-key]');
- if (confirm(confirmMsg)) {
- $j.ajax({
- type: 'POST',
- url: baseUrl + '/issue/delete_comment?id=' + commentKey,
- success: function (htmlResponse) {
- issueElt.replaceWith($j(htmlResponse));
- }
- });
- }
- return false;
-}
-
-function formEditIssueComment(elt) {
- var commentElt = $j(elt).closest('[data-comment-key]');
- var commentKey = commentElt.attr('data-comment-key');
- var issueElt = commentElt.closest('[data-issue-key]');
-
- issueElt.find('.code-issue-actions').addClass('hidden');
- commentElt.html('<img src="' + baseUrl + '/images/loading.gif">');
-
- $j.get(baseUrl + '/issue/edit_comment_form/' + commentKey, function (html) {
- commentElt.html(html);
- });
- return false;
-}
-
-function doEditIssueComment(elt) {
- var formElt = $j(elt).closest('form');
- var issueElt = formElt.closest('[data-issue-key]');
- var issueKey = issueElt.attr('data-issue-key');
- $j.ajax({
- type: 'POST',
- url: baseUrl + '/issue/edit_comment',
- data: formElt.serialize(),
- success: function (htmlResponse) {
- var replaced = $j(htmlResponse);
- issueElt.replaceWith(replaced);
- notifyIssueChange(issueKey);
- },
- error: function (jqXHR) {
- closeIssueForm(elt);
- var commentElt = formElt.closest('[data-comment-key]');
- commentElt.replaceWith(jqXHR.responseText);
- }
- });
- return false;
-}
-
-function refreshIssue(elt) {
- var issueElt = $j(elt).closest('[data-issue-key]');
- var issueKey = issueElt.attr('data-issue-key');
- $j.get(baseUrl + '/issue/show/' + issueKey + '?only_detail=true', function (html) {
- var replaced = $j(html);
- issueElt.replaceWith(replaced);
- });
- return false;
-}
-
-/* Open form for creating a manual issue */
-function openCIF(elt, componentId, line) {
- $j.get(baseUrl + '/issue/create_form?component=' + componentId + '&line=' + line, function (html) {
- $j(elt).closest('tr').find('td.line').append($j(html));
- });
- return false;
-}
-
-/* Close the form used for creating a manual issue */
-function closeCreateIssueForm(elt) {
- $j(elt).closest('.code-issue-create-form').remove();
- return false;
-}
-
-/* Create a manual issue */
-function submitCreateIssueForm(elt) {
- var formElt = $j(elt).closest('form');
- var loadingElt = formElt.find('.loading');
-
- loadingElt.removeClass('hidden');
- $j.ajax({
- type: 'POST',
- url: baseUrl + '/issue/create',
- data: formElt.serialize()}
- ).success(function (html) {
- var replaced = $j(html);
- formElt.replaceWith(replaced);
- }
- ).error(function (jqXHR) {
- var errorsElt = formElt.find('.code-issue-errors');
- errorsElt.html(jqXHR.responseText);
- errorsElt.removeClass('hidden');
- }
- ).always(function () {
- loadingElt.addClass('hidden');
- });
- return false;
-}
-
-function toggleIssueCollapsed(elt) {
- var issueElt = $j(elt).closest('[data-issue-rule]');
- issueElt.toggleClass('code-issue-collapsed');
-
- if (!issueElt.hasClass('code-issue-collapsed')) {
-
- // Load rule desc
- // Display loading images and hide existing content
- var ruleLoading = issueElt.find('.rule-loading');
- ruleLoading.removeClass('hidden');
- var ruleElt = issueElt.find('.issue-rule');
- ruleElt.addClass('hidden');
- var ruleKey = issueElt.attr('data-issue-rule');
- $j.get(baseUrl + '/issue/rule/' + ruleKey, function (html) {
- ruleElt.html(html);
- // re-enable the links opening modal popups
- ruleElt.find('.open-modal').modal();
- }).always(function () {
- ruleLoading.addClass('hidden');
- ruleElt.removeClass('hidden');
- });
-
- // Load changelog
- // Display loading images and hide existing content
- var cangelogLoading = issueElt.find('.changelog-loading');
- cangelogLoading.removeClass('hidden');
- var changelogElt = issueElt.find('.issue-changelog');
- changelogElt.addClass('hidden');
- var issueKey = issueElt.attr('data-issue-key');
- $j.get(baseUrl + '/issue/changelog/' + issueKey, function (html) {
- changelogElt.html(html);
- }).always(function () {
- cangelogLoading.addClass('hidden');
- changelogElt.removeClass('hidden');
- });
- }
- return false;
-}
-
-function openIssuePopup(elt) {
- var issueElt = $j(elt).closest('[data-issue-key]');
- var issueKey = issueElt.attr('data-issue-key');
- openPopup(baseUrl + '/issue/show/' + issueKey + '?layout=false', 'issue');
- return false;
-}
class IssueController < ApplicationController
- # GET /issue/show/<key>
- # This URL is used by the Eclipse Plugin
- #
- # ==== Optional parameters
- # 'layout' is false to remove sidebar and headers. Default value is true.
- #
- # ==== Example
- # GET /issue/show/151f6853-58a1-4950-95e3-9866f8be3e35?layout=false
- #
- def show
- require_parameters :id
- init_issue(params[:id])
-
- if params[:modal]
- render :partial => 'issue/show_modal'
- elsif request.xhr?
- if params[:only_detail]
- # used when canceling edition of comment -> see issue.js#refreshIssue()
- render :partial => 'issue/issue', :locals => {:issue => @issue}
- else
- render :partial => 'issue/show'
- end
- else
- render :action => 'show'
- end
-
- end
-
- # Form used for: assign, comment, transition, change severity and plan
- def action_form
- verify_ajax_request
- require_parameters :id, :issue
-
- @issue = Internal.issues.getIssueByKey(params[:issue])
-
- action_type = params[:id]
- render :partial => "issue/#{action_type}_form"
- end
-
def do_action
verify_ajax_request
verify_post_request
end
- # Form used to edit comment
- def edit_comment_form
- verify_ajax_request
- require_parameters :id
-
- @comment = Internal.issues.findComment(params[:id])
-
- render :partial => 'issue/edit_comment_form'
- end
-
# Edit and save an existing comment
def edit_comment
verify_ajax_request
render :partial => 'issue/issue', :locals => {:issue => @issue}
end
- # Form used to create a manual issue
- def create_form
- verify_ajax_request
- require_parameters :component
- render :partial => 'issue/create_form'
- end
-
# Create a manual issue
def create
verify_post_request
+++ /dev/null
-<% user_select_box_id = "assignee-#{params[:issue]}" %>
-<form action="">
- <input type="hidden" name="issue" value="<%= params[:issue] -%>"/>
- <input type="hidden" name="id" value="assign"/>
- <table class="width100">
- <tr>
- <td style="vertical-align:top">
- <%
- choices = {}
- choices[current_user.login] = escape_javascript(message('assigned_to_me')) if !@issue.assignee || @issue.assignee != current_user.login
- choices[''] = escape_javascript(message('unassigned')) if @issue.assignee
- %>
- <%=
- user_select_tag('assignee', :html_id => user_select_box_id, :open => true, :include_choices => choices)
- -%>
- <input type="button" value="<%= message('issue.assign.submit') -%>" onclick="submitIssueForm(this)">
-
- <%= link_to_function message('cancel'), 'closeIssueForm(this)', :class => 'action' -%>
- <span class="loading hidden"></span>
- </td>
- </tr>
- </table>
-</form>
+++ /dev/null
-<table class="spaced">
- <tr>
- <td class="thin left top" nowrap><%= format_datetime(@issue.creationDate()) -%></td>
- <td class="thin left top"nowrap><%= Internal.users_api.findByLogin(@issue.reporter).name if @issue.reporter -%></td>
- <td class="left top"><%= message('created') -%></td>
- </tr>
- <%
- @changelog.changes.each do |change|
- user = @changelog.user(change)
- %>
- <tr>
- <td class="thin left top" nowrap><%= format_datetime(change.creationDate()) -%></td>
- <td class="thin left top" nowrap><%= h(user.name()) if user -%></td>
- <td class="left top">
- <%
- Internal.issues.formatChangelog(change).each_with_index do |message, index|
- %>
- <% if index>0 %><br/><% end %>
- <%= message -%>
- <% end %>
- </td>
- </tr>
- <% end %>
-</table>
-
-
+++ /dev/null
-<form action="">
- <input type="hidden" name="issue" value="<%= params[:issue] -%>"/>
- <input type="hidden" name="id" value="comment"/>
- <table class="width100">
- <tr>
- <td style="vertical-align:top" colspan="2">
- <textarea rows="4"
- name="text"
- style="width: 100%"
- autofocus="autofocus"
- onkeyup="if (this.value == null || this.value=='') $j('#submit-comment').attr('disabled', 'true'); else $j('#submit-comment').attr('disabled', null);"></textarea>
- </td>
- </tr>
- <tr>
- <td style="padding-top: 5px">
- <input type="submit" value="<%= message('issue.comment.submit') -%>" onclick="return submitIssueForm(this)" id="submit-comment" disabled="disabled"/>
- <%= link_to_function message('cancel'), 'closeIssueForm(this)' -%>
- <span class="loading hidden"></span>
- </td>
- <td align="right">
- <%= render :partial => 'markdown/tips' -%>
- </td>
- </tr>
- </table>
-</form>
\ No newline at end of file
+++ /dev/null
-<%
- manual_rules = Rule.manual_rules
- is_admin = has_role?(:admin)
- form_id = "create-issue-#{params[:component]}-#{params[:line]}"
- rule_select_id = "#{form_id}-rules"
-%>
-<form action="" class="code-issue-create-form" id="<%= form_id -%>">
- <%
- if manual_rules.empty?
- %>
- <div class="warning" style="margin: 10px">
-
- <% if is_admin %>
- <%= message('issue.manual.no_rules.admin') -%>
- <a href="<%= ApplicationController.root_context -%>/manual_rules/index"><%= message('manage') -%></a>
- <% else %>
- <%= message('issue.manual.no_rules.non_admin') -%>
- <% end %>
-
- <%= link_to_function message('cancel'), 'closeCreateIssueForm(this)' -%>
- </div>
-
- <% else %>
-
- <input type="hidden" name="line" value="<%= params[:line] -%>"/>
- <input type="hidden" name="component" value="<%= params[:component] -%>"/>
-
- <div class="code-issue">
- <div class="code-issue-name">
- <%= dropdown_tag 'rule',
- options_for_select([[]].concat(manual_rules.map { |rule| [rule.name, rule.key] })),
- {:show_search_box => true, :placeholder => 'Select a Rule'},
- {:html_id => rule_select_id} -%>
- </div>
- <div class="code-issue-msg">
- <table class="width100">
- <tr>
- <td>
- <textarea rows="4" name="message" class="width100 marginbottom5"></textarea>
- </td>
- </tr>
- <tr>
- <td>
- <input type="submit" value="Create" onclick="return submitCreateIssueForm(this);">
- <%= link_to_function message('cancel'), 'closeCreateIssueForm(this)' -%>
- <span class="loading hidden"></span>
- </td>
- </tr>
- </table>
- <div class="code-issue-errors hidden"></div>
- </div>
- </div>
- <% end %>
-</form>
+++ /dev/null
-<form action="">
- <input type="hidden" name="key" value="<%= @comment.key -%>"/>
- <table class="width100">
- <tr>
- <td style="vertical-align:top" colspan="2">
- <textarea
- rows="4"
- name="text"
- style="width: 100%"
- autofocus="autofocus"
- onkeyup="if (this.value == null || this.value=='') $j('#submit-comment').attr('disabled', 'true'); else $j('#submit-comment').attr('disabled', null);"><%= @comment.markdownText -%></textarea>
- </td>
- </tr>
- <tr>
- <td style="padding-top: 5px">
- <input type="submit" value="<%= message('save') -%>"
- onclick="doEditIssueComment(this);return false" id="submit-comment">
- <%= link_to_function message('cancel'), 'refreshIssue(this)' -%>
- <span class="loading hidden"></span>
- </td>
- <td align="right">
- <%= render :partial => 'markdown/tips' -%>
- </td>
- </tr>
- </table>
-</form>
+++ /dev/null
-<div class="error">
- <% @errors.each do |msg| %>
- <div><%= h (msg.text ? msg.text : Api::Utils.message(msg.l10nKey, :params => msg.l10nParams)) -%></div>
- <% end %>
- <%= link_to_function message('hide'), 'refreshIssue(this)' -%>
-</div>
+++ /dev/null
-<!-- TODO @component.key() should be replaced by issue.componentUuid -->
-<div id="issue-<%= u issue.key -%>" class="code-issue code-issue-collapsed" data-issue-key="<%= issue.key -%>" data-issue-component="<%= @component.key() -%>" data-issue-rule="<%= u issue.ruleKey().toString() -%>">
- <div class="code-issue-name code-issue-toggle">
- <div class="code-issue-name-rule">
- <i class="icon-severity-<%= issue.severity.downcase -%>"></i>
- <span class="rulename">
- <%= h !issue.message.blank? ? Api::Utils.split_newlines(issue.message).join('<br/>') : @rule.getName() -%>
- </span>
- </div>
- <div class="code-issue-permalink">
- <a href="#" onclick="return openIssuePopup(this)" class="issue-permalink"><img src="<%= ApplicationController.root_context -%>/images/new-window-16.gif"></a>
- </div>
- </div>
-
- <ul class="code-issue-actions code-issue-list">
- <% if current_user %>
- <li><a href='#' onclick="return issueForm('comment', this)" class="link-action" autofocus><%= message('issue.comment.formlink') -%></a></li>
- <% end %>
- <% unless current_user %>
- <li>
- <i class="icon-status-<%= issue.status.downcase -%>"></i><%= message("issue.status.#{issue.status}") -%> <%= '(' + message("issue.resolution.#{issue.resolution}") + ')' if issue.resolution -%>
- </li>
- <% else %>
- <% transitions = Internal.issues.listTransitions(issue).to_a
- if !transitions.empty? && transitions.first
- first_transition = transitions.first %>
- <li>
- <i class="icon-status-<%= issue.status.downcase -%>"></i><%= message("issue.status.#{issue.status}") -%> <%= '(' + message("issue.resolution.#{issue.resolution}") + ')' if issue.resolution -%>
- <!-- Display only the first transition -->
- <a href="#" onclick="return doIssueTransition(this, '<%= first_transition.key -%>')" class="link-action issue-transition spacer-left">
- <%= message("issue.transition.#{first_transition.key}") -%></a>
- <!-- Display remaining transitions -->
- <% if transitions.size > 1 %>
- <div class="dropdown">
- <a href="#" class="link-action link-more" onclick="showDropdownMenuOnElement($j(this).next('.dropdown-menu')); return false;"/></a>
- <ul style="display: none" class="dropdown-menu">
- <% transitions[1..-1].each do |transition| %>
- <li>
- <a href="#" onclick="return doIssueTransition(this, '<%= transition.key -%>')" class="link-action spacer-right"><%= message("issue.transition.#{transition.key}") -%></a>
- </li>
- <% end %>
- </ul>
- </div>
- <% end %>
- </li>
- <% end %>
- <% end %>
- <% unless issue.resolution %>
- <% if issue.assignee %>
- <% if current_user %>
- <li><a href='#' onclick="return issueForm('assign', this)" class="link-action"><%= message('assigned_to') -%></a> <%= h @users[issue.assignee].name -%></li>
- <% else %>
- <li><%= message('assigned_to') -%> <strong><%= h @users[issue.assignee].name -%></strong></li>
- <% end %>
- <% elsif current_user %>
- <li>
- <a href='#' onclick="return issueForm('assign', this)" class="link-action"><%= message('issue.assign.formlink') -%></a>
- <% if issue.assignee != current_user.login %>
- [<a href="#" onclick="return assignIssueToMe(this)" class="link-action"><%= message('issue.assign.to_me') -%></a>]
- <% end %>
- </li>
- <% end %>
- <% if issue.actionPlanKey %>
- <% if current_user %>
- <li><a href="#" onclick="return issueForm('plan', this)" class="link-action"><%= message('issue.planned_for') -%></a> <%= h(@action_plan.name()) -%></li>
- <% else %>
- <li><%= message('issue.planned_for') -%> <strong><%= h(@action_plan.name()) -%></strong></li>
- <% end %>
- <% elsif current_user %>
- <li><a href="#" onclick="return issueForm('plan', this)" class="link-action"><%= message('issue.do_plan') -%></a></li>
- <% end %>
- <% end %>
- <% if current_user %>
- <% plugin_actions = Internal.issues.listActions(issue)
- if !issue.resolution || !plugin_actions.empty? %>
- <li>
- <div class="dropdown">
- <a href="#" class="link-action link-more" onclick="showDropdownMenuOnElement($j(this).next('.dropdown-menu')); return false;"><%= message('more_actions') -%></a>
- <ul style="display: none" class="dropdown-menu">
- <% if Java::OrgSonarServerUser::UserSession.get().hasProjectPermissionByUuid('issueadmin', issue.projectUuid()) %>
- <% unless issue.resolution %>
- <li>
- <a href="#" onclick="return issueForm('severity', this)" class="link-action spacer-right"><%= message("issue.set_severity") -%></a>
- </li>
- <% end %>
- <% end %>
-
- <% # Display actions defined by plugins
- plugin_actions.each do |action| %>
- <li>
- <a href="#" onclick="return doPluginIssueAction(this, '<%= action.key -%>')" class="link-action spacer-right"><%= message("issue.action.#{action.key}.formlink") -%></a>
- </li>
- <% end %>
- </ul>
- </div>
- </li>
- <% end %>
- <% end %>
- <% if issue.debt %>
- <li><%= message('issue.debt') -%> <%= Internal.i18n.formatDuration(issue.debt, 'SHORT') -%></li>
- <% end %>
- <% if issue.authorLogin %>
- <li><%= message('issue.authorLogin') -%> <%= issue.authorLogin -%></li>
- <% end %>
- <% if issue.reporter %>
- <li><%= message('issue.reported_by') -%> <%= @users[issue.reporter].name -%></li>
- <% end %>
- </ul>
- <div class="code-issue-form hidden"></div>
-
- <div class="code-issue-details">
- <ul class="tabs">
- <li>
- <a href="#tab-issue-rule"><%= message('rule') -%></a>
- </li>
- <li>
- <a href="#tab-issue-changelog"><%= message('changelog') -%></a>
- </li>
- </ul>
-
- <div id="tab-issue-rule">
- <%= image_tag 'loading.gif', :class => 'rule-loading hidden' -%>
- <div class="issue-rule rule-desc"></div>
- </div>
-
- <div id="tab-issue-changelog">
- <%= image_tag 'loading.gif', :class => 'changelog-loading hidden' -%>
- <table class="issue-changelog spaced">
- </table>
- </div>
- </div>
-
- <div class="code-issue-comments">
- <% @comments.each do |comment|
- comment_html_id = "comment-#{comment.key}-#{rand(100)}" %>
- <div class="code-issue-comment" id="<%= comment_html_id -%>" data-comment-key="<%= comment.key -%>">
- <h4>
- <%= image_tag('reviews/comment.png') -%> <b><%= h( @users[comment.userLogin()].name() ) -%></b>
- (<%= distance_of_time_in_words_to_now(Api::Utils.java_to_ruby_datetime(comment.createdAt)) -%>)
- <% if current_user && current_user.login==comment.userLogin %>
-
- <%= image_tag 'sep12.png' -%>
-
- <a class="link-action" href="#" onclick="return formEditIssueComment(this)" ><%= message('edit') -%></a>
- <a class="link-action spacer-right" href="#" onclick="return deleteIssueComment(this, '<%= escape_javascript(message('issue.comment.delete_confirm_message')) -%>')"><%= message('delete') -%></a>
- <% end %>
- </h4>
- <%= Internal.text.markdownToHtml(comment.markdownText) -%>
- </div>
- <% end %>
- </div>
-</div>
-
-<script>
- $j('#issue-<%= u issue.key -%> .code-issue-details').tabs();
- $j('#issue-<%= u issue.key -%> .code-issue-toggle').click(function() {
- toggleIssueCollapsed(this);
- });
-</script>
+++ /dev/null
-<div class="code-issues">
- <%= render :partial => 'issue/issue', :locals => {:issue => issue} -%>
-</div>
\ No newline at end of file
+++ /dev/null
-<%
- project = Internal.component_api.findByKey(@issue.projectKey())
- plans_select_box_id = "plans-#{params[:issue]}"
- plans = Internal.issues.findOpenActionPlans(project.key())
- if plans.empty?
-%>
- <% if is_admin? %>
- <span class="error"><%= message('issue.plan.error.plan_must_be_created_first_for_admin',
- :params => ApplicationController.root_context + '/action_plans/index/' + project.key()) -%></span>
- <% else %>
- <span class="error"><%= message('issue.plan.error.plan_must_be_created_first_for_other') -%></span>
- <% end %>
- <%= link_to_function message('cancel'), 'closeIssueForm(this)' -%>
-<%
- else
- first_plan = plans[0]
- options = plans.map { |plan|
- label = plan.deadLine ? "#{h plan.name} (#{format_date(plan.deadLine)})" : h(plan.name)
- [label, plan.key]
- }
- if @issue.actionPlanKey
- options.unshift([escape_javascript(message('issue.unplan.submit')), ''])
- end
- plan_options = options_for_select(options, first_plan.key)
-%>
- <form method="POST">
- <input type="hidden" name="issue" value="<%= params[:issue] -%>"/>
- <input type="hidden" id="action-<%= plans_select_box_id %>" name="id" value="plan"/>
-
- <%= dropdown_tag('plan', plan_options, {:show_search_box => false}, {:id => plans_select_box_id}) -%>
-
- <input type="button" value="<%= message('issue.plan.submit') -%>" onclick="submitIssueForm(this)">
- <%= link_to_function message('cancel'), 'closeIssueForm(this)', :class => 'action' -%>
- <span class="loading hidden"></span>
-
- </form>
-
-<% end %>
+++ /dev/null
-<h1 class="marginbottom10"><%= h @rule.name() -%></h1>
-
-<div class="marginbottom10">
- <% if @rule.htmlDescription.strip.start_with?('<p>') %>
- <%= Internal.text.interpretMacros(@rule.htmlDescription) %>
- <% else %>
- <p><%= Internal.text.interpretMacros(@rule.htmlDescription) %></p>
- <% end %>
-</div>
-
-<% if @rule.markdownNote() %>
- <div class="marginbottom10">
- <%= Api::Utils.markdown_to_html(@rule.markdownNote()) -%>
- </div>
-<% end %>
-
-<p class="note">
- <span class="spacer-right"><%= h @rule.key() -%></span>
- <%= image_tag 'sep12.png', :class => 'spacer-right' -%>
- <% if @characteristic && @sub_characteristic %>
- <%= @characteristic.name -%> > <%= @sub_characteristic.name -%>
- <% else %>
- <%= message 'issue.technical_debt_deleted' %>
- <% end %>
-</p>
+++ /dev/null
-<form action="">
- <input type="hidden" name="issue" value="<%= params[:issue] -%>"/>
- <input type="hidden" name="id" value="severity"/>
- <table class="width100">
- <tr>
- <td style="vertical-align:top">
- <select name="severity" class="withIcons" id="severity" autofocus="autofocus">
- <% Severity::KEYS.each do |severity| %>
- <option class="sev_<%= severity -%>" value="<%= severity -%>" <%= 'selected' if severity==Severity::MAJOR -%>><%= message("severity.#{severity}") -%></option>
- <% end %>
- </select>
-
- <input type="submit" value="<%= message('issue.set_severity.submit') -%>" onclick="return submitIssueForm(this)">
- <%= link_to_function message('cancel'), 'closeIssueForm(this)' -%>
- <span class="loading hidden"></span>
- </td>
- </tr>
- </table>
-</form>
+++ /dev/null
-<div class="issue-detail">
- <div class="source_title">
- <%
- project = @project
- component = @component
- %>
-
- <% if @issue.componentUuid() != project.uuid() %>
- <div class="subtitle">
- <%= h project.longName() -%>
- </div>
- <% end %>
- <span class="h1">
- <% if component.isEnabled() %>
- <%= qualifier_icon(component) %>
- <a href="<%= ApplicationController.root_context -%>/component/index#component=<%= component.key() -%>&tab=issues" class="issue-component-link"
- onclick="window.open(this.href,'resource-<%= component.key().parameterize -%>','height=800,width=900,scrollbars=1,resizable=1');return false;"><%= h component.longName() -%></a>
- <% else %>
- <%= h component.key() %> [<del><%= message('issue.component_deleted') %></del>]
- <% end %>
- </span>
- </div>
-
- <div class="marginbottom10">
- <%= render :partial => 'issue/issue', :locals => {:issue => @issue} -%>
- </div>
-
- <!--
- SONAR-4438 Since we don't show source code, add blank lines in order for the "more action" link to be well displayed
- -->
- <div style="height: 60px;"></div>
-
-</div>
+++ /dev/null
-<div class="modal-body">
- <%= render :partial => 'issue/show' -%>
-</div>
-<div class="modal-foot">
- <a href="#" onclick="return closeModalWindow()" autofocus><%= h message('close') -%></a>
-</div>
\ No newline at end of file
+++ /dev/null
-<%= render :partial => 'issue/show' -%>
\ No newline at end of file