From: Andrew Dolgov Date: Wed, 30 Apr 2008 16:39:39 +0000 (+0100) Subject: prefs: rework filter editor main UI X-Git-Tag: 1.2.22.1~3 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a82dc5e490e0885f128ebbdf586dc9177ab8188c;p=tt-rss.git prefs: rework filter editor main UI --- diff --git a/modules/pref-filters.php b/modules/pref-filters.php index 81a3d0d1..bc5704b5 100644 --- a/modules/pref-filters.php +++ b/modules/pref-filters.php @@ -246,7 +246,7 @@ filter_type = ttrss_filter_types.id AND ttrss_filter_actions.id = action_id AND ttrss_filters.owner_uid = ".$_SESSION["uid"]." - ORDER by $sort"); + ORDER by action_description, $sort"); if (db_num_rows($result) != 0) { @@ -259,16 +259,10 @@ ".__('None')." "; - print " -   - ".__('Filter expression')." - ".__('Feed')." - ".__('Match')." - ".__('Action')." - ".__('Params').""; - $lnum = 0; - + + $cur_action_description = ""; + while ($line = db_fetch_assoc($result)) { $class = ($lnum % 2) ? "even" : "odd"; @@ -285,21 +279,37 @@ } else { $this_row_id = "id=\"FILRR-$filter_id\""; } - + + $line["filter_type_descr"] = __($line["filter_type_descr"]); + $line["action_description"] = __($line["action_description"]); + + if ($line["action_description"] != $cur_action_description) { + $cur_action_description = $line["action_description"]; + + print "$cur_action_description"; + + print " +   + ".__('Filter expression')." + ".__('Feed')." + ".__('Match')." + + ".__('Params').""; + + } + print ""; $line["reg_exp"] = htmlspecialchars($line["reg_exp"]); if (!$line["feed_title"]) $line["feed_title"] = __("All feeds"); + if (!$line["action_param"]) $line["action_param"] = "—"; $line["feed_title"] = htmlspecialchars($line["feed_title"]); print ""; - $line["filter_type_descr"] = __($line["filter_type_descr"]); - $line["action_description"] = __($line["action_description"]); - if (!$enabled) { $line["reg_exp"] = "" . $line["reg_exp"] . " " . __("(Disabled)").""; @@ -309,6 +319,8 @@ $line["filter_type_descr"] . ""; $line["action_description"] = "" . $line["action_description"] . ""; + $line["action_param"] = "" . + $line["action_param"] . ""; } print "" . @@ -326,8 +338,8 @@ print "" . $line["filter_type_descr"] . "$inverse_label"; - print "" . - $line["action_description"].""; +/* print "" . + $line["action_description"].""; */ print "" . $line["action_param"] . ""; diff --git a/tt-rss.css b/tt-rss.css index abed3456..e33b291a 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -438,6 +438,14 @@ table.prefFeedList td.feedEditCat { padding-top : 0.5em; } +table.prefFilterList td.filterEditCat { + font-weight : bold; + border-width : 0px 0px 1px 0px; + border-style : solid; + border-color : #88b0f0; + padding-top : 0.5em; +} + table.prefFeedList td.feedIcon { text-align : center; }