From 991f8da12fe45ee0e020c3fbe60e13708a0dbdad Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Jul 25 2016 08:57:09 +0000 Subject: [PATCH 1/2] Made the interaction with the watch button clearer Previously, it was unclear to the user if they were adding a watch or removing a watch when interacting with the watch dropdown. This commit changes this so there is only ever one item showing in the watch dropdown, so it is clear to the user what will happen when pressing that button. This also simplifies the JS required to get this working. There is also a style change that goes along with this, making the buttons fit nicer with the newer, smaller fork button. I also had to move the fork button form a bit to get it working better with the button group styles. --- diff --git a/pagure/templates/repo_master.html b/pagure/templates/repo_master.html index 1b709aa..0412412 100644 --- a/pagure/templates/repo_master.html +++ b/pagure/templates/repo_master.html @@ -17,40 +17,49 @@ {{ repo.name }} {%- endif -%} - {% if authenticated and not repo.is_fork %} + {% if authenticated %}
-
- - {{ forkbuttonform.csrf_token }} -
- {% endif %} - - {% if authenticated %} -
- - - + {% endif %} + + {% if authenticated %} +
+
{% endif %} {% if repo.is_fork %} @@ -214,20 +223,15 @@ From 36f4487c329cea026cd976bd24fa40ee83c478a9 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jul 25 2016 12:35:42 +0000 Subject: [PATCH 2/2] Remove debugging statement --- diff --git a/pagure/templates/repo_master.html b/pagure/templates/repo_master.html index 0412412..762347b 100644 --- a/pagure/templates/repo_master.html +++ b/pagure/templates/repo_master.html @@ -224,7 +224,6 @@ $(document).ready(function() { $(".watch-menu a").click(function(){ var selectedValue = $(this).attr('id'); - console.log(selectedValue) var action = $("#watch_project").attr('action'); if (selectedValue != "unwatch_button") { action = action.replace('/0', '/1');