diff options
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/configure/display.phtml | 6 | ||||
| -rwxr-xr-x | app/views/entry/read.phtml | 3 | ||||
| -rw-r--r-- | app/views/helpers/export/articles.phtml | 2 | ||||
| -rw-r--r-- | app/views/helpers/extension/configure.phtml | 2 | ||||
| -rw-r--r-- | app/views/helpers/feed/update.phtml | 7 | ||||
| -rw-r--r-- | app/views/helpers/index/normal/entry_bottom.phtml | 56 | ||||
| -rw-r--r-- | app/views/index/global.phtml | 5 | ||||
| -rw-r--r-- | app/views/index/normal.phtml | 24 | ||||
| -rw-r--r-- | app/views/index/reader.phtml | 21 | ||||
| -rwxr-xr-x | app/views/index/rss.phtml | 18 | ||||
| -rw-r--r-- | app/views/javascript/nbUnreadsPerFeed.phtml | 10 | ||||
| -rw-r--r-- | app/views/tag/getTagsForEntry.phtml | 2 |
12 files changed, 116 insertions, 40 deletions
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index 414fd2cd6..c6c08e3bc 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -39,7 +39,7 @@ <?php } ?> </div> <div class="properties"> - <div><?php echo sprintf('%s — %s', $theme['name'], _t('gen.short.by_author', $theme['author'])); ?></div> + <div><?php echo sprintf('%s — %s %s', $theme['name'], _t('gen.short.by_author'), $theme['author']); ?></div> <div><?php echo $theme['description'] ?></div> <div class="page-number"><?php echo sprintf('%d/%d', $i, $slides) ?></div> </div> @@ -79,8 +79,8 @@ <th> </th> <th title="<?php echo _t('gen.action.mark_read'); ?>"><?php echo _i('read'); ?></th> <th title="<?php echo _t('gen.action.mark_favorite'); ?>"><?php echo _i('bookmark'); ?></th> - <th><?php echo _t('conf.display.icon.sharing'); ?></th> <th><?php echo _t('conf.display.icon.related_tags'); ?></th> + <th><?php echo _t('conf.display.icon.sharing'); ?></th> <th><?php echo _t('conf.display.icon.publication_date'); ?></th> <th><?php echo _i('link'); ?></th> </tr> @@ -98,8 +98,8 @@ <th><?php echo _t('conf.display.icon.bottom_line'); ?></th> <td><input type="checkbox" name="bottomline_read" value="1"<?php echo FreshRSS_Context::$user_conf->bottomline_read ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->bottomline_read; ?>"/></td> <td><input type="checkbox" name="bottomline_favorite" value="1"<?php echo FreshRSS_Context::$user_conf->bottomline_favorite ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->bottomline_favorite; ?>"/></td> - <td><input type="checkbox" name="bottomline_sharing" value="1"<?php echo FreshRSS_Context::$user_conf->bottomline_sharing ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->bottomline_sharing; ?>"/></td> <td><input type="checkbox" name="bottomline_tags" value="1"<?php echo FreshRSS_Context::$user_conf->bottomline_tags ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->bottomline_tags; ?>"/></td> + <td><input type="checkbox" name="bottomline_sharing" value="1"<?php echo FreshRSS_Context::$user_conf->bottomline_sharing ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->bottomline_sharing; ?>"/></td> <td><input type="checkbox" name="bottomline_date" value="1"<?php echo FreshRSS_Context::$user_conf->bottomline_date ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->bottomline_date; ?>"/></td> <td><input type="checkbox" name="bottomline_link" value="1"<?php echo FreshRSS_Context::$user_conf->bottomline_link ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->bottomline_link; ?>"/></td> </tr> diff --git a/app/views/entry/read.phtml b/app/views/entry/read.phtml index 73977d94b..fb9e129f2 100755 --- a/app/views/entry/read.phtml +++ b/app/views/entry/read.phtml @@ -12,5 +12,6 @@ $url['params']['is_read'] = Minz_Request::param('is_read', true) ? '0' : '1'; FreshRSS::loadStylesAndScripts(); echo json_encode(array( 'url' => str_ireplace('&', '&', Minz_Url::display($url)), - 'icon' => _i($url['params']['is_read'] === '1' ? 'unread' : 'read') + 'icon' => _i($url['params']['is_read'] === '1' ? 'unread' : 'read'), + 'tags' => $this->tags, )); diff --git a/app/views/helpers/export/articles.phtml b/app/views/helpers/export/articles.phtml index 75651483a..b8958f527 100644 --- a/app/views/helpers/export/articles.phtml +++ b/app/views/helpers/export/articles.phtml @@ -34,7 +34,7 @@ foreach ($this->entriesRaw as $entryRaw) { 'id' => $entry->guid(), 'categories' => array_values($entry->tags()), 'title' => $entry->title(), - 'author' => $entry->author(), + 'author' => $entry->authors(true), //TODO: Make an array like tags? 'published' => $entry->date(true), 'updated' => $entry->date(true), 'alternate' => array(array( diff --git a/app/views/helpers/extension/configure.phtml b/app/views/helpers/extension/configure.phtml index 95d968aba..cde872aa0 100644 --- a/app/views/helpers/extension/configure.phtml +++ b/app/views/helpers/extension/configure.phtml @@ -5,7 +5,7 @@ : _t('admin.extensions.disabled'); ?> </h1> - <p class="alert alert-warn"><?php echo $this->extension->getDescription(); ?> — <?php echo _t('gen.short.by_author', $this->extension->getAuthor()); ?></p> + <p class="alert alert-warn"><?php echo $this->extension->getDescription(); ?> — <?php echo _t('gen.short.by_author'), ' ', $this->extension->getAuthor(); ?></p> <h2><?php echo _t('gen.action.manage'); ?></h2> <?php diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml index 7144aab46..4dbaacd04 100644 --- a/app/views/helpers/feed/update.phtml +++ b/app/views/helpers/feed/update.phtml @@ -205,6 +205,13 @@ </div> </div> + <div class="form-group"> + <label class="group-name" for="clear_cache"><?php echo _t('sub.feed.clear_cache'); ?></label> + <div class="group-controls"> + <input type="checkbox" name="clear_cache" id="clear_cache" value="1"<?php echo $this->feed->attributes('clear_cache') ? ' checked="checked"' : ''; ?> /> + </div> + </div> + <?php if (FreshRSS_Auth::hasAccess('admin')) { ?> <div class="form-group"> <label class="group-name" for="timeout"><?php echo _t('sub.feed.timeout'); ?></label> diff --git a/app/views/helpers/index/normal/entry_bottom.phtml b/app/views/helpers/index/normal/entry_bottom.phtml index 6417da4cb..784a41e1f 100644 --- a/app/views/helpers/index/normal/entry_bottom.phtml +++ b/app/views/helpers/index/normal/entry_bottom.phtml @@ -7,6 +7,7 @@ $bottomline_read = FreshRSS_Context::$user_conf->bottomline_read; $bottomline_favorite = FreshRSS_Context::$user_conf->bottomline_favorite; $bottomline_sharing = FreshRSS_Context::$user_conf->bottomline_sharing && (count($sharing) > 0); + $bottomline_labels = true; //TODO $bottomline_tags = FreshRSS_Context::$user_conf->bottomline_tags; $bottomline_date = FreshRSS_Context::$user_conf->bottomline_date; $bottomline_link = FreshRSS_Context::$user_conf->bottomline_link; @@ -32,8 +33,41 @@ echo _i($this->entry->isFavorite() ? 'starred' : 'non-starred'); ?></a><?php ?></li><?php } - } ?> - <li class="item"><?php + } + if ($bottomline_labels) { + ?><li class="item"> + <div class="dropdown dynamictags"> + <div id="dropdown-labels-<?php echo $this->entry->id();?>" class="dropdown-target"></div> + <?php echo FreshRSS_Themes::alt('label'); ?> + <a class="dropdown-toggle" href="#dropdown-labels-<?php echo $this->entry->id();?>"><?php + echo _t('index.menu.tags'); + ?></a> + <ul class="dropdown-menu"> + <li class="dropdown-close"><a href="#close">❌</a></li> + <!-- Ajax --> + </ul> + </div> + </li><?php + } + $tags = $bottomline_tags ? $this->entry->tags() : null; + if (!empty($tags)) { + ?><li class="item"> + <div class="dropdown"> + <div id="dropdown-tags-<?php echo $this->entry->id();?>" class="dropdown-target"></div> + <?php echo _i('tag'); ?> + <a class="dropdown-toggle" href="#dropdown-tags-<?php echo $this->entry->id();?>"><?php + echo _t('index.tag.related'); + ?></a> + <ul class="dropdown-menu"> + <li class="dropdown-close"><a href="#close">❌</a></li><?php + foreach ($tags as $tag) { + ?><li class="item"><a href="<?php echo _url('index', 'index', 'search', '#' . str_replace(' ', '+', htmlspecialchars_decode($tag, ENT_QUOTES))); ?>"><?php echo $tag; ?></a></li><?php + } ?> + </ul> + </div> + </li><?php + } + ?><li class="item"><?php if ($bottomline_sharing) { ?><div class="dropdown"> <div id="dropdown-share-<?php echo $this->entry->id();?>" class="dropdown-target"></div> @@ -69,24 +103,6 @@ </div> <?php } ?> </li><?php - $tags = $bottomline_tags ? $this->entry->tags() : null; - if (!empty($tags)) { - ?><li class="item"> - <div class="dropdown"> - <div id="dropdown-tags-<?php echo $this->entry->id();?>" class="dropdown-target"></div> - <?php echo _i('tag'); ?> - <a class="dropdown-toggle" href="#dropdown-tags-<?php echo $this->entry->id();?>"><?php - echo _t('index.tag.related'); - ?></a> - <ul class="dropdown-menu"> - <li class="dropdown-close"><a href="#close">❌</a></li><?php - foreach($tags as $tag) { - ?><li class="item"><a href="<?php echo _url('index', 'index', 'search', '#' . htmlspecialchars_decode($tag, ENT_QUOTES)); ?>"><?php echo $tag; ?></a></li><?php - } ?> - </ul> - </div> - </li><?php - } if ($bottomline_date) { ?><li class="item date"><?php echo $this->entry->date(); ?></li><?php } diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml index 2f25b6dc2..3566abe7e 100644 --- a/app/views/index/global.phtml +++ b/app/views/index/global.phtml @@ -1,6 +1,11 @@ <?php $this->partial('nav_menu'); + flush(); + if (isset($this->callbackBeforeEntries)) { + call_user_func($this->callbackBeforeEntries, $this); + } + $class = ''; if (FreshRSS_Context::$user_conf->hide_read_feeds && FreshRSS_Context::isStateEnabled(FreshRSS_Entry::STATE_NOT_READ) && diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index c7cab2d3f..d5ae8e2f9 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -3,6 +3,11 @@ $this->partial('aside_feed'); $this->partial('nav_menu'); +flush(); +if (isset($this->callbackBeforeEntries)) { + call_user_func($this->callbackBeforeEntries, $this); +} + if (!empty($this->entries)) { $display_today = true; $display_yesterday = true; @@ -20,7 +25,7 @@ if (!empty($this->entries)) { </div><?php foreach ($this->entries as $item) { $this->entry = Minz_ExtensionManager::callHook('entry_before_display', $item); - if (is_null($this->entry)) { + if ($this->entry == null) { continue; } @@ -67,10 +72,19 @@ if (!empty($this->entries)) { ?><div class="flux_content"> <div class="content <?php echo $content_width; ?>"> <h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?php echo $this->entry->link(); ?>"><?php echo $this->entry->title(); ?></a></h1> - <?php - $author = $this->entry->author(); - echo $author != '' ? '<div class="author">' . _t('gen.short.by_author', $author) . '</div>' : '', - $lazyload && $hidePosts ? lazyimg($this->entry->content()) : $this->entry->content(); + <div class="author"><?php + $authors = $this->entry->authors(); + if (is_array($authors)): + $first = true; + foreach ($authors as $author): + echo $first ? _t('gen.short.by_author') . ' ' : '· '; + $first = false; + ?> +<em><a href="<?php echo _url('index', 'index', 'search', 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))); ?>"><?php echo $author; ?></a></em> + <?php endforeach; ?> + </div><?php + endif; + echo $lazyload && $hidePosts ? lazyimg($this->entry->content()) : $this->entry->content(); ?> </div><?php diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml index eb6613b28..c15b936ee 100644 --- a/app/views/index/reader.phtml +++ b/app/views/index/reader.phtml @@ -1,6 +1,11 @@ <?php $this->partial('nav_menu'); +flush(); +if (isset($this->callbackBeforeEntries)) { + call_user_func($this->callbackBeforeEntries, $this); +} + if (!empty($this->entries)) { $lazyload = FreshRSS_Context::$user_conf->lazyload; $content_width = FreshRSS_Context::$user_conf->content_width; @@ -39,9 +44,19 @@ if (!empty($this->entries)) { <h1 class="title"><a target="_blank" rel="noreferrer" class="go_website" href="<?php echo $item->link(); ?>"><?php echo $item->title(); ?></a></h1> <div class="author"><?php - $author = $item->author(); - echo $author != '' ? _t('gen.short.by_author', $author) . ' — ' : '', - $item->date(); + $authors = $item->authors(); + if (is_array($authors)): + $first = true; + foreach ($authors as $author): + echo $first ? _t('gen.short.by_author') . ' ' : '· '; + $first = false; + ?> +<em><a href="<?php echo _url('index', 'index', 'search', 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))); ?>"><?php echo $author; ?></a></em> + <?php + endforeach; + echo ' — '; + endif; + echo $item->date(); ?></div> <?php echo $item->content(); ?> diff --git a/app/views/index/rss.phtml b/app/views/index/rss.phtml index 86074517c..104e03d15 100755 --- a/app/views/index/rss.phtml +++ b/app/views/index/rss.phtml @@ -13,10 +13,20 @@ foreach ($this->entries as $item) { <item> <title><?php echo $item->title(); ?></title> <link><?php echo $item->link(); ?></link> - <?php $author = $item->author(); ?> - <?php if ($author != '') { ?> - <dc:creator><?php echo $author; ?></dc:creator> - <?php } ?> + <?php + $authors = $item->authors(); + if (is_array($authors)) { + foreach ($authors as $author) { + echo "\t\t\t" , '<author>', $author, '</author>', "\n"; + } + } + $categories = $item->tags(); + if (is_array($categories)) { + foreach ($categories as $category) { + echo "\t\t\t" , '<category>', $category, '</category>', "\n"; + } + } + ?> <description><![CDATA[<?php echo $item->content(); ?>]]></description> diff --git a/app/views/javascript/nbUnreadsPerFeed.phtml b/app/views/javascript/nbUnreadsPerFeed.phtml index 68f98ce9e..ce4db37b7 100644 --- a/app/views/javascript/nbUnreadsPerFeed.phtml +++ b/app/views/javascript/nbUnreadsPerFeed.phtml @@ -1,8 +1,14 @@ <?php -$result = array(); +$result = array( + 'feeds' => array(), + 'tags' => array(), +); foreach ($this->categories as $cat) { foreach ($cat->feeds() as $feed) { - $result[$feed->id()] = $feed->nbNotRead(); + $result['feeds'][$feed->id()] = $feed->nbNotRead(); } } +foreach ($this->tags as $tag) { + $result['tags'][$tag->id()] = $tag->nbUnread(); +} echo json_encode($result); diff --git a/app/views/tag/getTagsForEntry.phtml b/app/views/tag/getTagsForEntry.phtml new file mode 100644 index 000000000..76b2ada4e --- /dev/null +++ b/app/views/tag/getTagsForEntry.phtml @@ -0,0 +1,2 @@ +<?php +echo json_encode($this->tags); |
