Explorar el Código

Improved: Subscription Management: Show the position number (#4679)

* the code

* improvement

* fix doubled parameter
maTh hace 3 años
padre
commit
a9d4c78931

+ 1 - 1
app/Controllers/subscriptionController.php

@@ -19,7 +19,7 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController {
 
 		$catDAO->checkDefault();
 		$feedDAO->updateTTL();
-		$this->view->categories = $catDAO->listSortedCategories(false, true, true);
+		$this->view->categories = $catDAO->listSortedCategories(false, true);
 		$this->view->default_category = $catDAO->getDefault();
 
 		$signalError = false;

+ 1 - 1
app/views/subscription/index.phtml

@@ -34,7 +34,7 @@
 		?>
 		<div class="box">
 			<div class="box-title">
-				<a class="configure open-slider" href="<?= _url('subscription', 'category', 'id', $cat->id()) ?>"><?= _i('configure') ?></a>
+				<a class="configure open-slider" href="<?= _url('subscription', 'category', 'id', $cat->id()) ?>" data-cat-position="<?= $cat->attributes('position') ?>"><?= _i('configure') ?></a>
 				<?= $cat->name() ?>
 				<?php if ($cat->kind() == FreshRSS_Category::KIND_DYNAMIC_OPML) { echo _i('opml-dyn'); } ?>
 			</div>

+ 16 - 0
p/themes/base-theme/frss.css

@@ -1800,6 +1800,22 @@ input:checked + .slide-container .properties {
 	font-weight: initial;
 }
 
+.box .box-title .configure:not([data-cat-position=""])::after {
+	margin: 0.5rem 0px 0px;
+	padding: 5px 10px;
+	min-width: 20px;
+	display: block;
+	content: attr(data-cat-position);
+	position: absolute;
+	top: 0px;
+	right: 10px;
+	text-align: center;
+	font-size: 0.75rem;
+	border-radius: 12px;
+	line-height: 1;
+	font-weight: initial;
+}
+
 .feed .item-title:not([data-unread="0"])::after {
 	margin: 1em 0 0 0;
 }

+ 16 - 0
p/themes/base-theme/frss.rtl.css

@@ -1800,6 +1800,22 @@ input:checked + .slide-container .properties {
 	font-weight: initial;
 }
 
+.box .box-title .configure:not([data-cat-position=""])::after {
+	margin: 0.5rem 0px 0px;
+	padding: 5px 10px;
+	min-width: 20px;
+	display: block;
+	content: attr(data-cat-position);
+	position: absolute;
+	top: 0px;
+	left: 10px;
+	text-align: center;
+	font-size: 0.75rem;
+	border-radius: 12px;
+	line-height: 1;
+	font-weight: initial;
+}
+
 .feed .item-title:not([data-unread="0"])::after {
 	margin: 1em 0 0 0;
 }