View Issue Details

IDProjectCategoryView StatusLast Update
0028182mantisbtuipublic2021-04-16 12:30
Reportertomkolp Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityN/A
Status assignedResolutionopen 
Product Version2.25.0 
Summary0028182: progress bar on the title bar (road map)
Description

I have a lot of elements in my road map. In order to check which element is already completed, I have to develop it. Can I move the progress bar to the title bar?

TagsNo tags attached.

Activities

tomkolp

tomkolp

2021-04-08 03:19

reporter  

Screenshot_5.png (106,960 bytes)   
Screenshot_5.png (106,960 bytes)   
dregad

dregad

2021-04-08 06:17

developer   ~0065354

This is not feasible out of the box.

I'm not sure this is something we would want implemented in Core, at least not in the way you propose in your mock-up - IMO, having this big green progress bar in the title looks ugly.

The desired result could be achieved by a lighter UI, with a fairly simple change in roadmap_page.php, e.g. something like

diff --git a/roadmap_page.php b/roadmap_page.php
index a8e86c789..ef3746ed6 100644
--- a/roadmap_page.php
+++ b/roadmap_page.php
@@ -72,7 +72,7 @@ require_api( 'version_api.php' );
  * @param array $p_version_row Array containing project version data.
  * @return void
  */
-function print_version_header( array $p_version_row ) {
+function print_version_header( array $p_version_row, $p_progress = 0 ) {
    $t_project_id   = $p_version_row['project_id'];
    $t_version_id   = $p_version_row['id'];
    $t_version_name = $p_version_row['version'];
@@ -104,6 +104,9 @@ function print_version_header( array $p_version_row ) {
    print_icon( $t_block_icon, '1 ace-icon bigger-125' );
    echo '</a>';
    echo '</div>';
+   if( $p_progress ) {
+       echo '<div class="widget-toolbar">' . $p_progress . '%</div>';
+   }
    echo '</div>';

    echo '<div class="widget-body">';
@@ -341,7 +344,7 @@ foreach( $t_project_ids as $t_project_id ) {
            }

            if( !$t_version_header_printed ) {
-               print_version_header( $t_version_row );
+               print_version_header( $t_version_row, $t_progress );
                $t_version_header_printed = true;
            }

Please note that modifying MantisBT source code is not supported, so do it at your own risk.

image.png (11,765 bytes)   
image.png (11,765 bytes)   
tomkolp

tomkolp

2021-04-08 06:25

reporter   ~0065355

Great, that's enough for me, thank you very much.

dregad

dregad

2021-04-16 12:30

developer   ~0065388

PR https://github.com/mantisbt/mantisbt/pull/1748