Problem/Motivation

Recently we have implemented icons and their legend along the module which lead to a repetitive code for the icon legend.

Proposed resolution

Refactor code.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

yongt9412 created an issue. See original summary.

johnchque’s picture

Status: Active » Needs review
StatusFileSize
new21.13 KB

Added twig templates, code looks way cleaner now. :)

miro_dietiker’s picture

Status: Needs review » Needs work

Looks nice. Nitpicks.

  1. +++ b/tmgmt.module
    @@ -898,52 +904,53 @@ function tmgmt_redirect_queue_dequeue() {
    +    '#title' => 'Source status:',
    ...
    +    '#title' => 'Item status:',
    
    @@ -955,37 +962,33 @@ function tmgmt_color_legend() {
    +    '#title' => 'State:',
    
    @@ -997,39 +1000,48 @@ function tmgmt_color_job_item_legend() {
    +    '#title' => 'State:',
    
    @@ -1041,37 +1053,33 @@ function tmgmt_color_job_legend() {
    +    '#title' => 'State:',
    
    +++ b/translators/tmgmt_local/tmgmt_local.module
    @@ -740,37 +746,33 @@ function tmgmt_local_rules_component_access($type, $name) {
    +    '#title' => 'Status:',
    
    @@ -782,38 +784,37 @@ function tmgmt_color_legend_local_task_item() {
    +    '#title' => 'Status:',
    
    @@ -825,36 +826,29 @@ function tmgmt_color_legend_local_task() {
    +    '#title' => 'Status:',
    

    Missing t()

johnchque’s picture

Status: Needs work » Needs review
StatusFileSize
new21.15 KB
new3.07 KB

So true... Added.

miro_dietiker’s picture

Status: Needs review » Fixed

Committed, thx. :-) nice cleanup.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

edurenye’s picture

Status: Closed (fixed) » Needs work

The twig file added in this issue is wrongly indentated.

edurenye’s picture

Status: Needs work » Closed (fixed)