diff options
| author | 2019-08-14 15:16:06 +0200 | |
|---|---|---|
| committer | 2019-08-14 15:16:06 +0200 | |
| commit | cb318740851672292227b7376434451684ae0360 (patch) | |
| tree | 0602ba84df7900bb0873f4358a4b91712e7ad2f8 /app/views | |
| parent | 49e1a2c579757994ae4ed5994339bd58a09238db (diff) | |
Added option to display authors under article titles (#2487)
This feature is particularly useful to display authors underneath scientific articles.
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/configure/display.phtml | 3 | ||||
| -rw-r--r-- | app/views/helpers/index/normal/entry_header.phtml | 17 |
2 files changed, 19 insertions, 1 deletions
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index 58c4e219a..60b7748c5 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -81,6 +81,7 @@ <th title="<?php echo _t('gen.action.mark_favorite'); ?>"><?php echo _i('bookmark'); ?></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.display_authors'); ?></th> <th><?php echo _t('conf.display.icon.publication_date'); ?></th> <th><?php echo _i('link'); ?></th> </tr> @@ -92,6 +93,7 @@ <td><input type="checkbox" name="topline_favorite" value="1"<?php echo FreshRSS_Context::$user_conf->topline_favorite ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->topline_favorite; ?>"/></td> <td><input type="checkbox" disabled="disabled" /></td> <td><input type="checkbox" disabled="disabled" /></td> + <td><input type="checkbox" name="topline_display_authors" value="1"<?php echo FreshRSS_Context::$user_conf->topline_display_authors ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->topline_display_authors; ?>"/></td> <td><input type="checkbox" name="topline_date" value="1"<?php echo FreshRSS_Context::$user_conf->topline_date ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->topline_date; ?>"/></td> <td><input type="checkbox" name="topline_link" value="1"<?php echo FreshRSS_Context::$user_conf->topline_link ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->topline_link; ?>"/></td> </tr><tr> @@ -100,6 +102,7 @@ <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_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" disabled="disabled" /></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/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml index 86298e59f..7873b16e4 100644 --- a/app/views/helpers/index/normal/entry_header.phtml +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -1,6 +1,7 @@ <?php $topline_read = FreshRSS_Context::$user_conf->topline_read; $topline_favorite = FreshRSS_Context::$user_conf->topline_favorite; + $topline_display_authors = FreshRSS_Context::$user_conf->topline_display_authors; $topline_date = FreshRSS_Context::$user_conf->topline_date; $topline_link = FreshRSS_Context::$user_conf->topline_link; ?><ul class="horizontal-list flux_header"><?php @@ -27,7 +28,21 @@ } } ?><li class="item website"><a href="<?php echo _url('index', 'index', 'get', 'f_' . $this->feed->id()); ?>"><img class="favicon" src="<?php echo $this->feed->favicon(); ?>" alt="✇" /> <span><?php echo $this->feed->name(); ?></span></a></li> - <li class="item title"><a target="_blank" rel="noreferrer" href="<?php echo $this->entry->link(); ?>"><?php echo $this->entry->title(); ?></a></li> + <li class="item title"><a target="_blank" rel="noreferrer" href="<?php echo $this->entry->link(); ?>"><?php echo $this->entry->title(); ?></a><?php + if ($topline_display_authors) { + ?><div class="item author"> + <?php + $authors = $this->entry->authors(); + if (is_array($authors)): + $first = true; + foreach ($authors as $author): + echo $first ? $author : ', ' . $author; + $first = false; + endforeach; + endif; + ?></div><?php + } + ?></li> <?php if ($topline_date) { ?><li class="item date"><?php echo $this->entry->date(); ?> </li><?php } ?> <?php if ($topline_link) { ?><li class="item link"><a target="_blank" rel="noreferrer" href="<?php echo $this->entry->link(); ?>"><?php echo _i('link'); ?></a></li><?php } ?> </ul> |
