-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
240 lines (209 loc) · 16.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
<!-- {$view = (isset($_['view'])?$_['view']:'');} -->
{if="$view=='chfolder'"}
{include="mag/chfolder"}
{/if}
{if="$view=='chflux'"}
{include="mag/chflux"}
{/if}
{if="$view=='flux'"}
{include="mag/flux"}
{/if}
{if="$view=='article'"}
{include="mag/article"}
{/if}
{if="$view==''"}
{include="header"}
<!--
@nom: index
@auteur: Idleman ([email protected])
@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']])"}
{if="$feedState->getById($value2['id'])->getLastSyncInError()==0"}
<li>
{else}
<li class="errorSync" title="{function="_t('SYNCHRONISATION_ERROR')"}">
{/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>
<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 -->
{if="$feedState->getById($value2['id'])->getLastSyncInError()==0"}
<li class="hidefeed" style="display:none;">
{else}
<li class="hidefeed errorSync" style="display:none;" title="{function="_t('SYNCHRONISATION_ERROR')"}">
{/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}
{else}
<!-- Affichage de tous les feeds -->
{if="isset($unread[$value2['id']])"}
{if="$feedState->getById($value2['id'])->getLastSyncInError()==0"}
<li>
{else}
<li class="errorSync" title="{function="_t('SYNCHRONISATION_ERROR')"}">
{/if}
{else} <!-- On affiche même ceux qui non pas d'article non lus -->
{if="$feedState->getById($value2['id'])->getLastSyncInError()==0"}
<li class="hidefeed">
{else}
<li class="hidefeed errorSync" title="{function="_t('SYNCHRONISATION_ERROR')"}">
{/if}
{/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 -->
<!-- -->
<a href="index.php?view=chfolder">Affichage mode Magazine</a>
<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"}
{/if}