From: gitlabhq Date: Thu, 27 Oct 2011 15:18:50 +0000 (+0300) Subject: issue can be edit from show page X-Git-Tag: v1.2.0pre~82^2^2~2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=2258db66c2e8ddccc1716b92f9d9a3a1cb3eff7f;p=wvm%2Fgitlab.git issue can be edit from show page --- diff --git a/app/views/issues/index.html.haml b/app/views/issues/index.html.haml index 56042fa24..a70c65d47 100644 --- a/app/views/issues/index.html.haml +++ b/app/views/issues/index.html.haml @@ -45,7 +45,7 @@ }); $('.delete-issue').live('ajax:success', function() { - $(this).closest('tr').fadeOut(); }); + $(this).closest('tr').fadeOut(); updatePage();}); function setSortable(){ $('#issues-table>tbody').sortable({ diff --git a/app/views/issues/show.html.haml b/app/views/issues/show.html.haml index 29b6f3f7b..58bebe9b3 100644 --- a/app/views/issues/show.html.haml +++ b/app/views/issues/show.html.haml @@ -3,6 +3,10 @@ .span-15 = simple_format html_escape(@issue.content) + + + .clear + %br .issue_notes= render "notes/notes" .span-8.right .span-8 @@ -39,5 +43,10 @@ - else = check_box_tag "closed", 1, @issue.closed, :disabled => true + + - if can?(current_user, :admin_issue, @issue) + .clear + = link_to 'Edit', edit_project_issue_path(@project, @issue), :class => "lbutton positive", :remote => true + .right= link_to 'Destroy', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "lbutton delete-issue negative", :id => "destroy_issue_#{@issue.id}" .clear diff --git a/app/views/issues/update.js.haml b/app/views/issues/update.js.haml index 30fca38c3..137dba3cc 100644 --- a/app/views/issues/update.js.haml +++ b/app/views/issues/update.js.haml @@ -6,7 +6,7 @@ - if @issue.valid? :plain $("#edit_issue_dialog").dialog("close"); - $.ajax({type: "GET", url: location.href, dataType: "script"}); + updatePage(); - else :plain $("#edit_issue_dialog").empty();