diff options
| author | 2018-09-16 10:46:27 +0200 | |
|---|---|---|
| committer | 2018-09-16 10:46:27 +0200 | |
| commit | b323ed084620cac2222fe1c93ec05b9773eb81e6 (patch) | |
| tree | ec1057810fd3a1971f99d1ebb60b936e0c543094 /app/views/index/normal.phtml | |
| parent | 9fa2122d4a27de7d9a207cea3dee911541b63420 (diff) | |
Improve authors (#2025)
* Links for authors and multiple authors
Favour ';' as a separator instead of ',' to better cope with
multi-author scientific articles.
Follow-up of https://github.com/FreshRSS/FreshRSS/pull/1997 ,
https://github.com/FreshRSS/FreshRSS/issues/1968,
https://github.com/FreshRSS/FreshRSS/pull/2023
* Change i18n authors
* Update layout
* Unicode-compatible search
Example for `author:Loïc`
* author <em> styling
* Final details
* Minor spacing
Diffstat (limited to 'app/views/index/normal.phtml')
| -rw-r--r-- | app/views/index/normal.phtml | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index c7cab2d3f..e659509f9 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -67,10 +67,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 |
