New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/Ticket Status in Sticky Nav #3562

Open
wants to merge 4 commits into
base: develop
from

Conversation

Projects
None yet
4 participants
@JediKev
Member

JediKev commented Dec 16, 2016

This feature shows the ticket status after the ticket number only when sticky bar is shown. Some people have really long threads and don't want to scroll all the way to the top to see it or they have already changed the status under the reply bar and don't want to scroll all the way up (see this forum post and #3560).

JediKev added some commits Dec 10, 2016

Add Ticket Status to Navbar
Adds ticket status after ticket number in navbar (only shows when class 'fixed' is added).
Add show/hide for class nav-status
Adds show/hide for class nav-status (ticket status in navbar).
Add styling for class nav-status
Corrects the styling to show the status inline with ticket number.
Update class name
Updates class name to the correct class name.
@mlipok

This comment has been minimized.

Show comment
Hide comment
@mlipok

mlipok Dec 21, 2016

I decide to use your modyfication (I apply them myself).
As for now it looks good.
Give me next few days to be sure that all is ok :)

Thanks.

mlipok commented Dec 21, 2016

I decide to use your modyfication (I apply them myself).
As for now it looks good.
Give me next few days to be sure that all is ok :)

Thanks.

@mlipok

This comment has been minimized.

Show comment
Hide comment
@mlipok

mlipok Jan 5, 2017

Seams to all is ok.

mlipok commented Jan 5, 2017

Seams to all is ok.

@greezybacon

This comment has been minimized.

Show comment
Hide comment
@greezybacon

greezybacon Jan 6, 2017

Member

Nice addition. I would have done it this way:

diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php
index fb3bbc2..9d22a52 100644
--- a/include/staff/ticket-view.inc.php
+++ b/include/staff/ticket-view.inc.php
@@ -222,6 +222,8 @@ if($ticket->isOverdue())
              <h2><a href="tickets.php?id=<?php echo $ticket->getId(); ?>"
              title="<?php echo __('Reload'); ?>"><i class="icon-refresh"></i>
              <?php echo sprintf(__('Ticket #%s'), $ticket->getNumber()); ?></a>
+             <span class="only sticky"> &mdash; <?php
+                echo $ticket->getStatus(); ?></span>
             </h2>
         </div>
     </div>

Since there's an .only.sticky class that accomplishes what I think you want. Plus, perhaps you could add a green / red color like the github statuses for open/closed:

diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php
index fb3bbc2..7380fa8 100644
--- a/include/staff/ticket-view.inc.php
+++ b/include/staff/ticket-view.inc.php
@@ -222,6 +222,9 @@ if($ticket->isOverdue())
              <h2><a href="tickets.php?id=<?php echo $ticket->getId(); ?>"
              title="<?php echo __('Reload'); ?>"><i class="icon-refresh"></i>
              <?php echo sprintf(__('Ticket #%s'), $ticket->getNumber()); ?></a>
+             <span class="only sticky"> &mdash; <button class="button <?php echo
+                $ticket->isOpen() ? 'green' : 'red'; ?>"><?php
+                echo $ticket->getStatus(); ?></button></span>
             </h2>
         </div>
     </div>

(and then add some CSS for .red.button and .green.button)

Member

greezybacon commented Jan 6, 2017

Nice addition. I would have done it this way:

diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php
index fb3bbc2..9d22a52 100644
--- a/include/staff/ticket-view.inc.php
+++ b/include/staff/ticket-view.inc.php
@@ -222,6 +222,8 @@ if($ticket->isOverdue())
              <h2><a href="tickets.php?id=<?php echo $ticket->getId(); ?>"
              title="<?php echo __('Reload'); ?>"><i class="icon-refresh"></i>
              <?php echo sprintf(__('Ticket #%s'), $ticket->getNumber()); ?></a>
+             <span class="only sticky"> &mdash; <?php
+                echo $ticket->getStatus(); ?></span>
             </h2>
         </div>
     </div>

Since there's an .only.sticky class that accomplishes what I think you want. Plus, perhaps you could add a green / red color like the github statuses for open/closed:

diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php
index fb3bbc2..7380fa8 100644
--- a/include/staff/ticket-view.inc.php
+++ b/include/staff/ticket-view.inc.php
@@ -222,6 +222,9 @@ if($ticket->isOverdue())
              <h2><a href="tickets.php?id=<?php echo $ticket->getId(); ?>"
              title="<?php echo __('Reload'); ?>"><i class="icon-refresh"></i>
              <?php echo sprintf(__('Ticket #%s'), $ticket->getNumber()); ?></a>
+             <span class="only sticky"> &mdash; <button class="button <?php echo
+                $ticket->isOpen() ? 'green' : 'red'; ?>"><?php
+                echo $ticket->getStatus(); ?></button></span>
             </h2>
         </div>
     </div>

(and then add some CSS for .red.button and .green.button)

@JediKev

This comment has been minimized.

Show comment
Hide comment
@JediKev

JediKev Jan 6, 2017

Member

@greezybacon awesome as always. Thank you!

Member

JediKev commented Jan 6, 2017

@greezybacon awesome as always. Thank you!

@jighem

jighem approved these changes Jan 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment