mirror of
https://github.com/YunoHost-Apps/leed_ynh.git
synced 2024-09-03 19:26:32 +02:00
209 lines
14 KiB
HTML
209 lines
14 KiB
HTML
|
{include="header"}
|
||
|
|
||
|
<!--
|
||
|
@nom: index
|
||
|
@auteur: Idleman (idleman@idleman.fr)
|
||
|
@description: Page d'accueil et de lecture des flux
|
||
|
-->
|
||
|
|
||
|
|
||
|
{if="($configurationManager->get('articleDisplayAnonymous')=='1') || ($myUser!=false)"}
|
||
|
|
||
|
|
||
|
<div id="helpPanel">
|
||
|
<h3>Raccourcis clavier</h3>
|
||
|
<ul>
|
||
|
<li>{function="_t('HELP_M')"}</li>
|
||
|
<li>{function="_t('HELP_L')"}</li>
|
||
|
<li>{function="_t('HELP_S')"}</li>
|
||
|
<li>{function="_t('HELP_N')"}</li>
|
||
|
<li>{function="_t('HELP_V')"}</li>
|
||
|
<li>{function="_t('HELP_P')"}</li>
|
||
|
<li>{function="_t('HELP_SPC')"}</li>
|
||
|
<li>{function="_t('HELP_K')"}</li>
|
||
|
<li>{function="_t('HELP_O_ENTER')"}</li>
|
||
|
<li>{function="_t('HELP_H')"}</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
|
||
|
<div id="main" class="wrapper clearfix index">
|
||
|
<!-- -->
|
||
|
<!-- MENU -->
|
||
|
<!-- -->
|
||
|
|
||
|
|
||
|
<div id="menuBar">
|
||
|
{function="Plugin::callHook("menu_pre_folder_menu", array(&$myUser))"}
|
||
|
<aside>
|
||
|
<!-- TITRE MENU + OPTION TOUT MARQUER COMME LU -->
|
||
|
<h3 class="left">{function="_t('FEED')"}</h3> <button style="margin: 25px 0px 0px 10px;" onclick="if(confirm('{function="_t('CONFIRM_MARK_ALL_AS_READ')"}'))window.location='action.php?action=readAll'">{function="_t('MARK_ALL_AS_READ')"}</button>
|
||
|
<button class="right" onclick="toggleUnreadFeedFolder(this,{$displayOnlyUnreadFeedFolder_reverse});" title="{function="_t('DISPLAY_ONLY_UNREAD_FEEDFOLDER')"}" style="margin: 25px 4px 0px 10px;">↕</button>
|
||
|
{function="Plugin::callHook("menu_post_header_options", array(&$myUser))"}
|
||
|
<ul class="clear">
|
||
|
|
||
|
|
||
|
|
||
|
<!--Pour chaques dossier-->
|
||
|
{loop="folders"}
|
||
|
{$feeds=""}
|
||
|
<!--on récupere tous les flux lié au dossier-->
|
||
|
{if="isset($allFeedsPerFolder[$value->getId()])"}
|
||
|
{$feeds=$allFeedsPerFolder[$value->getId()]}
|
||
|
{/if}
|
||
|
{if="isset($allEvents[$value->getId()])"}
|
||
|
{$unreadEventsForFolder=$allEvents[$value->getId()]}
|
||
|
{/if}
|
||
|
|
||
|
<!-- DOSSIER -->
|
||
|
<li>
|
||
|
|
||
|
{if="$displayOnlyUnreadFeedFolder=='true'"}
|
||
|
<!-- affichage uniquement des dossiers comportant des articles non lus -->
|
||
|
{if="$unreadEventsForFolder>0"}
|
||
|
<!-- cas de dossier avec des non lus -->
|
||
|
<h1 class="folder">
|
||
|
{function="Plugin::callHook("menu_pre_folder_link", array(&$value))"}
|
||
|
<a title="{function="_t('READ_FOLDER_ITEMS')"}" href="index.php?action=selectedFolder&folder={$value->getId()}">{$value->getName()}</a> <a class="readFolder" title="{function="_t('FOLD_UNFOLD_FOLDER')"}" onclick="toggleFolder(this,{$value->getId()});" >{if="!$value->getIsopen()"}{function="_t('UNFOLD')"}{else}{function="_t('FOLD')"}{/if}</a> {if="$unreadEventsForFolder!=0"}<a class="unreadForFolder" title="{function="_t('MARK_AS_READ_FOLDER_ITEMS',array($unreadEventsForFolder))"}" onclick="if(confirm('{function="_t('READ_ALL_FOLDER_CONFIRM')"}'))window.location='action.php?action=readFolder&folder={$value->getId()}';">{$unreadEventsForFolder} {function="_t('UNREAD')"}</a>{/if}
|
||
|
{function="Plugin::callHook("menu_post_folder_link", array(&$value))"}
|
||
|
</h1>
|
||
|
{else}
|
||
|
<!-- cas de dossier sans non lus -->
|
||
|
<h1 class="folder hidefeed" style="display:none;">
|
||
|
{function="Plugin::callHook("menu_pre_folder_link", array(&$value))"}
|
||
|
<a title="{function="_t('READ_FOLDER_ITEMS')"}" href="index.php?action=selectedFolder&folder={$value->getId()}">{$value->getName()}</a> <a class="readFolder" title="{function="_t('FOLD_UNFOLD_FOLDER')"}" onclick="toggleFolder(this,{$value->getId()});" >{if="!$value->getIsopen()"}{function="_t('UNFOLD')"}{else}{function="_t('FOLD')"}{/if}</a> {if="$unreadEventsForFolder!=0"}<a class="unreadForFolder" title="{function="_t('MARK_AS_READ_FOLDER_ITEMS',array($unreadEventsForFolder))"}" onclick="if(confirm('{function="_t('READ_ALL_FOLDER_CONFIRM')"}'))window.location='action.php?action=readFolder&folder={$value->getId()}';">{$unreadEventsForFolder} {function="_t('UNREAD')"}</a>{/if}
|
||
|
{function="Plugin::callHook("menu_post_folder_link", array(&$value))"}
|
||
|
</h1>
|
||
|
{/if}
|
||
|
{else}
|
||
|
<!-- affichage de tous les dossiers -->
|
||
|
{if="$unreadEventsForFolder>0"}
|
||
|
<!-- cas de dossier avec des non lus -->
|
||
|
<h1 class="folder">
|
||
|
{function="Plugin::callHook("menu_pre_folder_link", array(&$value))"}
|
||
|
<a title="{function="_t('READ_FOLDER_ITEMS')"}" href="index.php?action=selectedFolder&folder={$value->getId()}">{$value->getName()}</a> <a class="readFolder" title="{function="_t('FOLD_UNFOLD_FOLDER')"}" onclick="toggleFolder(this,{$value->getId()});" >{if="!$value->getIsopen()"}{function="_t('UNFOLD')"}{else}{function="_t('FOLD')"}{/if}</a> {if="$unreadEventsForFolder!=0"}<a class="unreadForFolder" title="{function="_t('MARK_AS_READ_FOLDER_ITEMS',array($unreadEventsForFolder))"}" onclick="if(confirm('{function="_t('READ_ALL_FOLDER_CONFIRM')"}'))window.location='action.php?action=readFolder&folder={$value->getId()}';">{$unreadEventsForFolder} {function="_t('UNREAD')"}</a>{/if}
|
||
|
{function="Plugin::callHook("menu_post_folder_link", array(&$value))"}
|
||
|
</h1>
|
||
|
{else}
|
||
|
<!-- cas de dossier sans non lus donc à cacher si on passe dans l'autre mode -->
|
||
|
<h1 class="folder hidefeed">
|
||
|
{function="Plugin::callHook("menu_pre_folder_link", array(&$value))"}
|
||
|
<a title="{function="_t('READ_FOLDER_ITEMS')"}" href="index.php?action=selectedFolder&folder={$value->getId()}">{$value->getName()}</a> <a class="readFolder" title="{function="_t('FOLD_UNFOLD_FOLDER')"}" onclick="toggleFolder(this,{$value->getId()});" >{if="!$value->getIsopen()"}{function="_t('UNFOLD')"}{else}{function="_t('FOLD')"}{/if}</a> {if="$unreadEventsForFolder!=0"}<a class="unreadForFolder" title="{function="_t('MARK_AS_READ_FOLDER_ITEMS',array($unreadEventsForFolder))"}" onclick="if(confirm('{function="_t('READ_ALL_FOLDER_CONFIRM')"}'))window.location='action.php?action=readFolder&folder={$value->getId()}';">{$unreadEventsForFolder} {function="_t('UNREAD')"}</a>{/if}
|
||
|
{function="Plugin::callHook("menu_post_folder_link", array(&$value))"}
|
||
|
</h1>
|
||
|
{/if}
|
||
|
{/if}
|
||
|
<!-- FLUX DU DOSSIER -->
|
||
|
<ul {if="!$value->getIsopen()"}style="display:none;"{/if}>
|
||
|
|
||
|
{if="count($feeds)!=0"}
|
||
|
{loop="feeds"}
|
||
|
{if="$displayOnlyUnreadFeedFolder=='true'"}
|
||
|
<!-- Affichage des feeds ayant des articles non lus -->
|
||
|
{if="isset($unread[$value2['id']])"}
|
||
|
<li>
|
||
|
{function="Plugin::callHook("menu_pre_feed_link", array(&$value))"} <a href="index.php?action=selectedFeed&feed={$value2['id']}" title="{$value2['url']}">{function="Functions::truncate($value2['name'],37)"} </a>
|
||
|
<button class="right" style="margin:5px 0 0 10px;" onclick="if(confirm('{function="_t('CONFIRM_MARK_FEED_AS_READ')"}'))window.location='action.php?action=readAll&feed={$value2['id']}';">
|
||
|
<span title="{function="_t('MARK_AS_READ')"}">{$unread[$value2['id']]}</span>
|
||
|
</button>
|
||
|
{function="Plugin::callHook("menu_post_feed_link", array(&$value))"}
|
||
|
</li>
|
||
|
{else}
|
||
|
<!-- On cache les feeds n'ayant pas d'article non lus -->
|
||
|
<li class="hidefeed" style="display:none;">
|
||
|
{function="Plugin::callHook("menu_pre_feed_link", array(&$value))"} <a href="index.php?action=selectedFeed&feed={$value2['id']}" title="{$value2['url']}">{function="Functions::truncate($value2['name'],37)"} </a>
|
||
|
{if="isset($unread[$value2['id']])"}
|
||
|
<button class="right" style="margin:5px 0 0 10px;" onclick="if(confirm('{function="_t('CONFIRM_MARK_FEED_AS_READ')"}'))window.location='action.php?action=readAll&feed={$value2['id']}';">
|
||
|
<span title="{function="_t('MARK_AS_READ')"}">{$unread[$value2['id']]}</span>
|
||
|
</button>
|
||
|
{/if}
|
||
|
{function="Plugin::callHook("menu_post_feed_link", array(&$value))"}
|
||
|
</li>
|
||
|
{/if}
|
||
|
{else}
|
||
|
<!-- Affichage de tous les feeds -->
|
||
|
{if="isset($unread[$value2['id']])"}
|
||
|
<li>
|
||
|
{else} <!-- On affiche même ceux qui non pas d'article non lus -->
|
||
|
<li class="hidefeed">
|
||
|
{/if}
|
||
|
{function="Plugin::callHook("menu_pre_feed_link", array(&$value))"} <a href="index.php?action=selectedFeed&feed={$value2['id']}" title="{$value2['url']}">{function="Functions::truncate($value2['name'],37)"} </a>
|
||
|
{if="isset($unread[$value2['id']])"}
|
||
|
<button class="right" style="margin:5px 0 0 10px;" onclick="if(confirm('{function="_t('CONFIRM_MARK_FEED_AS_READ')"}'))window.location='action.php?action=readAll&feed={$value2['id']}';">
|
||
|
<span title="{function="_t('MARK_AS_READ')"}">{$unread[$value2['id']]}</span>
|
||
|
</button>
|
||
|
{/if}
|
||
|
{function="Plugin::callHook("menu_post_feed_link", array(&$value))"}
|
||
|
</li>
|
||
|
{/if}
|
||
|
{/loop}
|
||
|
{/if}
|
||
|
</ul>
|
||
|
<!-- FIN FLUX DU DOSSIER -->
|
||
|
</li>
|
||
|
<!-- FIN DOSSIER -->
|
||
|
{$unreadEventsForFolder=0}
|
||
|
{/loop}
|
||
|
|
||
|
|
||
|
|
||
|
</ul>
|
||
|
</aside>
|
||
|
|
||
|
{function="Plugin::callHook("menu_post_folder_menu", array(&$myUser))"}
|
||
|
</div>
|
||
|
<!-- -->
|
||
|
<!-- ARTICLES -->
|
||
|
<!-- -->
|
||
|
|
||
|
<article>
|
||
|
<!-- ENTETE ARTICLE -->
|
||
|
<header class="articleHead">
|
||
|
|
||
|
{if="$action=='selectedFeed' || ($action=='selectedFeedNonLu')"}
|
||
|
<!-- AFFICHAGE DES EVENEMENTS D'UN FLUX EN PARTICULIER -->
|
||
|
|
||
|
|
||
|
<h1 class="articleSection"><a target="_blank" href="{$currentFeed->getWebSite()}">{$currentFeed->getName()}</a></h1>
|
||
|
<div class="clear"></div>
|
||
|
{$currentFeed->getDescription()}
|
||
|
{function="_t('SEE_THE')"}
|
||
|
<a href="index.php?action=selectedFeedNonLu&feed={$_['feed']}&page={$page}">{function="ucfirst(_t('UNREAD'))"}</a> |
|
||
|
<a href="index.php?action=selectedFeed&feed={$_['feed']}&page={$page}&order=older">{function="_t('OLDER')"}</a> {function="_t('IN_FIRST')"}
|
||
|
{/if}
|
||
|
|
||
|
{if="$action=='selectedFolder'"}
|
||
|
<!-- AFFICHAGE DES EVENEMENTS D'UN DOSSIER EN PARTICULIER -->
|
||
|
<h1 class="articleSection">{function="_t('FOLDER')"} : {$currentFolder->getName()}</h1>
|
||
|
<p>{function="_t('SEE_EVENTS_FOR_FOLDER',array($currentFolder->getName()))"}</p>
|
||
|
{/if}
|
||
|
|
||
|
{if="$action=='favorites'"}
|
||
|
<!-- AFFICHAGE DES EVENEMENTS FAVORIS -->
|
||
|
<h1 class="articleSection">{function="_t('FAVORITES_EVENTS',array('<span id="nbarticle">'.$numberOfItem.'</span>'))"}</h1>
|
||
|
{/if}
|
||
|
|
||
|
|
||
|
{if="($action=='unreadEvents') || ($action=='')"}
|
||
|
<!-- AFFICHAGE DES EVENEMENTS NON LU (COMPORTEMENT PAR DEFAUT) -->
|
||
|
<h1 class="articleSection">{function="_t('UNREAD')"} (<span id="nbarticle">{$numberOfItem}</span>)</h1><div class="pointer right readUnreadButton" onmouseout="document.getElementById( 'helpPanel' ).style.display = 'none'" onmouseover="document.getElementById( 'helpPanel' ).style.display = 'block'" title="{function="_t('HELP_H_?')"}">?</div>
|
||
|
{/if}
|
||
|
|
||
|
<div class="clear"></div>
|
||
|
</header>
|
||
|
{include="article"}
|
||
|
</article>
|
||
|
|
||
|
|
||
|
</div> <!-- #main -->
|
||
|
|
||
|
{else}
|
||
|
<div id="main" class="wrapper clearfix">
|
||
|
<article>
|
||
|
<h3>{function="_t('YOU_MUST_BE_LOGGED')"}</h3>
|
||
|
<p>{function="_t('IF_ADMIN_THEN_CONFIG')"}</p>
|
||
|
</article>
|
||
|
</div>
|
||
|
{/if}
|
||
|
|
||
|
{include="footer"}
|