diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index aae7b0e..a301dce 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -302,7 +302,6 @@
- {% if diff %}
@@ -431,6 +430,7 @@ {{ mergeform.csrf_token }} {% endif %} +
{% if pull_request %} @@ -452,46 +452,46 @@ {% endif %} + {% if authenticated and mergeform and pull_request %}
- {% if authenticated and mergeform and pull_request %} - -
- {{ mergeform.csrf_token }} + {% if authenticated %} + + {{ mergeform.csrf_token }} + +
+ + + Preview + + + +
+
+
-
- - - Preview - - - - -
-
-
- -
- - -
-
- {% else %} -

Login to comment on this ticket.

- {% endif %} +
+ + +
+ + {% else %} +

Login to comment on this ticket.

+ {% endif %}
-
+ {% endif %} +
@@ -590,14 +590,22 @@ function setup_reply_btns() { } }); - $( ".tabs" ).tabs({ - activate: function( event, ui ) { - var _title = ui.newPanel.attr('id'); - if ($.inArray( _title, [ "request_diff", "commit_list" ] ) >= 0) { - window.location.hash = _title; + $( ".nav-item" ).click( + function() { + var header = $( this ).attr('data-id'); + if (header == 'nav-diff') { + $($(this).parent().children()[1]).removeClass('active'); + $(this).addClass('active'); + $('#commit_list').hide(); + $('#request_diff').show(); + } else { + $($(this).parent().children()[0]).removeClass('active'); + $(this).addClass('active'); + $('#request_diff').hide(); + $('#commit_list').show(); } } - }); + ); {% if pull_request %} {# These lines are only for existing pull-requests, not new ones #} @@ -649,23 +657,6 @@ function setup_reply_btns() { } ); - $( ".nav-item" ).click( - function() { - var header = $( this ).attr('data-id'); - if (header == 'nav-diff') { - $($(this).parent().children()[1]).removeClass('active'); - $(this).addClass('active'); - $('#commit_list').hide(); - $('.commit_diff').show(); - } else { - $($(this).parent().children()[0]).removeClass('active'); - $(this).addClass('active'); - $('.commit_diff').hide(); - $('#commit_list').show(); - } - } - ); - $( "#clear_comment").click( function() { $( "#comment" ).val("");