Allow SmartEvidence use custom status icons

Bug #1727532 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Confirmed
Wishlist
Unassigned

Bug Description

Currently we allow SmartEvidence matrix files to define custom status settings for the 4 statuses

But we don't allow for custom icons relating to those statuses.

It would be good if we also allowed / recorded what icon to use for the status

This would entail
1) being able to define it in the matrix file, eg

     "evidencestatusesicons":
      [
        {"begun":"icon-square"},
        {"incomplete":"icon-triangle"},
        {"partialcomplete":""},
        {"completed":"icon-star"}
      ],

We'd also need to handle stacked icons, where we can stack icons on top of each other
See http://fontawesome.io/examples/ the stacked icon section

So we could do this by allowing an array {"completed":["icon-circle","icon-star"]}

2) Save the icon info in the framework_evidence_statuses table by adding a icon column. We can save the data in json format to make things easier to keep the 1 to 1 connection between status and the icon(s) to use.

3) Being able to define the icon in html by using a matrix-icon.tpl file where we can define the markup allowing if/else checks so we return the correct markup for normal vs stacked icons and fetch it via smarty

4) In get_statuses_to_display() we fetch the html via template and add the html to the array. So rather that setting 'classes' we set 'iconhtml' and pass that to the matrix template.

Changed in mahara:
status: New → Confirmed
tags: added: smartevidence
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 18.04.0 → 18.10.0
milestone: 18.10.0 → 18.04.0
milestone: 18.04.0 → 18.10.0
Changed in mahara:
milestone: 18.10.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.