summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-04 14:10:14 -0800
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-11-04 14:10:14 -0800
commitcabacaff97f45ab858cc68fe00b0dd2585b6af02 (patch)
treea1b6d4c854599c7873780977438900793afb5a56 /app/views
parentbe659762cf151a5cd4cb44168f473ca5236ed889 (diff)
parenta68903782501b74916a5445e82aa1b7c7cd1d82d (diff)
Merge pull request #220 from Alkarex/customItems
Options pour personnaliser les icĂ´nes de lecture
Diffstat (limited to 'app/views')
-rw-r--r--app/views/configure/display.phtml36
-rw-r--r--app/views/helpers/view/normal_view.phtml59
2 files changed, 57 insertions, 38 deletions
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index 0f89437ac..687a84499 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -156,6 +156,42 @@
</div>
</div>
+ <legend><?php echo Translate::t ('reading_icons'); ?></legend>
+ <div class="form-group">
+ <table>
+ <thead>
+ <tr>
+ <th>&nbsp;</th>
+ <th><a class="read" title="<?php echo Translate::t ('mark_read'); ?>">&nbsp;</span></th>
+ <th><a class="bookmark" title="<?php echo Translate::t ('mark_favorite'); ?>">&nbsp;</span></th>
+ <th><?php echo Translate::t ('sharing'); ?></th>
+ <th><?php echo Translate::t ('related_tags'); ?></th>
+ <th><?php echo Translate::t ('publication_date'); ?></th>
+ <th class="item link"><a>&nbsp;</a></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th><?php echo Translate::t ('top_line'); ?></th>
+ <td><input type="checkbox" name="topline_read" value="yes"<?php echo $this->conf->toplineRead () ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" name="topline_favorite" value="yes"<?php echo $this->conf->toplineFavorite () ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" disabled="disabled" /></td>
+ <td><input type="checkbox" disabled="disabled" /></td>
+ <td><input type="checkbox" name="topline_date" value="yes"<?php echo $this->conf->toplineDate () ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" name="topline_link" value="yes"<?php echo $this->conf->toplineLink () ? ' checked="checked"' : ''; ?> /></td>
+ </tr><tr>
+ <th><?php echo Translate::t ('bottom_line'); ?></th>
+ <td><input type="checkbox" name="bottomline_read" value="yes"<?php echo $this->conf->bottomlineRead () ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" name="bottomline_favorite" value="yes"<?php echo $this->conf->bottomlineFavorite () ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" name="bottomline_sharing" value="yes"<?php echo $this->conf->bottomlineSharing () ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" name="bottomline_tags" value="yes"<?php echo $this->conf->bottomlineTags () ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" name="bottomline_date" value="yes"<?php echo $this->conf->bottomlineDate () ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" name="bottomline_link" value="yes"<?php echo $this->conf->bottomlineLink () ? ' checked="checked"' : ''; ?> /></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
<legend><?php echo Translate::t ('sharing'); ?></legend>
<div class="form-group">
<label class="group-name" for="shaarli"><?php echo Translate::t ('your_shaarli'); ?></label>
diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml
index d940e0dda..88fc602f6 100644
--- a/app/views/helpers/view/normal_view.phtml
+++ b/app/views/helpers/view/normal_view.phtml
@@ -39,36 +39,25 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
<div class="flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>">
<ul class="horizontal-list flux_header">
<?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
- <li class="item manage">
- <?php if (!$item->isRead ()) { ?>
- <a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', 1); ?>">&nbsp;</a>
- <?php } else { ?>
- <a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', 0); ?>">&nbsp;</a>
- <?php } ?>
-
- <?php if (!$item->isFavorite ()) { ?>
- <a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', 1); ?>">&nbsp;</a>
- <?php } else { ?>
- <a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', 0); ?>">&nbsp;</a>
- <?php } ?>
- </li>
- <?php } ?>
+ <?php if ($this->conf->toplineRead ()) { ?><li class="item manage"><a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', $item->isRead () ? 0 : 1); ?>">&nbsp;</a></li><?php } ?>
+ <?php if ($this->conf->toplineFavorite ()) { ?><li class="item manage"><a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', $item->isFavorite () ? 0 : 1); ?>">&nbsp;</a></li><?php } ?>
<?php
+ }
$feed = HelperCategory::findFeed($this->cat_aside, $item->feed ()); //We most likely already have the feed object in cache
if (empty($feed)) $feed = $item->feed (true);
?>
<li class="item website"><a href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id ()); ?>"><img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="" /> <span><?php echo $feed->name (); ?></span></a></li>
<li class="item title"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo $item->title (); ?></a></li>
- <li class="item date"><?php echo $item->date (); ?></li>
- <li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>">&nbsp;</a></li>
+ <?php if ($this->conf->toplineDate ()) { ?><li class="item date"><?php echo $item->date (); ?>&nbsp;</li><?php } ?>
+ <?php if ($this->conf->toplineLink ()) { ?><li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>">&nbsp;</a></li><?php } ?>
</ul>
<div class="flux_content">
<div class="content">
<h1 class="title"><?php echo $item->title (); ?></h1>
- <?php $author = $item->author (); ?>
- <?php echo $author != '' ? '<div class="author">' . Translate::t ('by_author', $author) . '</div>' : ''; ?>
<?php
+ $author = $item->author ();
+ echo $author != '' ? '<div class="author">' . Translate::t ('by_author', $author) . '</div>' : '';
if($this->conf->lazyload() == 'yes') {
echo lazyimg($item->content ());
} else {
@@ -79,23 +68,15 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
<ul class="horizontal-list bottom">
<?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
- <li class="item manage">
- <?php if (!$item->isRead ()) { ?>
- <a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', 1); ?>">&nbsp;</a>
- <?php } else { ?>
- <a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', 0); ?>">&nbsp;</a>
- <?php } ?>
-
- <?php if (!$item->isFavorite ()) { ?>
- <a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', 1); ?>">&nbsp;</a>
- <?php } else { ?>
- <a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', 0); ?>">&nbsp;</a>
- <?php } ?>
- </li>
+ <?php if ($this->conf->bottomlineRead ()) { ?><li class="item manage"><a class="read" href="<?php echo _url ('entry', 'read', 'id', $item->id (), 'is_read', $item->isRead () ? 0 : 1); ?>">&nbsp;</a></li><?php } ?>
+ <?php if ($this->conf->bottomlineFavorite ()) { ?><li class="item manage"><a class="bookmark" href="<?php echo _url ('entry', 'bookmark', 'id', $item->id (), 'is_favorite', $item->isFavorite () ? 0 : 1); ?>">&nbsp;</a></li><?php } ?>
<?php } ?>
<li class="item">
- <?php $link = urlencode ($item->link ()); ?>
- <?php $title = urlencode ($item->title () . ' - ' . $feed->name ()); ?>
+ <?php
+ if ($this->conf->bottomlineSharing ()) {
+ $link = urlencode ($item->link ());
+ $title = urlencode ($item->title () . ' - ' . $feed->name ());
+ ?>
<div class="dropdown">
<div id="dropdown-share-<?php echo $item->id ();?>" class="dropdown-target"></div>
<i class="icon i_share"></i> <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id ();?>"><?php echo Translate::t ('share'); ?></a>
@@ -134,10 +115,12 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
</a>
</li>
</ul>
- </div>
+ </div><?php } ?>
</li>
- <?php $tags = $item->tags(); ?>
- <?php if(!empty($tags)) { ?>
+ <?php
+ $tags = $this->conf->bottomlineTags () ? $item->tags() : null;
+ if (!empty($tags)) {
+ ?>
<li class="item">
<div class="dropdown">
<div id="dropdown-tags-<?php echo $item->id ();?>" class="dropdown-target"></div>
@@ -153,8 +136,8 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
</div>
</li>
<?php } ?>
- <li class="item date"><?php echo $item->date (); ?></li>
- <li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>">&nbsp;</a></li>
+ <?php if ($this->conf->bottomlineDate ()) { ?><li class="item date"><?php echo $item->date (); ?>&nbsp;</li><?php } ?>
+ <?php if ($this->conf->bottomlineLink ()) { ?><li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>">&nbsp;</a></li><?php } ?>
</ul>
</div>
</div>