Explorar o código

Add filter preview button to label configuration (#9538)

Closes #9533

- The label configuration panel (`app/views/helpers/tag/update.phtml`) had no "Preview filters on existing articles (new window)" button, unlike the feed, category and global reading settings (the button was added in #7959).
- Add the same button below the auto-labelling filter textarea (`filteractions_label`). It uses the generic `configure/viewFilter` action, as in the global settings, with `filters_name=filteractions_label`.
- Label actions are not scoped to a feed or category: `feedController::applyLabelActions` matches the filter against all new articles. So the generic version, which does not restrict the search with `c:` or `f:`, is the appropriate one.
- The existing translation key `sub.feed.filteractions.view_filter` is reused, so no new translation is needed.
spa77k hai 3 horas
pai
achega
b8a738ec12
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      app/views/helpers/tag/update.phtml

+ 5 - 0
app/views/helpers/tag/update.phtml

@@ -49,6 +49,11 @@
 						}
 					?></textarea>
 					<p class="help"><?= _i('help') ?> <?= _t('sub.feed.filteractions.help') ?></p>
+					<p>
+						<button class="btn" formaction="<?= _url('configure', 'viewFilter', 'filters_name', 'filteractions_label') ?>" formtarget="_blank">
+							<?= _t('sub.feed.filteractions.view_filter') ?>
+						</button>
+					</p>
 				</div>
 			</div>
 		</fieldset>