Skip to content

Commit

Permalink
[4.1] Scheduled tasks notes (#36244)
Browse files Browse the repository at this point in the history
* [4.1] Scheduled tasks notes

If a task has a note then it is displayed below the task name inside a small span (just like in all other components)

If a task does not have a note then a small span is still present but it contains a language string (which is empty)

There is no need for this empty span and there is certainly no need for a language string with no content.

## To test
Create a new task with a note
Create another new task without a note
Check the source code and you will see the empty span on the second task

Apply this PR
Refresh and check the source of the page again. This time there is no empty span on the task without a note and the note is still displayed on the other task.

* whoops

Co-authored-by: Benjamin Trenkle <[email protected]>
  • Loading branch information
brianteeman and bembelimen authored Dec 13, 2021
1 parent 85c2e32 commit 01ac616
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
10 changes: 4 additions & 6 deletions administrator/components/com_scheduler/tmpl/tasks/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,11 @@ class="js-draggable" data-url="<?php echo $saveOrderingUrl; ?>" data-direction="
<?php echo $this->escape($item->title); ?>
<?php endif; ?>

<span class="small">
<?php if (empty($item->note)): ?>
<?php echo Text::_('COM_SCHEDULER_NO_NOTE'); ?>
<?php else: ?>
<?php if ($item->note): ?>
<span class="small">
<?php echo Text::sprintf('JGLOBAL_LIST_NOTE', $this->escape($item->note)); ?>
<?php endif; ?>
</span>
</span>
<?php endif; ?>
</th>

<!-- Item type -->
Expand Down
1 change: 0 additions & 1 deletion administrator/language/en-GB/com_scheduler.ini
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ COM_SCHEDULER_MANAGER_TASK_EDIT="Edit Task"
COM_SCHEDULER_MANAGER_TASK_NEW="New Task"
COM_SCHEDULER_MSG_MANAGE_NO_TASK_PLUGINS="There are no task types matching your query."
COM_SCHEDULER_NEW_TASK="New Task"
COM_SCHEDULER_NO_NOTE=""
COM_SCHEDULER_N_ITEMS_DELETED="%d tasks deleted."
COM_SCHEDULER_N_ITEMS_DELETED_1="Task deleted."
COM_SCHEDULER_N_ITEMS_FAILED_UNLOCKING="Failed to unlock %d tasks."
Expand Down

0 comments on commit 01ac616

Please sign in to comment.