Skip to content

Commit 01ac616

Browse files
[4.1] Scheduled tasks notes (#36244)
* [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]>
1 parent 85c2e32 commit 01ac616

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

administrator/components/com_scheduler/tmpl/tasks/default.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,11 @@ class="js-draggable" data-url="<?php echo $saveOrderingUrl; ?>" data-direction="
200200
<?php echo $this->escape($item->title); ?>
201201
<?php endif; ?>
202202

203-
<span class="small">
204-
<?php if (empty($item->note)): ?>
205-
<?php echo Text::_('COM_SCHEDULER_NO_NOTE'); ?>
206-
<?php else: ?>
203+
<?php if ($item->note): ?>
204+
<span class="small">
207205
<?php echo Text::sprintf('JGLOBAL_LIST_NOTE', $this->escape($item->note)); ?>
208-
<?php endif; ?>
209-
</span>
206+
</span>
207+
<?php endif; ?>
210208
</th>
211209

212210
<!-- Item type -->

administrator/language/en-GB/com_scheduler.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ COM_SCHEDULER_MANAGER_TASK_EDIT="Edit Task"
8585
COM_SCHEDULER_MANAGER_TASK_NEW="New Task"
8686
COM_SCHEDULER_MSG_MANAGE_NO_TASK_PLUGINS="There are no task types matching your query."
8787
COM_SCHEDULER_NEW_TASK="New Task"
88-
COM_SCHEDULER_NO_NOTE=""
8988
COM_SCHEDULER_N_ITEMS_DELETED="%d tasks deleted."
9089
COM_SCHEDULER_N_ITEMS_DELETED_1="Task deleted."
9190
COM_SCHEDULER_N_ITEMS_FAILED_UNLOCKING="Failed to unlock %d tasks."

0 commit comments

Comments
 (0)