diff options
author | Jimmy Huynh <jimmy.huynh@etu.unistra.fr> | 2021-01-26 14:38:38 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-08 23:17:31 +0200 |
commit | 1ff8c26ac079c55602217bcbabf344955d6af33a (patch) | |
tree | b7c2b3787a3342bd2c267f25564eb483e8837dd7 | |
parent | 5342837d40a68fa1ecc1bad0a8e8224feca3a96d (diff) |
(+) Shared href navigation
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
-rw-r--r-- | js/controller/NavigationController.js | 10 | ||||
-rw-r--r-- | l10n/fr.js | 2 | ||||
-rw-r--r-- | l10n/fr.json | 2 | ||||
-rw-r--r-- | templates/index.php | 1 | ||||
-rw-r--r-- | templates/part.navigation.sharedfeed.php | 20 |
5 files changed, 35 insertions, 0 deletions
diff --git a/js/controller/NavigationController.js b/js/controller/NavigationController.js index 68a46900e..4782ff114 100644 --- a/js/controller/NavigationController.js +++ b/js/controller/NavigationController.js @@ -113,6 +113,11 @@ app.controller('NavigationController', function ($route, FEED_TYPE, FeedResource return this.getStarredCount() > 0; }; + this.isSharedUnread = function () { + return true; + //return this.getSharedCount() > 0; + }; + this.toggleFolder = function (folderName) { FolderResource.toggleOpen(folderName); }; @@ -150,6 +155,11 @@ app.controller('NavigationController', function ($route, FEED_TYPE, FeedResource $route.current.$$route.type === FEED_TYPE.STARRED; }; + this.isSharedActive = function () { + return $route.current && + $route.current.$$route.type === FEED_TYPE.SHARED; + }; + this.isExploreActive = function () { return $route.current && $route.current.$$route.type === FEED_TYPE.EXPLORE; diff --git a/l10n/fr.js b/l10n/fr.js index 3f3922294..b52f7bdd6 100644 --- a/l10n/fr.js +++ b/l10n/fr.js @@ -101,6 +101,8 @@ OC.L10N.register( "Deleted folder" : "Dossier supprimé", "Undo delete folder" : "Annuler la suppression du dossier", "Starred" : "Épinglés", + "Shared": "Partagés avec moi", + "Shared articles": "Articles partagés avec moi", "Unread articles" : "Articles non lus", "All articles" : "Tous les articles", "Settings" : "Paramètres", diff --git a/l10n/fr.json b/l10n/fr.json index 25bbdbed8..e0908ff64 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -99,6 +99,8 @@ "Deleted folder" : "Dossier supprimé", "Undo delete folder" : "Annuler la suppression du dossier", "Starred" : "Épinglés", + "Shared": "Partagés avec moi", + "Shared articles": "Articles partagés avec moi", "Unread articles" : "Articles non lus", "All articles" : "Tous les articles", "Settings" : "Paramètres", diff --git a/templates/index.php b/templates/index.php index 9ad38a0d5..bc4a06586 100644 --- a/templates/index.php +++ b/templates/index.php @@ -56,6 +56,7 @@ foreach (Plugin::getScripts() as $appName => $fileName) { <?php print_unescaped($this->inc('part.navigation.addfolder')) ?> <?php print_unescaped($this->inc('part.navigation.unreadfeed')) ?> <?php print_unescaped($this->inc('part.navigation.starredfeed')) ?> + <?php print_unescaped($this->inc('part.navigation.sharedfeed')) ?> <?php print_unescaped($this->inc( 'part.navigation.feed', ['folderId' => 'null'] )) ?> diff --git a/templates/part.navigation.sharedfeed.php b/templates/part.navigation.sharedfeed.php new file mode 100644 index 000000000..36be0856a --- /dev/null +++ b/templates/part.navigation.sharedfeed.php @@ -0,0 +1,20 @@ +<li ng-class="{ + active: Navigation.isShared(), + unread: Navigation.isSharedUnread() + }" + class="with-counter starred-feed"> + + <a class="icon-shared" ng-href="#/items/shared/"> + <?php p($l->t('Shared')) ?> + </a> + + <div class="app-navigation-entry-utils"> + <ul> + <li class="app-navigation-entry-utils-counter" + ng-show="Navigation.isStarredUnread()" + title="{{ Navigation.getStarredCount() }}"> + {{ Navigation.getStarredCount() | unreadCountFormatter }} + </li> + </ul> + </div> +</li>
\ No newline at end of file |