diff options
| author | 2014-08-23 20:55:08 +0200 | |
|---|---|---|
| committer | 2014-08-23 20:55:08 +0200 | |
| commit | 17cf6fae6b7d5219f26341dc2829fe6f103e4aab (patch) | |
| tree | f3bef008a1befcd9c1a20562c99f30f5a9532c98 /app/views | |
| parent | e3bb80de17c79cf32a2e3a606f216aebf48f92e5 (diff) | |
| parent | 3f0e9f70d244da84d917b3093665730ca245e483 (diff) | |
Merge branch 'dev' of github.com:marienfressinaud/FreshRSS into dev
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/configure/reading.phtml | 10 | ||||
| -rw-r--r-- | app/views/helpers/view/normal_view.phtml | 7 | ||||
| -rw-r--r-- | app/views/stats/repartition.phtml | 39 |
3 files changed, 43 insertions, 13 deletions
diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml index e96bcea42..5a26501a4 100644 --- a/app/views/configure/reading.phtml +++ b/app/views/configure/reading.phtml @@ -63,6 +63,16 @@ <div class="form-group"> <div class="group-controls"> + <label class="checkbox" for="display_categories"> + <input type="checkbox" name="display_categories" id="display_categories" value="1"<?php echo $this->conf->display_categories ? ' checked="checked"' : ''; ?> /> + <?php echo Minz_Translate::t ('display_categories_unfolded'); ?> + <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript> + </label> + </div> + </div> + + <div class="form-group"> + <div class="group-controls"> <label class="checkbox" for="sticky_post"> <input type="checkbox" name="sticky_post" id="sticky_post" value="1"<?php echo $this->conf->sticky_post ? ' checked="checked"' : ''; ?> /> <?php echo Minz_Translate::t ('sticky_post'); ?> diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml index 55ef6bdf6..87bf2e22a 100644 --- a/app/views/helpers/view/normal_view.phtml +++ b/app/views/helpers/view/normal_view.phtml @@ -81,7 +81,12 @@ if (!empty($this->entries)) { } } $feed = FreshRSS_CategoryDAO::findFeed($this->cat_aside, $item->feed ()); //We most likely already have the feed object in cache - if (empty($feed)) $feed = $item->feed (true); + if ($feed == null) { + $feed = $item->feed(true); + if ($feed == null) { + $feed = FreshRSS_Feed::example(); + } + } ?><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> <?php if ($topline_date) { ?><li class="item date"><?php echo $item->date (); ?> </li><?php } ?> diff --git a/app/views/stats/repartition.phtml b/app/views/stats/repartition.phtml index 09892d3c5..9d2eb28e4 100644 --- a/app/views/stats/repartition.phtml +++ b/app/views/stats/repartition.phtml @@ -2,23 +2,38 @@ <div class="post content"> <a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('back_to_rss_feeds'); ?></a> - + + <h1><?php echo _t('stats_repartition'); ?></h1> + + <select id="feed_select"> + <option data-url="<?php echo _url('stats', 'repartition')?>"><?php echo _t('all_feeds')?></option> + <?php foreach ($this->categories as $category) { + $feeds = $category->feeds(); + if (!empty($feeds)) { + echo '<optgroup label=', $category->name(), '>'; + foreach ($feeds as $feed) { + if ($this->feed && $feed->id() == $this->feed->id()){ + echo '<option value ="', $feed->id(), '" selected data-url="', _url('stats', 'repartition', 'id', $feed->id()), '">', $feed->name(), '</option>'; + } else { + echo '<option value ="', $feed->id(), '" data-url="', _url('stats', 'repartition', 'id', $feed->id()), '">', $feed->name(), '</option>'; + } + } + echo '</optgroup>'; + } + }?> + </select> + <?php if ($this->feed) {?> - <h1> - <?php echo _t('stats_repartition'), " - "; ?> - <a href="<?php echo _url('configure', 'feed', 'id', $this->feed->id()); ?>"> - <?php echo $this->feed->name(); ?> - </a> - </h1> - <?php } else {?> - <h1><?php echo _t('stats_repartition'); ?></h1> + <a href="<?php echo _url('configure', 'feed', 'id', $this->feed->id()); ?>"> + <?php echo _t('administration'); ?> + </a> <?php }?> - + <div class="stat"> <h2><?php echo _t('stats_entry_per_hour'); ?></h2> <div id="statsEntryPerHour" style="height: 300px"></div> </div> - + <div class="stat"> <h2><?php echo _t('stats_entry_per_day_of_week'); ?></h2> <div id="statsEntryPerDayOfWeek" style="height: 300px"></div> @@ -93,7 +108,7 @@ function initStats() { yaxis: {min: 0}, mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return numberFormat(obj.y);}} }); - + } initStats(); </script> |
