Răsfoiți Sursa

Improved: Button to export OMPL of a category (#6519)

* Update update.phtml

* fixed

* Update app/views/helpers/category/update.phtml

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>

* Update update.phtml

* do it for feed too

* Update update.phtml

* Minor whitespace

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
maTh 1 an în urmă
părinte
comite
5b197b8130

+ 15 - 0
app/views/helpers/category/update.phtml

@@ -222,7 +222,9 @@
 					<button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
 				</div>
 			</div>
+		</fieldset>
 
+		<fieldset>
 			<?php if (!$this->category->isDefault()): ?>
 			<p class="alert alert-warn">
 				<?= _t('sub.feed.moved_category_deleted', _t('gen.short.default_category')) ?>
@@ -243,5 +245,18 @@
 				</div>
 			</div>
 		</fieldset>
+
+		<fieldset>
+			<legend><?= _t('sub.import_export.export') ?></legend>
+			<div class="form-group">
+				<label class="group-name"><?= _t('sub.feed.export-as-opml.label') ?></label>
+				<div class="group-controls">
+					<a class="btn btn-important" href="<?= _url('index', 'opml', 'get', 'c_' . $this->category->id()) ?>" download="c_<?= $this->category->id() ?> <?= $this->category->name() ?>.opml.xml">
+						<?= _t('sub.feed.export-as-opml.download') ?>
+					</a>
+					<p class="help"><?= _i('help') ?> <?= _t('sub.feed.export-as-opml.help') ?></p>
+				</div>
+			</div>
+		</fieldset>
 	</form>
 </div>

+ 2 - 2
app/views/helpers/feed/update.phtml

@@ -765,7 +765,7 @@
 		</fieldset>
 	</form>
 
-	
+
 	<h2><?= _t('sub.feed.maintenance.title') ?></h2>
 	<div class="form-group">
 		<div class="group-controls">
@@ -791,7 +791,7 @@
 	<div class="form-group">
 		<label class="group-name"><?= _t('sub.feed.export-as-opml.label') ?></label>
 		<div class="group-controls">
-			<a class="btn btn-important" href="<?= _url('index', 'opml', 'get', 'f_'.$this->feed->id()) ?>" download="<?= 'f_'.$this->feed->id()?> <?= $this->feed->name(true) ?>.opml.xml">
+			<a class="btn btn-important" href="<?= _url('index', 'opml', 'get', 'f_' . $this->feed->id()) ?>" download="f_<?= $this->feed->id() ?> <?= $this->feed->name(true) ?>.opml.xml">
 				<?= _t('sub.feed.export-as-opml.download') ?>
 			</a>
 			<p class="help"><?= _i('help') ?> <?= _t('sub.feed.export-as-opml.help') ?></p>