mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 17:45:55 +00:00
render headline labels on the client
This commit is contained in:
@@ -292,22 +292,17 @@ class Article extends Handler_Protected {
|
||||
|
||||
$label = Labels::find_caption($label_id, $_SESSION["uid"]);
|
||||
|
||||
$reply["info-for-headlines"] = array();
|
||||
$reply["labels-for"] = [];
|
||||
|
||||
if ($label) {
|
||||
|
||||
foreach ($ids as $id) {
|
||||
|
||||
if ($assign)
|
||||
Labels::add_article($id, $label, $_SESSION["uid"]);
|
||||
else
|
||||
Labels::remove_article($id, $label, $_SESSION["uid"]);
|
||||
|
||||
$labels = $this->_get_labels($id, $_SESSION["uid"]);
|
||||
|
||||
array_push($reply["info-for-headlines"],
|
||||
array("id" => $id, "labels" => $this->_format_labels_html($labels)));
|
||||
|
||||
array_push($reply["labels-for"],
|
||||
["id" => (int)$id, "labels" => $this->_get_labels($id)]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -216,11 +216,7 @@ class Feeds extends Handler_Protected {
|
||||
|
||||
if (!is_array($labels)) $labels = Article::_get_labels($id);
|
||||
|
||||
$labels_str = "<span class=\"HLLCTR-$id\">";
|
||||
$labels_str .= Article::_format_labels_html($labels);
|
||||
$labels_str .= "</span>";
|
||||
|
||||
$line["labels"] = $labels_str;
|
||||
$line["labels"] = Article::_get_labels($id);
|
||||
|
||||
if (count($topmost_article_ids) < 3) {
|
||||
array_push($topmost_article_ids, $id);
|
||||
|
||||
Reference in New Issue
Block a user