aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/configure/archiving.phtml58
-rw-r--r--app/views/configure/categorize.phtml22
-rw-r--r--app/views/configure/display.phtml198
-rw-r--r--app/views/configure/feed.phtml124
-rw-r--r--app/views/configure/importExport.phtml25
-rw-r--r--app/views/configure/sharing.phtml64
-rw-r--r--app/views/configure/shortcut.phtml49
-rw-r--r--app/views/configure/users.phtml162
-rwxr-xr-xapp/views/entry/bookmark.phtml17
-rwxr-xr-xapp/views/entry/read.phtml17
-rw-r--r--app/views/error/index.phtml4
-rw-r--r--app/views/feed/actualize.phtml2
-rw-r--r--app/views/helpers/javascript_vars.phtml81
-rwxr-xr-xapp/views/helpers/logs_pagination.phtml16
-rwxr-xr-xapp/views/helpers/pagination.phtml28
-rw-r--r--app/views/helpers/view/global_view.phtml25
-rw-r--r--app/views/helpers/view/normal_view.phtml272
-rw-r--r--app/views/helpers/view/reader_view.phtml21
-rwxr-xr-xapp/views/helpers/view/rss_view.phtml11
-rw-r--r--app/views/index/about.phtml29
-rw-r--r--app/views/index/formLogin.phtml34
-rw-r--r--app/views/index/index.phtml39
-rw-r--r--app/views/index/logs.phtml16
-rw-r--r--app/views/index/stats.phtml125
-rw-r--r--app/views/javascript/actualize.phtml34
-rw-r--r--app/views/javascript/nbUnreadsPerFeed.phtml8
-rw-r--r--app/views/javascript/nonce.phtml2
27 files changed, 1042 insertions, 441 deletions
diff --git a/app/views/configure/archiving.phtml b/app/views/configure/archiving.phtml
new file mode 100644
index 000000000..e144d0f45
--- /dev/null
+++ b/app/views/configure/archiving.phtml
@@ -0,0 +1,58 @@
+<?php $this->partial('aside_configure'); ?>
+
+<div class="post">
+ <a href="<?php echo _url('index', 'index'); ?>"><?php echo Minz_Translate::t('back_to_rss_feeds'); ?></a>
+
+ <form method="post" action="<?php echo _url('configure', 'archiving'); ?>">
+ <legend><?php echo Minz_Translate::t('archiving_configuration'); ?></legend>
+ <p><?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('archiving_configuration_help'); ?></p>
+
+ <div class="form-group">
+ <label class="group-name" for="old_entries"><?php echo Minz_Translate::t('delete_articles_every'); ?></label>
+ <div class="group-controls">
+ <input type="number" id="old_entries" name="old_entries" min="1" max="1200" value="<?php echo $this->conf->old_entries; ?>" /> <?php echo Minz_Translate::t('month'); ?>
+   <a class="btn confirm" href="<?php echo _url('entry', 'purge'); ?>"><?php echo Minz_Translate::t('purge_now'); ?></a>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="group-name" for="keep_history_default"><?php echo Minz_Translate::t('keep_history'), ' ', Minz_Translate::t('by_feed'); ?></label>
+ <div class="group-controls">
+ <select class="number" name="keep_history_default" id="keep_history_default" required="required"><?php
+ foreach (array('' => '', 0 => '0', 10 => '10', 50 => '50', 100 => '100', 500 => '500', 1000 => '1 000', 5000 => '5 000', 10000 => '10 000', -1 => '∞') as $v => $t) {
+ echo '<option value="' . $v . ($this->conf->keep_history_default == $v ? '" selected="selected' : '') . '">' . $t . ' </option>';
+ }
+ ?></select> (<?php echo Minz_Translate::t('by_default'); ?>)
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t('cancel'); ?></button>
+ </div>
+ </div>
+ </form>
+
+ <form method="post" action="<?php echo _url('entry', 'optimize'); ?>">
+ <legend><?php echo Minz_Translate::t ('advanced'); ?></legend>
+
+ <div class="form-group">
+ <p class="group-name"><?php echo Minz_Translate::t('current_user'); ?></p>
+ <div class="group-controls">
+ <p><?php echo formatNumber($this->nb_total), ' ', Minz_Translate::t('articles'), ', ', formatBytes($this->size_user); ?></p>
+ <input type="hidden" name="optimiseDatabase" value="1" />
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('optimize_bdd'); ?></button>
+ <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('optimize_todo_sometimes'); ?>
+ </div>
+ </div>
+
+ <?php if (Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_'))) { ?>
+ <div class="form-group">
+ <p class="group-name"><?php echo Minz_Translate::t('users'); ?></p>
+ <div class="group-controls">
+ <p><?php echo formatBytes($this->size_total); ?></p>
+ </div>
+ </div>
+ <?php } ?>
+ </form>
+</div>
diff --git a/app/views/configure/categorize.phtml b/app/views/configure/categorize.phtml
index 95951247e..a564e8cdd 100644
--- a/app/views/configure/categorize.phtml
+++ b/app/views/configure/categorize.phtml
@@ -1,28 +1,28 @@
<?php $this->partial ('aside_feed'); ?>
<div class="post">
- <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Translate::t ('back_to_rss_feeds'); ?></a>
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
<form method="post" action="<?php echo _url ('configure', 'categorize'); ?>">
- <legend><?php echo Translate::t ('categories_management'); ?></legend>
+ <legend><?php echo Minz_Translate::t ('categories_management'); ?></legend>
- <p class="alert alert-warn"><?php echo Translate::t ('feeds_moved_category_deleted', $this->defaultCategory->name ()); ?></p>
+ <p class="alert alert-warn"><?php echo Minz_Translate::t ('feeds_moved_category_deleted', $this->defaultCategory->name ()); ?></p>
<?php $i = 0; foreach ($this->categories as $cat) { $i++; ?>
<div class="form-group">
<label class="group-name" for="cat_<?php echo $cat->id (); ?>">
- <?php echo Translate::t ('category_number', $i); ?>
+ <?php echo Minz_Translate::t ('category_number', $i); ?>
</label>
<div class="group-controls">
<input type="text" id="cat_<?php echo $cat->id (); ?>" name="categories[]" value="<?php echo $cat->name (); ?>" />
<?php if ($cat->nbFeed () > 0) { ?>
- <a class="confirm" href="<?php echo _url ('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>"><?php echo Translate::t ('ask_empty'); ?></a>
+ <a class="confirm" href="<?php echo _url ('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>"><?php echo Minz_Translate::t ('ask_empty'); ?></a>
<?php } ?>
- (<?php echo Translate::t ('number_feeds', $cat->nbFeed ()); ?>)
+ (<?php echo Minz_Translate::t ('number_feeds', $cat->nbFeed ()); ?>)
<?php if ($cat->id () == $this->defaultCategory->id ()) { ?>
- <i class="icon i_help"></i> <?php echo Translate::t ('can_not_be_deleted'); ?>
+ <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('can_not_be_deleted'); ?>
<?php } ?>
<input type="hidden" name="ids[]" value="<?php echo $cat->id (); ?>" />
@@ -31,16 +31,16 @@
<?php } ?>
<div class="form-group">
- <label class="group-name" for="new_category"><?php echo Translate::t ('add_category'); ?></label>
+ <label class="group-name" for="new_category"><?php echo Minz_Translate::t ('add_category'); ?></label>
<div class="group-controls">
- <input type="text" id="new_category" name="new_category" placeholder="<?php echo Translate::t ('new_category'); ?>" />
+ <input type="text" id="new_category" name="new_category" placeholder="<?php echo Minz_Translate::t ('new_category'); ?>" />
</div>
</div>
<div class="form-group form-actions">
<div class="group-controls">
- <button type="submit" class="btn btn-important"><?php echo Translate::t ('save'); ?></button>
- <button type="reset" class="btn"><?php echo Translate::t ('cancel'); ?></button>
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
</div>
</div>
</form>
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index 8ad626b86..9104e4ef1 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -1,99 +1,81 @@
<?php $this->partial ('aside_configure'); ?>
<div class="post">
- <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Translate::t ('back_to_rss_feeds'); ?></a>
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
<form method="post" action="<?php echo _url ('configure', 'display'); ?>">
- <legend><?php echo Translate::t ('general_configuration'); ?></legend>
+ <legend><?php echo Minz_Translate::t ('theme'); ?></legend>
<div class="form-group">
- <label class="group-name" for="language"><?php echo Translate::t ('language'); ?></label>
+ <label class="group-name" for="language"><?php echo Minz_Translate::t ('language'); ?></label>
<div class="group-controls">
<select name="language" id="language">
<?php $languages = $this->conf->availableLanguages (); ?>
<?php foreach ($languages as $short => $lib) { ?>
- <option value="<?php echo $short; ?>"<?php echo $this->conf->language () == $short ? ' selected="selected"' : ''; ?>><?php echo $lib; ?></option>
+ <option value="<?php echo $short; ?>"<?php echo $this->conf->language === $short ? ' selected="selected"' : ''; ?>><?php echo $lib; ?></option>
<?php } ?>
</select>
</div>
</div>
<div class="form-group">
- <label class="group-name" for="theme"><?php echo Translate::t ('theme'); ?></label>
+ <label class="group-name" for="theme"><?php echo Minz_Translate::t ('theme'); ?></label>
<div class="group-controls">
- <select name="theme" id="theme">
- <?php foreach ($this->themes as $theme) { ?>
- <option value="<?php echo $theme['path']; ?>"<?php echo $this->conf->theme () == $theme['path'] ? ' selected="selected"' : ''; ?>>
- <?php echo $theme['name'] . ' ' . Translate::t ('by') . ' ' . $theme['author']; ?>
- </option>
- <?php } ?>
- </select>
- </div>
- </div>
-
- <div class="form-group">
- <label class="group-name" for="old_entries"><?php echo Translate::t ('delete_articles_every'); ?></label>
- <div class="group-controls">
- <input type="number" id="old_entries" name="old_entries" value="<?php echo $this->conf->oldEntries (); ?>" /> <?php echo Translate::t ('month'); ?>
+ <select name="theme" id="theme" required=""><?php
+ $found = false;
+ foreach ($this->themes as $theme) {
+ ?><option value="<?php echo $theme['id']; ?>"<?php if ($this->conf->theme === $theme['id']) { echo ' selected="selected"'; $found = true; } ?>><?php
+ echo $theme['name'] . ' — ' . Minz_Translate::t ('by') . ' ' . $theme['author'];
+ ?></option><?php
+ }
+ if (!$found) {
+ ?><option selected="selected"></option><?php
+ }
+ ?></select>
</div>
</div>
- <div class="form-group">
- <label class="group-name" for="mail_login"><?php echo Translate::t ('persona_connection_email'); ?></label>
- <?php $mail = $this->conf->mailLogin (); ?>
+ <div class="form-group form-actions">
<div class="group-controls">
- <input type="email" id="mail_login" name="mail_login" value="<?php echo $mail ? $mail : ''; ?>" placeholder="<?php echo Translate::t ('blank_to_disable'); ?>" />
- <noscript><b><?php echo Translate::t ('javascript_should_be_activated'); ?></b></noscript>
- <label class="checkbox" for="anon_access">
- <input type="checkbox" name="anon_access" id="anon_access" value="yes"<?php echo $this->conf->anonAccess () == 'yes' ? ' checked="checked"' : ''; ?> />
- <?php echo Translate::t ('allow_anonymous'); ?>
- </label>
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
</div>
</div>
- <div class="form-group">
- <label class="group-name" for="token"><?php echo Translate::t ('auth_token'); ?></label>
- <?php $token = $this->conf->token (); ?>
- <div class="group-controls">
- <input type="text" id="token" name="token" value="<?php echo $token; ?>" placeholder="<?php echo Translate::t ('blank_to_disable'); ?>"/>
- <i class="icon i_help"></i> <?php echo Translate::t('explain_token', Url::display(null, 'html', true), $token); ?>
- </div>
- </div>
-
- <legend><?php echo Translate::t ('reading_configuration'); ?></legend>
+ <legend><?php echo Minz_Translate::t ('reading_configuration'); ?></legend>
<div class="form-group">
- <label class="group-name" for="posts_per_page"><?php echo Translate::t ('articles_per_page'); ?></label>
+ <label class="group-name" for="posts_per_page"><?php echo Minz_Translate::t ('articles_per_page'); ?></label>
<div class="group-controls">
- <input type="number" id="posts_per_page" name="posts_per_page" value="<?php echo $this->conf->postsPerPage (); ?>" />
+ <input type="number" id="posts_per_page" name="posts_per_page" value="<?php echo $this->conf->posts_per_page; ?>" />
</div>
</div>
<div class="form-group">
- <label class="group-name" for="sort_order"><?php echo Translate::t ('sort_order'); ?></label>
+ <label class="group-name" for="sort_order"><?php echo Minz_Translate::t ('sort_order'); ?></label>
<div class="group-controls">
<select name="sort_order" id="sort_order">
- <option value="low_to_high"<?php echo $this->conf->sortOrder () == 'low_to_high' ? ' selected="selected"' : ''; ?>><?php echo Translate::t ('newer_first'); ?></option>
- <option value="high_to_low"<?php echo $this->conf->sortOrder () == 'high_to_low' ? ' selected="selected"' : ''; ?>><?php echo Translate::t ('older_first'); ?></option>
+ <option value="DESC"<?php echo $this->conf->sort_order === 'DESC' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('newer_first'); ?></option>
+ <option value="ASC"<?php echo $this->conf->sort_order === 'ASC' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('older_first'); ?></option>
</select>
</div>
</div>
<div class="form-group">
- <label class="group-name" for="view_mode"><?php echo Translate::t ('default_view'); ?></label>
+ <label class="group-name" for="view_mode"><?php echo Minz_Translate::t ('default_view'); ?></label>
<div class="group-controls">
<select name="view_mode" id="view_mode">
- <option value="normal"<?php echo $this->conf->viewMode () == 'normal' ? ' selected="selected"' : ''; ?>><?php echo Translate::t ('normal_view'); ?></option>
- <option value="reader"<?php echo $this->conf->viewMode () == 'reader' ? ' selected="selected"' : ''; ?>><?php echo Translate::t ('reader_view'); ?></option>
- <option value="global"<?php echo $this->conf->viewMode () == 'global' ? ' selected="selected"' : ''; ?>><?php echo Translate::t ('global_view'); ?></option>
+ <option value="normal"<?php echo $this->conf->view_mode === 'normal' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('normal_view'); ?></option>
+ <option value="reader"<?php echo $this->conf->view_mode === 'reader' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('reader_view'); ?></option>
+ <option value="global"<?php echo $this->conf->view_mode === 'global' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t ('global_view'); ?></option>
</select>
<label class="radio" for="radio_all">
- <input type="radio" name="default_view" id="radio_all" value="all"<?php echo $this->conf->defaultView () == 'all' ? ' checked="checked"' : ''; ?> />
- <?php echo Translate::t ('show_all_articles'); ?>
+ <input type="radio" name="default_view" id="radio_all" value="all"<?php echo $this->conf->default_view === 'all' ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('show_all_articles'); ?>
</label>
<label class="radio" for="radio_not_read">
- <input type="radio" name="default_view" id="radio_not_read" value="not_read"<?php echo $this->conf->defaultView () == 'not_read' ? ' checked="checked"' : ''; ?> />
- <?php echo Translate::t ('show_not_reads'); ?>
+ <input type="radio" name="default_view" id="radio_not_read" value="not_read"<?php echo $this->conf->default_view === 'not_read' ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('show_not_reads'); ?>
</label>
</div>
</div>
@@ -101,9 +83,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="auto_load_more">
- <input type="checkbox" name="auto_load_more" id="auto_load_more" value="yes"<?php echo $this->conf->autoLoadMore () == 'yes' ? ' checked="checked"' : ''; ?> />
- <?php echo Translate::t ('auto_load_more'); ?>
- <?php echo $this->conf->displayPosts () == 'no' ? '<noscript> - <b>' . Translate::t ('javascript_should_be_activated') . '</b></noscript>' : ''; ?>
+ <input type="checkbox" name="auto_load_more" id="auto_load_more" value="1"<?php echo $this->conf->auto_load_more ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('auto_load_more'); ?>
+ <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
</label>
</div>
</div>
@@ -111,9 +93,9 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="display_posts">
- <input type="checkbox" name="display_posts" id="display_posts" value="yes"<?php echo $this->conf->displayPosts () == 'yes' ? ' checked="checked"' : ''; ?> />
- <?php echo Translate::t ('display_articles_unfolded'); ?>
- <?php echo $this->conf->displayPosts () == 'no' ? '<noscript> - <b>' . Translate::t ('javascript_should_be_activated') . '</b></noscript>' : ''; ?>
+ <input type="checkbox" name="display_posts" id="display_posts" value="1"<?php echo $this->conf->display_posts ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('display_articles_unfolded'); ?>
+ <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
</label>
</div>
</div>
@@ -121,100 +103,92 @@
<div class="form-group">
<div class="group-controls">
<label class="checkbox" for="lazyload">
- <input type="checkbox" name="lazyload" id="lazyload" value="yes"<?php echo $this->conf->lazyload () == 'yes' ? ' checked="checked"' : ''; ?> />
- <?php echo Translate::t ('img_with_lazyload'); ?>
- <?php echo $this->conf->lazyload () == 'yes' ? '<noscript> - <b>' . Translate::t ('javascript_should_be_activated') . '</b></noscript>' : ''; ?>
+ <input type="checkbox" name="lazyload" id="lazyload" value="1"<?php echo $this->conf->lazyload ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('img_with_lazyload'); ?>
+ <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript>
</label>
</div>
</div>
<div class="form-group">
- <label class="group-name"><?php echo Translate::t ('auto_read_when'); ?></label>
+ <label class="group-name"><?php echo Minz_Translate::t ('auto_read_when'); ?></label>
<div class="group-controls">
<label class="checkbox" for="check_open_article">
- <input type="checkbox" name="mark_open_article" id="check_open_article" value="yes"<?php echo $this->conf->markWhenArticle () == 'yes' ? ' checked="checked"' : ''; ?> />
- <?php echo Translate::t ('article_selected'); ?>
+ <input type="checkbox" name="mark_open_article" id="check_open_article" value="1"<?php echo $this->conf->mark_when['article'] ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('article_selected'); ?>
</label>
<label class="checkbox" for="check_open_site">
- <input type="checkbox" name="mark_open_site" id="check_open_site" value="yes"<?php echo $this->conf->markWhenSite () == 'yes' ? ' checked="checked"' : ''; ?> />
- <?php echo Translate::t ('article_open_on_website'); ?>
+ <input type="checkbox" name="mark_open_site" id="check_open_site" value="1"<?php echo $this->conf->mark_when['site'] ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('article_open_on_website'); ?>
</label>
<label class="checkbox" for="check_scroll">
- <input type="checkbox" name="mark_scroll" id="check_scroll" value="yes"<?php echo $this->conf->markWhenScroll () == 'yes' ? ' checked="checked"' : ''; ?> />
- <?php echo Translate::t ('scroll'); ?>
+ <input type="checkbox" name="mark_scroll" id="check_scroll" value="1"<?php echo $this->conf->mark_when['scroll'] ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('scroll'); ?>
+ </label>
+ <label class="checkbox" for="check_reception">
+ <input type="checkbox" name="mark_upon_reception" id="check_reception" value="1"<?php echo $this->conf->mark_when['reception'] ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('upon_reception'); ?>
</label>
</div>
</div>
<div class="form-group">
- <label class="group-name"><?php echo Translate::t ('after_onread'); ?></label>
+ <label class="group-name"><?php echo Minz_Translate::t ('after_onread'); ?></label>
<div class="group-controls">
<label class="checkbox" for="onread_jump_next">
- <input type="checkbox" name="onread_jump_next" id="onread_jump_next" value="yes"<?php echo $this->conf->onread_jump_next () == 'yes' ? ' checked="checked"' : ''; ?> />
- <?php echo Translate::t ('jump_next'); ?>
+ <input type="checkbox" name="onread_jump_next" id="onread_jump_next" value="1"<?php echo $this->conf->onread_jump_next ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ('jump_next'); ?>
</label>
</div>
</div>
- <legend><?php echo Translate::t ('reading_icons'); ?></legend>
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
+ </div>
+ </div>
+
+ <legend><?php echo Minz_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>
+ <th> </th>
+ <th title="<?php echo Minz_Translate::t ('mark_read'); ?>"><?php echo FreshRSS_Themes::icon('read'); ?></th>
+ <th title="<?php echo Minz_Translate::t ('mark_favorite'); ?>"><?php echo FreshRSS_Themes::icon('bookmark'); ?></th>
+ <th><?php echo Minz_Translate::t ('sharing'); ?></th>
+ <th><?php echo Minz_Translate::t ('related_tags'); ?></th>
+ <th><?php echo Minz_Translate::t ('publication_date'); ?></th>
+ <th><?php echo FreshRSS_Themes::icon('link'); ?></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>
+ <th><?php echo Minz_Translate::t ('top_line'); ?></th>
+ <td><input type="checkbox" name="topline_read" value="1"<?php echo $this->conf->topline_read ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" name="topline_favorite" value="1"<?php echo $this->conf->topline_favorite ? ' 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>
+ <td><input type="checkbox" name="topline_date" value="1"<?php echo $this->conf->topline_date ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" name="topline_link" value="1"<?php echo $this->conf->topline_link ? ' 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>
+ <th><?php echo Minz_Translate::t ('bottom_line'); ?></th>
+ <td><input type="checkbox" name="bottomline_read" value="1"<?php echo $this->conf->bottomline_read ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" name="bottomline_favorite" value="1"<?php echo $this->conf->bottomline_favorite ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" name="bottomline_sharing" value="1"<?php echo $this->conf->bottomline_sharing ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" name="bottomline_tags" value="1"<?php echo $this->conf->bottomline_tags ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" name="bottomline_date" value="1"<?php echo $this->conf->bottomline_date ? ' checked="checked"' : ''; ?> /></td>
+ <td><input type="checkbox" name="bottomline_link" value="1"<?php echo $this->conf->bottomline_link ? ' 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>
- <div class="group-controls">
- <input type="text" id="shaarli" name="shaarli" value="<?php echo $this->conf->urlShaarli (); ?>" placeholder="<?php echo Translate::t ('blank_to_disable'); ?>"/>
- </div>
- </div>
-
- <legend><?php echo Translate::t ('advanced'); ?></legend>
- <div class="form-group">
- <label class="group-name"></label>
- <div class="group-controls">
- <a class="btn" href="<?php echo _url('entry', 'optimize'); ?>">
- <?php echo Translate::t('optimize_bdd'); ?>
- </a>
- <i class="icon i_help"></i> <?php echo Translate::t('optimize_todo_sometimes'); ?>
- </div>
+ </table><br />
</div>
<div class="form-group form-actions">
<div class="group-controls">
- <button type="submit" class="btn btn-important"><?php echo Translate::t ('save'); ?></button>
- <button type="reset" class="btn"><?php echo Translate::t ('cancel'); ?></button>
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
</div>
</div>
</form>
diff --git a/app/views/configure/feed.phtml b/app/views/configure/feed.phtml
index b61de6dcb..138808a9f 100644
--- a/app/views/configure/feed.phtml
+++ b/app/views/configure/feed.phtml
@@ -2,62 +2,46 @@
<?php if ($this->flux) { ?>
<div class="post">
- <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Translate::t ('back_to_rss_feeds'); ?></a> <?php echo Translate::t ('or'); ?> <a href="<?php echo _url ('index', 'index', 'get', 'f_' . $this->flux->id ()); ?>"><?php echo Translate::t ('filter'); ?></a>
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a> <?php echo Minz_Translate::t ('or'); ?> <a href="<?php echo _url ('index', 'index', 'get', 'f_' . $this->flux->id ()); ?>"><?php echo Minz_Translate::t ('filter'); ?></a>
<h1><?php echo $this->flux->name (); ?></h1>
<?php echo $this->flux->description (); ?>
<?php if ($this->flux->inError ()) { ?>
- <p class="alert alert-error"><span class="alert-head"><?php echo Translate::t ('damn'); ?></span> <?php echo Translate::t ('feed_in_error'); ?></p>
+ <p class="alert alert-error"><span class="alert-head"><?php echo Minz_Translate::t ('damn'); ?></span> <?php echo Minz_Translate::t ('feed_in_error'); ?></p>
<?php } ?>
- <form method="post" action="<?php echo _url ('configure', 'feed', 'id', $this->flux->id ()); ?>">
- <legend><?php echo Translate::t ('informations'); ?></legend>
+ <form method="post" action="<?php echo _url ('configure', 'feed', 'id', $this->flux->id ()); ?>" autocomplete="off">
+ <legend><?php echo Minz_Translate::t ('informations'); ?></legend>
<div class="form-group">
- <label class="group-name" for="name"><?php echo Translate::t ('title'); ?></label>
+ <label class="group-name" for="name"><?php echo Minz_Translate::t ('title'); ?></label>
<div class="group-controls">
- <input type="text" name="name" id="name" value="<?php echo $this->flux->name () ; ?>" />
+ <input type="text" name="name" id="name" class="extend" value="<?php echo $this->flux->name () ; ?>" />
</div>
</div>
<div class="form-group">
- <label class="group-name"><?php echo Translate::t ('website_url'); ?></label>
+ <label class="group-name" for="description"><?php echo Minz_Translate::t ('feed_description'); ?></label>
<div class="group-controls">
- <span class="control">
- <?php echo $this->flux->website (); ?>
- <a target="_blank" href="<?php echo $this->flux->website (); ?>"><i class="icon i_link"></i></a>
- </span>
+ <textarea name="description" id="description"><?php echo htmlspecialchars($this->flux->description(), ENT_NOQUOTES, 'UTF-8'); ?></textarea>
</div>
</div>
<div class="form-group">
- <label class="group-name"><?php echo Translate::t ('feed_url'); ?></label>
+ <label class="group-name" for="website"><?php echo Minz_Translate::t ('website_url'); ?></label>
<div class="group-controls">
- <span class="control">
- <?php echo $this->flux->url (); ?>
- <a target="_blank" href="<?php echo $this->flux->url (); ?>"><i class="icon i_link"></i></a>
- </span>
+ <input type="text" name="website" id="website" class="extend" value="<?php echo $this->flux->website (); ?>" />
+ <a target="_blank" href="<?php echo $this->flux->website (); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
</div>
</div>
<div class="form-group">
- <label class="group-name"></label>
+ <label class="group-name" for="url"><?php echo Minz_Translate::t ('feed_url'); ?></label>
<div class="group-controls">
- <a class="btn" href="<?php echo _url ('feed', 'actualize', 'id', $this->flux->id ()); ?>">
- <i class="icon i_refresh"></i> <?php echo Translate::t('actualize'); ?>
- </a>
+ <input type="text" name="url" id="url" class="extend" value="<?php echo $this->flux->url (); ?>" />
+ <a target="_blank" href="<?php echo $this->flux->url (); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
+   <a class="btn" target="_blank" href="http://validator.w3.org/feed/check.cgi?url=<?php echo $this->flux->url (); ?>"><?php echo Minz_Translate::t ('feed_validator'); ?></a>
</div>
</div>
<div class="form-group">
- <label class="group-name"><?php echo Translate::t ('number_articles'); ?></label>
- <div class="group-controls">
- <span class="control"><?php echo $this->flux->nbEntries (); ?></span>
- <label class="checkbox" for="keep_history">
- <input type="checkbox" name="keep_history" id="keep_history" value="yes"<?php echo $this->flux->keepHistory () == 'yes' ? ' checked="checked"' : ''; ?> />
- <?php echo Translate::t ('keep_history'); ?>
- </label>
- </div>
- </div>
-
- <div class="form-group">
- <label class="group-name" for="category"><?php echo Translate::t ('category'); ?></label>
+ <label class="group-name" for="category"><?php echo Minz_Translate::t ('category'); ?></label>
<div class="group-controls">
<select name="category" id="category">
<?php foreach ($this->categories as $cat) { ?>
@@ -68,49 +52,95 @@
</select>
</div>
</div>
-
- <legend><?php echo Translate::t ('advanced'); ?></legend>
<div class="form-group">
- <label class="group-name" for="priority"><?php echo Translate::t ('show_in_all_flux'); ?></label>
+ <label class="group-name" for="priority"><?php echo Minz_Translate::t ('show_in_all_flux'); ?></label>
<div class="group-controls">
<label class="checkbox" for="priority">
<input type="checkbox" name="priority" id="priority" value="10"<?php echo $this->flux->priority () > 0 ? ' checked="checked"' : ''; ?> />
- <?php echo Translate::t ('yes'); ?>
+ <?php echo Minz_Translate::t ('yes'); ?>
</label>
</div>
</div>
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
+ <button class="btn btn-attention confirm" formmethod="post" formaction="<?php echo Minz_Url::display (array ('c' => 'feed', 'a' => 'delete', 'params' => array ('id' => $this->flux->id ()))); ?>"><?php echo Minz_Translate::t ('delete'); ?></button>
+ </div>
+ </div>
+
+ <legend><?php echo Minz_Translate::t ('archiving_configuration'); ?></legend>
+
+ <div class="form-group">
+ <label class="group-name"></label>
+ <div class="group-controls">
+ <a class="btn" href="<?php echo _url ('feed', 'actualize', 'id', $this->flux->id ()); ?>">
+ <?php echo FreshRSS_Themes::icon('refresh'); ?> <?php echo Minz_Translate::t('actualize'); ?>
+ </a>
+ </div>
+ </div>
<div class="form-group">
- <label class="group-name" for="path_entries"><?php echo Translate::t ('css_path_on_website'); ?></label>
+ <label class="group-name"><?php echo Minz_Translate::t ('number_articles'); ?></label>
<div class="group-controls">
- <input type="text" name="path_entries" id="path_entries" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Translate::t ('blank_to_disable'); ?>" />
- <i class="icon i_help"></i> <?php echo Translate::t ('retrieve_truncated_feeds'); ?>
+ <span class="control"><?php echo $this->flux->nbEntries (); ?></span>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="group-name" for="keep_history"><?php echo Minz_Translate::t ('keep_history'); ?></label>
+ <div class="group-controls">
+ <select class="number" name="keep_history" id="keep_history" required="required"><?php
+ foreach (array('' => '', -2 => Minz_Translate::t('by_default'), 0 => '0', 10 => '10', 50 => '50', 100 => '100', 500 => '500', 1000 => '1 000', 5000 => '5 000', 10000 => '10 000', -1 => '∞') as $v => $t) {
+ echo '<option value="' . $v . ($this->flux->keepHistory() === $v ? '" selected="selected' : '') . '">' . $t . '</option>';
+ }
+ ?></select>
+ </div>
+ </div>
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
+ <button class="btn btn-attention confirm" formmethod="post" formaction="<?php echo Minz_Url::display (array ('c' => 'feed', 'a' => 'truncate', 'params' => array ('id' => $this->flux->id ()))); ?>"><?php echo Minz_Translate::t ('truncate'); ?></button>
</div>
</div>
+ <legend><?php echo Minz_Translate::t ('login_configuration'); ?></legend>
<?php $auth = $this->flux->httpAuth (false); ?>
<div class="form-group">
- <label class="group-name" for="http_user"><?php echo Translate::t ('http_username'); ?></label>
+ <label class="group-name" for="http_user"><?php echo Minz_Translate::t ('http_username'); ?></label>
<div class="group-controls">
- <input type="text" name="http_user" id="http_user" value="<?php echo $auth['username']; ?>" autocomplete="off" />
- <i class="icon i_help"></i> <?php echo Translate::t ('access_protected_feeds'); ?>
+ <input type="text" name="http_user" id="http_user" class="extend" value="<?php echo $auth['username']; ?>" autocomplete="off" />
+ <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('access_protected_feeds'); ?>
</div>
- <label class="group-name" for="http_pass"><?php echo Translate::t ('http_password'); ?></label>
+ <label class="group-name" for="http_pass"><?php echo Minz_Translate::t ('http_password'); ?></label>
+ <div class="group-controls">
+ <input type="password" name="http_pass" id="http_pass" class="extend" value="<?php echo $auth['password']; ?>" autocomplete="off" />
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
<div class="group-controls">
- <input type="password" name="http_pass" id="http_pass" value="<?php echo $auth['password']; ?>" autocomplete="off" />
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
</div>
</div>
+ <legend><?php echo Minz_Translate::t ('advanced'); ?></legend>
+ <div class="form-group">
+ <label class="group-name" for="path_entries"><?php echo Minz_Translate::t ('css_path_on_website'); ?></label>
+ <div class="group-controls">
+ <input type="text" name="path_entries" id="path_entries" class="extend" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" />
+ <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('retrieve_truncated_feeds'); ?>
+ </div>
+ </div>
<div class="form-group form-actions">
<div class="group-controls">
- <button class="btn btn-important"><?php echo Translate::t ('save'); ?></button>
- <button class="btn btn-attention confirm" formaction="<?php echo Url::display (array ('c' => 'feed', 'a' => 'delete', 'params' => array ('id' => $this->flux->id ()))); ?>"><?php echo Translate::t ('delete'); ?></button>
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
</div>
</div>
</form>
</div>
<?php } else { ?>
-<div class="alert alert-warn"><span class="alert-head"><?php echo Translate::t ('no_selected_feed'); ?></span> <?php echo Translate::t ('think_to_add'); ?></div>
+<div class="alert alert-warn"><span class="alert-head"><?php echo Minz_Translate::t ('no_selected_feed'); ?></span> <?php echo Minz_Translate::t ('think_to_add'); ?></div>
<?php } ?>
diff --git a/app/views/configure/importExport.phtml b/app/views/configure/importExport.phtml
index 4cc575356..e2217d9ed 100644
--- a/app/views/configure/importExport.phtml
+++ b/app/views/configure/importExport.phtml
@@ -1,9 +1,12 @@
-<?php if ($this->req == 'export') { ?>
-<?php echo '<?xml version="1.0" encoding="UTF-8" ?>'; // résout bug sur certain serveur ?>
-<!-- Generated by <?php echo Configuration::title (); ?> -->
+<?php
+require_once(LIB_PATH . '/lib_opml.php');
+if ($this->req == 'export') {
+ echo '<?xml version="1.0" encoding="UTF-8" ?>';
+?>
+<!-- Generated by <?php echo Minz_Configuration::title (); ?> -->
<opml version="2.0">
<head>
- <title><?php echo Configuration::title (); ?> OPML Feed</title>
+ <title><?php echo Minz_Configuration::title (); ?> OPML Feed</title>
<dateCreated><?php echo date('D, d M Y H:i:s'); ?></dateCreated>
</head>
<body>
@@ -14,12 +17,12 @@
<?php $this->partial ('aside_feed'); ?>
<div class="post ">
- <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Translate::t ('back_to_rss_feeds'); ?></a>
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
- <form method="post" action="<?php echo Url::display (array ('c' => 'configure', 'a' => 'importExport', 'params' => array ('q' => 'import'))); ?>" enctype="multipart/form-data">
- <legend><?php echo Translate::t ('import_export_opml'); ?></legend>
+ <form method="post" action="<?php echo Minz_Url::display (array ('c' => 'configure', 'a' => 'importExport', 'params' => array ('q' => 'import'))); ?>" enctype="multipart/form-data">
+ <legend><?php echo Minz_Translate::t ('import_export_opml'); ?></legend>
<div class="form-group">
- <label class="group-name" for="file"><?php echo Translate::t ('file_to_import'); ?></label>
+ <label class="group-name" for="file"><?php echo Minz_Translate::t ('file_to_import'); ?></label>
<div class="group-controls">
<input type="file" name="file" id="file" />
</div>
@@ -27,9 +30,9 @@
<div class="form-group form-actions">
<div class="group-controls">
- <button type="submit" class="btn btn-important"><?php echo Translate::t ('import'); ?></button>
- <?php echo Translate::t ('or'); ?>
- <a target="_blank" class="btn btn-important" href="<?php echo _url ('configure', 'importExport', 'q', 'export'); ?>"><?php echo Translate::t ('export'); ?></a>
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('import'); ?></button>
+ <?php echo Minz_Translate::t ('or'); ?>
+ <a target="_blank" class="btn btn-important" href="<?php echo _url ('configure', 'importExport', 'q', 'export'); ?>"><?php echo Minz_Translate::t ('export'); ?></a>
</div>
</div>
</form>
diff --git a/app/views/configure/sharing.phtml b/app/views/configure/sharing.phtml
new file mode 100644
index 000000000..e3ea11665
--- /dev/null
+++ b/app/views/configure/sharing.phtml
@@ -0,0 +1,64 @@
+<?php $this->partial ('aside_configure'); ?>
+
+<div class="post">
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
+
+ <form method="post" action="<?php echo _url ('configure', 'sharing'); ?>">
+ <legend><?php echo Minz_Translate::t ('sharing'); ?></legend>
+ <div class="form-group">
+ <label class="group-name" for="shaarli">
+ <?php echo Minz_Translate::t ('your_shaarli'); ?>
+ </label>
+ <div class="group-controls">
+ <input type="url" id="shaarli" name="shaarli" class="extend" value="<?php echo $this->conf->sharing ('shaarli'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
+
+ <?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="http://sebsauvage.net/wiki/doku.php?id=php:shaarli"><?php echo Minz_Translate::t ('more_information'); ?></a>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="wallabag">
+ <?php echo Minz_Translate::t ('your_wallabag'); ?>
+ </label>
+ <div class="group-controls">
+ <input type="url" id="wallabag" name="wallabag" class="extend" value="<?php echo $this->conf->sharing ('wallabag'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
+
+ <?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="http://www.wallabag.org"><?php echo Minz_Translate::t ('more_information'); ?></a>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="diaspora">
+ <?php echo Minz_Translate::t ('your_diaspora_pod'); ?>
+ </label>
+ <div class="group-controls">
+ <input type="url" id="diaspora" name="diaspora" class="extend" value="<?php echo $this->conf->sharing ('diaspora'); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" size="64" />
+
+ <?php echo FreshRSS_Themes::icon('help'); ?> <a target="_blank" href="https://diasporafoundation.org/"><?php echo Minz_Translate::t ('more_information'); ?></a>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name"><?php echo Minz_Translate::t ('activate_sharing'); ?></label>
+ <div class="group-controls">
+ <?php
+ $services = array ('twitter', 'g+', 'facebook', 'email', 'print');
+
+ foreach ($services as $service) {
+ ?>
+ <label class="checkbox" for="<?php echo $service; ?>">
+ <input type="checkbox" name="<?php echo $service; ?>" id="<?php echo $service; ?>" value="1"<?php echo $this->conf->sharing($service) ? ' checked="checked"' : ''; ?> />
+ <?php echo Minz_Translate::t ($service); ?>
+ </label>
+ <?php } ?>
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
+ </div>
+ </div>
+ </form>
+</div>
diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml
index 01e66adb4..b0867f711 100644
--- a/app/views/configure/shortcut.phtml
+++ b/app/views/configure/shortcut.phtml
@@ -1,7 +1,7 @@
<?php $this->partial ('aside_configure'); ?>
<div class="post">
- <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Translate::t ('back_to_rss_feeds'); ?></a>
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
<datalist id="keys">
<?php foreach ($this->list_keys as $key) { ?>
@@ -9,55 +9,76 @@
<?php } ?>
</datalist>
- <?php $s = $this->conf->shortcuts (); ?>
+ <?php $s = $this->conf->shortcuts; ?>
<form method="post" action="<?php echo _url ('configure', 'shortcut'); ?>">
- <legend><?php echo Translate::t ('shortcuts_management'); ?></legend>
+ <legend><?php echo Minz_Translate::t ('shortcuts_management'); ?></legend>
- <noscript><p class="alert alert-error"><?php echo Translate::t ('javascript_for_shortcuts'); ?></p></noscript>
+ <noscript><p class="alert alert-error"><?php echo Minz_Translate::t ('javascript_for_shortcuts'); ?></p></noscript>
<div class="form-group">
- <label class="group-name" for="mark_read"><?php echo Translate::t ('mark_read'); ?></label>
+ <label class="group-name" for="mark_read"><?php echo Minz_Translate::t ('mark_read'); ?></label>
<div class="group-controls">
<input type="text" id="mark_read" name="shortcuts[mark_read]" list="keys" value="<?php echo $s['mark_read']; ?>" />
- <?php echo Translate::t ('shift_for_all_read'); ?>
+ <?php echo Minz_Translate::t ('shift_for_all_read'); ?>
</div>
</div>
<div class="form-group">
- <label class="group-name" for="mark_favorite"><?php echo Translate::t ('mark_favorite'); ?></label>
+ <label class="group-name" for="mark_favorite"><?php echo Minz_Translate::t ('mark_favorite'); ?></label>
<div class="group-controls">
<input type="text" id="mark_favorite" name="shortcuts[mark_favorite]" list="keys" value="<?php echo $s['mark_favorite']; ?>" />
</div>
</div>
<div class="form-group">
- <label class="group-name" for="go_website"><?php echo Translate::t ('see_on_website'); ?></label>
+ <label class="group-name" for="go_website"><?php echo Minz_Translate::t ('see_on_website'); ?></label>
<div class="group-controls">
<input type="text" id="go_website" name="shortcuts[go_website]" list="keys" value="<?php echo $s['go_website']; ?>" />
</div>
</div>
<div class="form-group">
- <label class="group-name" for="next_entry"><?php echo Translate::t ('next_article'); ?></label>
+ <label class="group-name" for="next_entry"><?php echo Minz_Translate::t ('next_article'); ?></label>
<div class="group-controls">
<input type="text" id="next_entry" name="shortcuts[next_entry]" list="keys" value="<?php echo $s['next_entry']; ?>" />
- <?php echo Translate::t ('shift_for_last'); ?>
+ <?php echo Minz_Translate::t ('shift_for_last'); ?>
</div>
</div>
<div class="form-group">
- <label class="group-name" for="prev_entry"><?php echo Translate::t ('previous_article'); ?></label>
+ <label class="group-name" for="prev_entry"><?php echo Minz_Translate::t ('previous_article'); ?></label>
<div class="group-controls">
<input type="text" id="prev_entry" name="shortcuts[prev_entry]" list="keys" value="<?php echo $s['prev_entry']; ?>" />
- <?php echo Translate::t ('shift_for_first'); ?>
+ <?php echo Minz_Translate::t ('shift_for_first'); ?>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="collapse_entry"><?php echo Minz_Translate::t ('collapse_article'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="collapse_entry" name="shortcuts[collapse_entry]" list="keys" value="<?php echo $s['collapse_entry']; ?>" />
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="load_more_shortcut"><?php echo Minz_Translate::t ('load_more'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="load_more_shortcut" name="shortcuts[load_more]" list="keys" value="<?php echo $s['load_more']; ?>" />
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="auto_share_shortcut"><?php echo Minz_Translate::t ('auto_share'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="auto_share_shortcut" name="shortcuts[auto_share]" list="keys" value="<?php echo $s['auto_share']; ?>" />
</div>
</div>
<div class="form-group form-actions">
<div class="group-controls">
- <button type="submit" class="btn btn-important"><?php echo Translate::t ('save'); ?></button>
- <button type="reset" class="btn"><?php echo Translate::t ('cancel'); ?></button>
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
</div>
</div>
</form>
diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml
new file mode 100644
index 000000000..8ab4c04ba
--- /dev/null
+++ b/app/views/configure/users.phtml
@@ -0,0 +1,162 @@
+<?php $this->partial('aside_configure'); ?>
+
+<div class="post">
+ <a href="<?php echo _url('index', 'index'); ?>"><?php echo Minz_Translate::t('back_to_rss_feeds'); ?></a>
+
+ <form method="post" action="<?php echo _url('users', 'auth'); ?>">
+ <legend><?php echo Minz_Translate::t('login_configuration'); ?></legend>
+
+ <div class="form-group">
+ <label class="group-name" for="current_user"><?php echo Minz_Translate::t('current_user'); ?></label>
+ <div class="group-controls">
+ <input id="current_user" type="text" disabled="disabled" value="<?php echo Minz_Session::param('currentUser', '_'); ?>" />
+ <label class="checkbox" for="is_admin">
+ <input type="checkbox" id="is_admin" disabled="disabled" <?php echo Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_')) ? 'checked="checked" ' : ''; ?>/>
+ <?php echo Minz_Translate::t('is_admin'); ?>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="passwordPlain"><?php echo Minz_Translate::t('password_form'); ?></label>
+ <div class="group-controls">
+ <input type="password" id="passwordPlain" name="passwordPlain" pattern=".{7,}" />
+ <noscript><b><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></b></noscript>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="mail_login"><?php echo Minz_Translate::t('persona_connection_email'); ?></label>
+ <?php $mail = $this->conf->mail_login; ?>
+ <div class="group-controls">
+ <input type="email" id="mail_login" name="mail_login" class="extend" value="<?php echo $mail; ?>" <?php echo Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_')) ? '' : 'disabled="disabled"'; ?> placeholder="alice@example.net" />
+ <noscript><b><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></b></noscript>
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t('cancel'); ?></button>
+ </div>
+ </div>
+
+ <?php if (Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_'))) { ?>
+
+ <legend><?php echo Minz_Translate::t('auth_type'); ?></legend>
+
+ <div class="form-group">
+ <label class="group-name" for="auth_type"><?php echo Minz_Translate::t('auth_type'); ?></label>
+ <div class="group-controls">
+ <select id="auth_type" name="auth_type" required="required">
+ <?php if (!in_array(Minz_Configuration::authType(), array('form', 'persona', 'http_auth', 'none'))) { ?>
+ <option selected="selected"></option>
+ <?php } ?>
+ <option value="form"<?php echo Minz_Configuration::authType() === 'form' ? ' selected="selected"' : '', version_compare(PHP_VERSION, '5.3', '<') ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('auth_form'); ?></option>
+ <option value="persona"<?php echo Minz_Configuration::authType() === 'persona' ? ' selected="selected"' : '', $this->conf->mail_login == '' ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('auth_persona'); ?></option>
+ <option value="http_auth"<?php echo Minz_Configuration::authType() === 'http_auth' ? ' selected="selected"' : '', httpAuthUser() == '' ? ' disabled="disabled"' : ''; ?>><?php echo Minz_Translate::t('http_auth'); ?> (REMOTE_USER = '<?php echo httpAuthUser(); ?>')</option>
+ <option value="none"<?php echo Minz_Configuration::authType() === 'none' ? ' selected="selected"' : ''; ?>><?php echo Minz_Translate::t('auth_none'); ?></option>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="anon_access">
+ <input type="checkbox" name="anon_access" id="anon_access" value="1"<?php echo Minz_Configuration::allowAnonymous() ? ' checked="checked"' : '',
+ Minz_Configuration::canLogIn() ? '' : ' disabled="disabled"'; ?> />
+ <?php echo Minz_Translate::t('allow_anonymous', Minz_Configuration::defaultUser()); ?>
+ </label>
+ </div>
+ </div>
+
+ <?php if (Minz_Configuration::canLogIn()) { ?>
+ <div class="form-group">
+ <label class="group-name" for="token"><?php echo Minz_Translate::t('auth_token'); ?></label>
+ <?php $token = $this->conf->token; ?>
+ <div class="group-controls">
+ <input type="text" id="token" name="token" value="<?php echo $token; ?>" placeholder="<?php echo Minz_Translate::t('blank_to_disable'); ?>"<?php
+ echo Minz_Configuration::canLogIn() ? '' : ' disabled="disabled"'; ?> />
+ <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('explain_token', Minz_Url::display(null, 'html', true), $token); ?>
+ </div>
+ </div>
+ <?php } ?>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t('cancel'); ?></button>
+ </div>
+ </div>
+ </form>
+
+ <form method="post" action="<?php echo _url('users', 'delete'); ?>">
+ <legend><?php echo Minz_Translate::t('users'); ?></legend>
+
+ <div class="form-group">
+ <label class="group-name" for="users_list"><?php echo Minz_Translate::t('users_list'); ?></label>
+ <div class="group-controls">
+ <select id="users_list" name="username"><?php
+ foreach (listUsers() as $user) {
+ echo '<option>', $user, '</option>';
+ }
+ ?></select>
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-attention confirm"><?php echo Minz_Translate::t('delete'); ?></button>
+ </div>
+ </div>
+ </form>
+
+ <form method="post" action="<?php echo _url('users', 'create'); ?>">
+ <legend><?php echo Minz_Translate::t('create_user'); ?></legend>
+
+ <div class="form-group">
+ <label class="group-name" for="new_user_language"><?php echo Minz_Translate::t ('language'); ?></label>
+ <div class="group-controls">
+ <select name="new_user_language" id="new_user_language">
+ <?php $languages = $this->conf->availableLanguages (); ?>
+ <?php foreach ($languages as $short => $lib) { ?>
+ <option value="<?php echo $short; ?>"<?php echo $this->conf->language === $short ? ' selected="selected"' : ''; ?>><?php echo $lib; ?></option>
+ <?php } ?>
+ </select>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="new_user_name"><?php echo Minz_Translate::t('username'); ?></label>
+ <div class="group-controls">
+ <input id="new_user_name" name="new_user_name" type="text" size="16" required="required" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" placeholder="demo" />
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="new_user_passwordPlain"><?php echo Minz_Translate::t('password_form'); ?></label>
+ <div class="group-controls">
+ <input type="password" id="new_user_passwordPlain" name="new_user_passwordPlain" pattern=".{7,}" />
+ <noscript><b><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></b></noscript>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="new_user_email"><?php echo Minz_Translate::t('persona_connection_email'); ?></label>
+ <?php $mail = $this->conf->mail_login; ?>
+ <div class="group-controls">
+ <input type="email" id="new_user_email" name="new_user_email" class="extend" placeholder="alice@example.net" />
+ </div>
+ </div>
+
+ <div class="form-group form-actions">
+ <div class="group-controls">
+ <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('create'); ?></button>
+ <button type="reset" class="btn"><?php echo Minz_Translate::t('cancel'); ?></button>
+ </div>
+ </div>
+
+ </form>
+
+ <?php } ?>
+</div>
diff --git a/app/views/entry/bookmark.phtml b/app/views/entry/bookmark.phtml
index 1ff1c220c..c1fc32b7f 100755
--- a/app/views/entry/bookmark.phtml
+++ b/app/views/entry/bookmark.phtml
@@ -1,15 +1,16 @@
<?php
+header('Content-Type: application/json; charset=UTF-8');
-if (Request::param ('is_favorite')) {
- Request::_param ('is_favorite', 0);
+if (Minz_Request::param ('is_favorite', true)) {
+ Minz_Request::_param ('is_favorite', 0);
} else {
- Request::_param ('is_favorite', 1);
+ Minz_Request::_param ('is_favorite', 1);
}
-$url = Url::display (array (
- 'c' => Request::controllerName (),
- 'a' => Request::actionName (),
- 'params' => Request::params (),
+$url = Minz_Url::display (array (
+ 'c' => Minz_Request::controllerName (),
+ 'a' => Minz_Request::actionName (),
+ 'params' => Minz_Request::params (),
));
-echo json_encode (array ('url' => str_ireplace ('&amp;', '&', $url)));
+echo json_encode (array ('url' => str_ireplace ('&amp;', '&', $url), 'icon' => FreshRSS_Themes::icon(Minz_Request::param ('is_favorite') ? 'non-starred' : 'starred')));
diff --git a/app/views/entry/read.phtml b/app/views/entry/read.phtml
index 6d3313a89..9e79d4c07 100755
--- a/app/views/entry/read.phtml
+++ b/app/views/entry/read.phtml
@@ -1,15 +1,16 @@
<?php
+header('Content-Type: application/json; charset=UTF-8');
-if (Request::param ('is_read')) {
- Request::_param ('is_read', 0);
+if (Minz_Request::param ('is_read', true)) {
+ Minz_Request::_param ('is_read', 0);
} else {
- Request::_param ('is_read', 1);
+ Minz_Request::_param ('is_read', 1);
}
-$url = Url::display (array (
- 'c' => Request::controllerName (),
- 'a' => Request::actionName (),
- 'params' => Request::params (),
+$url = Minz_Url::display (array (
+ 'c' => Minz_Request::controllerName (),
+ 'a' => Minz_Request::actionName (),
+ 'params' => Minz_Request::params (),
));
-echo json_encode (array ('url' => str_ireplace ('&amp;', '&', $url)));
+echo json_encode (array ('url' => str_ireplace ('&amp;', '&', $url), 'icon' => FreshRSS_Themes::icon(Minz_Request::param ('is_read') ? 'unread' : 'read')));
diff --git a/app/views/error/index.phtml b/app/views/error/index.phtml
index d5d090c72..36fcb56f9 100644
--- a/app/views/error/index.phtml
+++ b/app/views/error/index.phtml
@@ -3,8 +3,8 @@
<h1 class="alert-head"><?php echo $this->code; ?></h1>
<p>
- <?php echo Translate::t ('page_not_found'); ?><br />
- <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Translate::t ('back_to_rss_feeds'); ?></a>
+ <?php echo Minz_Translate::t ('page_not_found'); ?><br />
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
</p>
</div>
</div>
diff --git a/app/views/feed/actualize.phtml b/app/views/feed/actualize.phtml
index a0aba9318..d86bac9de 100644
--- a/app/views/feed/actualize.phtml
+++ b/app/views/feed/actualize.phtml
@@ -1 +1 @@
-OK \ No newline at end of file
+OK
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index 58cb3c5ac..0ecdc1bca 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -1,39 +1,44 @@
<?php
- echo '"use strict";', "\n";
- $mark = $this->conf->markWhen ();
- echo 'var ',
- 'hide_posts=', ($this->conf->displayPosts () === 'yes' || Request::param ('output') === 'reader') ? 'false' : 'true',
- ',auto_mark_article=', $mark['article'] === 'yes' ? 'true' : 'false',
- ',auto_mark_site=', $mark['site'] === 'yes' ? 'true' : 'false',
- ',auto_mark_scroll=', $mark['scroll'] === 'yes' ? 'true' : 'false',
- ',auto_load_more=', $this->conf->autoLoadMore () === 'yes' ? 'true' : 'false',
- ',full_lazyload=', $this->conf->lazyload () === 'yes' && ($this->conf->displayPosts () === 'yes' || Request::param ('output') === 'reader') ? 'true' : 'false',
- ',does_lazyload=', $this->conf->lazyload() === 'yes' ? 'true' : 'false';
-
- $s = $this->conf->shortcuts ();
- echo ',shortcuts={',
- 'mark_read:"', $s['mark_read'], '",',
- 'mark_favorite:"', $s['mark_favorite'], '",',
- 'go_website:"', $s['go_website'], '",',
- 'prev_entry:"', $s['prev_entry'], '",',
- 'next_entry:"', $s['next_entry'], '"',
- "},\n";
-
- $mail = Session::param ('mail', 'null');
- if ($mail != 'null') {
- $mail = '"' . $mail . '"';
- }
- echo 'use_persona=', login_is_conf ($this->conf) ? 'true' : 'false',
- ',url_freshrss="', _url ('index', 'index'), '",',
- 'url_login="', _url ('index', 'login'), '",',
- 'url_logout="', _url ('index', 'logout'), '",',
- 'current_user_mail=', $mail, ",\n";
-
- echo 'load_shortcuts=', Request::controllerName () === 'index' && Request::actionName () === 'index' ? 'true' : 'false', ",\n";
-
- echo 'str_confirmation="', Translate::t('confirm_action'), '"', ",\n";
-
- echo 'auto_actualize_feeds=', Session::param('actualize_feeds', false) ? 'true' : 'false', ";\n";
- if (Session::param('actualize_feeds', false)) {
- Session::_param('actualize_feeds');
- }
+
+echo '"use strict";', "\n";
+
+$mark = $this->conf->mark_when;
+echo 'var ',
+ 'hide_posts=', ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'false' : 'true',
+ ',auto_mark_article=', $mark['article'] ? 'true' : 'false',
+ ',auto_mark_site=', $mark['site'] ? 'true' : 'false',
+ ',auto_mark_scroll=', $mark['scroll'] ? 'true' : 'false',
+ ',auto_load_more=', $this->conf->auto_load_more ? 'true' : 'false',
+ ',full_lazyload=', $this->conf->lazyload && ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'true' : 'false',
+ ',does_lazyload=', $this->conf->lazyload ? 'true' : 'false';
+
+$s = $this->conf->shortcuts;
+echo ',shortcuts={',
+ 'mark_read:"', $s['mark_read'], '",',
+ 'mark_favorite:"', $s['mark_favorite'], '",',
+ 'go_website:"', $s['go_website'], '",',
+ 'prev_entry:"', $s['prev_entry'], '",',
+ 'next_entry:"', $s['next_entry'], '",',
+ 'collapse_entry:"', $s['collapse_entry'], '",',
+ 'load_more:"', $s['load_more'], '",',
+ 'auto_share:"', $s['auto_share'], '"',
+"},\n";
+
+if (Minz_Request::param ('output') === 'global') {
+ echo "iconClose='", FreshRSS_Themes::icon('close'), "',\n";
+}
+
+$authType = Minz_Configuration::authType();
+if ($authType === 'persona') {
+ echo 'current_user_mail="' . Minz_Session::param ('mail', '') . '",';
+}
+
+echo 'authType="', $authType, '",',
+ 'url_freshrss="', _url ('index', 'index'), '",',
+ 'url_login="', _url ('index', 'login'), '",',
+ 'url_logout="', _url ('index', 'logout'), '",';
+
+echo 'str_confirmation="', Minz_Translate::t('confirm_action'), '"', ",\n";
+
+$autoActualise = Minz_Session::param('actualize_feeds', false);
+echo 'auto_actualize_feeds=', $autoActualise ? 'true' : 'false', ";\n";
diff --git a/app/views/helpers/logs_pagination.phtml b/app/views/helpers/logs_pagination.phtml
index 9f1d6cb23..e3d14810e 100755
--- a/app/views/helpers/logs_pagination.phtml
+++ b/app/views/helpers/logs_pagination.phtml
@@ -1,7 +1,7 @@
<?php
- $c = Request::controllerName ();
- $a = Request::actionName ();
- $params = Request::params ();
+ $c = Minz_Request::controllerName ();
+ $a = Minz_Request::actionName ();
+ $params = Minz_Request::params ();
?>
<?php if ($this->nbPage > 1) { ?>
@@ -9,14 +9,14 @@
<?php $params[$getteur] = 1; ?>
<li class="item pager-first">
<?php if ($this->currentPage > 1) { ?>
- <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">« <?php echo Translate::t('first'); ?></a>
+ <a href="<?php echo Minz_Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">« <?php echo Minz_Translate::t('first'); ?></a>
<?php } ?>
</li>
<?php $params[$getteur] = $this->currentPage - 1; ?>
<li class="item pager-previous">
<?php if ($this->currentPage > 1) { ?>
- <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">‹ <?php echo Translate::t('previous'); ?></a>
+ <a href="<?php echo Minz_Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>">‹ <?php echo Minz_Translate::t('previous'); ?></a>
<?php } ?>
</li>
@@ -24,7 +24,7 @@
<?php if($i > 0 && $i <= $this->nbPage) { ?>
<?php if ($i != $this->currentPage) { ?>
<?php $params[$getteur] = $i; ?>
- <li class="item pager-item"><a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo $i; ?></a></li>
+ <li class="item pager-item"><a href="<?php echo Minz_Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo $i; ?></a></li>
<?php } else { ?>
<li class="item pager-current"><?php echo $i; ?></li>
<?php } ?>
@@ -34,13 +34,13 @@
<?php $params[$getteur] = $this->currentPage + 1; ?>
<li class="item pager-next">
<?php if ($this->currentPage < $this->nbPage) { ?>
- <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo Translate::t('next'); ?> ›</a>
+ <a href="<?php echo Minz_Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo Minz_Translate::t('next'); ?> ›</a>
<?php } ?>
</li>
<?php $params[$getteur] = $this->nbPage; ?>
<li class="item pager-last">
<?php if ($this->currentPage < $this->nbPage) { ?>
- <a href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo Translate::t('last'); ?> »</a>
+ <a href="<?php echo Minz_Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo Minz_Translate::t('last'); ?> »</a>
<?php } ?>
</li>
</ul>
diff --git a/app/views/helpers/pagination.phtml b/app/views/helpers/pagination.phtml
index 0018a951e..d4983a32e 100755
--- a/app/views/helpers/pagination.phtml
+++ b/app/views/helpers/pagination.phtml
@@ -1,20 +1,26 @@
<?php
- $c = Request::controllerName ();
- $a = Request::actionName ();
- $params = Request::params ();
+ $c = Minz_Request::controllerName ();
+ $a = Minz_Request::actionName ();
+ $params = Minz_Request::params ();
+ $markReadUrl = Minz_Session::param ('markReadUrl');
+ Minz_Session::_param ('markReadUrl', false);
?>
<ul class="pagination">
<li class="item pager-next">
- <?php if ($this->next != '') { ?>
- <?php $params[$getteur] = $this->next; ?>
- <a id="load_more" href="<?php echo Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo Translate::t ('load_more'); ?></a>
+ <?php if (!empty($this->nextId)) { ?>
+ <?php $params['next'] = $this->nextId; ?>
+ <a id="load_more" href="<?php echo Minz_Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo Minz_Translate::t ('load_more'); ?></a>
+ <?php } elseif ($markReadUrl) { ?>
+ <a id="bigMarkAsRead" href="<?php echo $markReadUrl; ?>">
+ <?php echo Minz_Translate::t ('nothing_to_load'); ?><br />
+ <span class="bigTick">✔</span><br />
+ <?php echo Minz_Translate::t ('mark_all_read'); ?>
+ </a>
<?php } else { ?>
- <div class="bigMarkAsRead">
- <p><?php echo Translate::t ('nothing_to_load'); ?></p>
- <p class="bigTick">✔</p>
- <p><?php echo Translate::t ('mark_all_read'); ?></p>
- </div>
+ <a id="bigMarkAsRead" href=".">
+ <?php echo Minz_Translate::t ('nothing_to_load'); ?><br />
+ </a>
<?php } ?>
</li>
</ul>
diff --git a/app/views/helpers/view/global_view.phtml b/app/views/helpers/view/global_view.phtml
index ae3bae9bc..db937eeae 100644
--- a/app/views/helpers/view/global_view.phtml
+++ b/app/views/helpers/view/global_view.phtml
@@ -2,25 +2,32 @@
<div id="stream" class="global categories">
<?php
+ $arUrl = array('c' => 'index', 'a' => 'index', 'params' => array());
+ if ($this->conf->view_mode !== 'normal') {
+ $arUrl['params']['output'] = 'normal';
+ }
+ $p = Minz_Request::param('state', '');
+ if (($p != '') && ($this->conf->default_view !== $p)) {
+ $arUrl['params']['state'] = $p;
+ }
+
foreach ($this->cat_aside as $cat) {
$feeds = $cat->feeds ();
if (!empty ($feeds)) {
?>
<div class="box-category">
<div class="category">
- <a data-unread="<?php echo $cat->nbNotRead (); ?>" class="btn" href="<?php echo _url ('index', 'index', 'get', 'c_' . $cat->id (), 'output', 'normal'); ?>">
- <?php echo htmlspecialchars($cat->name(), ENT_NOQUOTES, 'UTF-8'); ?>
+ <a data-unread="<?php echo formatNumber($cat->nbNotRead()); ?>" class="btn" href="<?php $arUrl['params']['get'] = 'c_' . $cat->id (); echo Minz_Url::display($arUrl); ?>">
+ <?php echo $cat->name(); ?>
</a>
</div>
-
<ul class="feeds">
<?php foreach ($feeds as $feed) { ?>
<?php $not_read = $feed->nbNotRead (); ?>
<li id="f_<?php echo $feed->id (); ?>" class="item<?php echo $feed->inError () ? ' error' : ''; ?><?php echo $feed->nbEntries () == 0 ? ' empty' : ''; ?>">
<img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" />
-
- <a class="feed" data-unread="<?php echo $feed->nbNotRead (); ?>" data-priority="<?php echo $feed->priority (); ?>" href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed->id (), 'output', 'normal'); ?>">
- <?php echo htmlspecialchars($feed->name(), ENT_NOQUOTES, 'UTF-8'); ?>
+ <a class="feed" data-unread="<?php echo formatNumber($feed->nbNotRead()); ?>" data-priority="<?php echo $feed->priority (); ?>" href="<?php $arUrl['params']['get'] = 'f_' . $feed->id(); echo Minz_Url::display($arUrl); ?>">
+ <?php echo $feed->name(); ?>
</a>
</li>
<?php } ?>
@@ -33,6 +40,6 @@
</div>
<div id="overlay"></div>
-<div id="panel"<?php echo $this->conf->displayPosts () === 'no' ? ' class="hide_posts"' : ''; ?>>
- <a class="close" href="#"><i class="icon i_close"></i></a>
-</div> \ No newline at end of file
+<div id="panel"<?php echo $this->conf->display_posts ? '' : ' class="hide_posts"'; ?>>
+ <a class="close" href="#"><?php echo FreshRSS_Themes::icon('close'); ?></a>
+</div>
diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml
index ad6154163..7b7faccee 100644
--- a/app/views/helpers/view/normal_view.phtml
+++ b/app/views/helpers/view/normal_view.phtml
@@ -3,53 +3,98 @@
$this->partial ('aside_flux');
$this->partial ('nav_menu');
-if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
- $items = $this->entryPaginator->items ();
+if (!empty($this->entries)) {
+ $display_today = true;
+ $display_yesterday = true;
+ $display_others = true;
+ if ($this->loginOk) {
+ $shaarli = $this->conf->sharing ('shaarli');
+ $wallabag = $this->conf->sharing ('wallabag');
+ $diaspora = $this->conf->sharing ('diaspora');
+ } else {
+ $shaarli = '';
+ $wallabag = '';
+ $diaspora = '';
+ }
+ $twitter = $this->conf->sharing ('twitter');
+ $google_plus = $this->conf->sharing ('g+');
+ $facebook = $this->conf->sharing ('facebook');
+ $email = $this->conf->sharing ('email');
+ $print = $this->conf->sharing ('print');
+ $hidePosts = !$this->conf->display_posts;
+ $lazyload = $this->conf->lazyload;
+ $topline_read = $this->conf->topline_read;
+ $topline_favorite = $this->conf->topline_favorite;
+ $topline_date = $this->conf->topline_date;
+ $topline_link = $this->conf->topline_link;
+ $bottomline_read = $this->conf->bottomline_read;
+ $bottomline_favorite = $this->conf->bottomline_favorite;
+ $bottomline_sharing = $this->conf->bottomline_sharing && (
+ $shaarli || $wallabag || $diaspora || $twitter ||
+ $google_plus || $facebook || $email || $print);
+ $bottomline_tags = $this->conf->bottomline_tags;
+ $bottomline_date = $this->conf->bottomline_date;
+ $bottomline_link = $this->conf->bottomline_link;
?>
-<div id="stream" class="normal<?php echo $this->conf->displayPosts () === 'no' ? ' hide_posts' : ''; ?>">
- <?php
- $display_today = true;
- $display_yesterday = true;
- $display_others = true;
- ?>
- <?php foreach ($items as $item) { ?>
-
- <?php if ($display_today && $item->isDay (Days::TODAY)) { ?>
- <div class="day" id="day_today">
- <?php echo Translate::t ('today'); ?>
- <span class="date"> - <?php echo timestamptodate (time (), false); ?></span>
- <span class="name"><?php echo $this->currentName; ?></span>
- </div>
- <?php $display_today = false; } ?>
- <?php if ($display_yesterday && $item->isDay (Days::YESTERDAY)) { ?>
- <div class="day" id="day_yesterday">
- <?php echo Translate::t ('yesterday'); ?>
- <span class="date"> - <?php echo timestamptodate (time () - 86400, false); ?></span>
- <span class="name"><?php echo $this->currentName; ?></span>
- </div>
- <?php $display_yesterday = false; } ?>
- <?php if ($display_others && $item->isDay (Days::BEFORE_YESTERDAY)) { ?>
- <div class="day" id="day_before_yesterday">
- <?php echo Translate::t ('before_yesterday'); ?>
- <span class="name"><?php echo $this->currentName; ?></span>
- </div>
- <?php $display_others = false; } ?>
-
- <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 ()) { ?>
- <?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
+<div id="stream" class="normal<?php echo $hidePosts ? ' hide_posts' : ''; ?>"><?php
+ ?><div id="new-article">
+ <a href="<?php echo _url('index', 'index'); ?>"><?php echo Minz_Translate::t ('new_article'); ?></a>
+ </div><?php
+ foreach ($this->entries as $item) {
+ if ($display_today && $item->isDay (FreshRSS_Days::TODAY, $this->today)) {
+ ?><div class="day" id="day_today"><?php
+ echo Minz_Translate::t ('today');
+ ?><span class="date"> — <?php echo timestamptodate (time (), false); ?></span><?php
+ ?><span class="name"><?php echo $this->currentName; ?></span><?php
+ ?></div><?php
+ $display_today = false;
+ }
+ if ($display_yesterday && $item->isDay (FreshRSS_Days::YESTERDAY, $this->today)) {
+ ?><div class="day" id="day_yesterday"><?php
+ echo Minz_Translate::t ('yesterday');
+ ?><span class="date"> — <?php echo timestamptodate (time () - 86400, false); ?></span><?php
+ ?><span class="name"><?php echo $this->currentName; ?></span><?php
+ ?></div><?php
+ $display_yesterday = false;
+ }
+ if ($display_others && $item->isDay (FreshRSS_Days::BEFORE_YESTERDAY, $this->today)) {
+ ?><div class="day" id="day_before_yesterday"><?php
+ echo Minz_Translate::t ('before_yesterday');
+ ?><span class="name"><?php echo $this->currentName; ?></span><?php
+ ?></div><?php
+ $display_others = false;
+ }
+ ?><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 ($this->loginOk) {
+ if ($topline_read) {
+ ?><li class="item manage"><?php
+ $arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('id' => $item->id ()));
+ if ($item->isRead()) {
+ $arUrl['params']['is_read'] = 0;
+ }
+ ?><a class="read" href="<?php echo Minz_Url::display($arUrl); ?>"><?php
+ echo FreshRSS_Themes::icon($item->isRead () ? 'read' : 'unread'); ?></a><?php
+ ?></li><?php
+ }
+ if ($topline_favorite) {
+ ?><li class="item manage"><?php
+ $arUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $item->id ()));
+ if ($item->isFavorite()) {
+ $arUrl['params']['is_favorite'] = 0;
+ }
+ ?><a class="bookmark" href="<?php echo Minz_Url::display($arUrl); ?>"><?php
+ echo FreshRSS_Themes::icon($item->isFavorite () ? 'starred' : 'non-starred'); ?></a><?php
+ ?></li><?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 htmlspecialchars($feed->name(), ENT_NOQUOTES, 'UTF-8'); ?></span></a></li>
+ }
+ $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);
+ ?><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 ($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 } ?>
+ <?php if ($topline_date) { ?><li class="item date"><?php echo $item->date (); ?> </li><?php } ?>
+ <?php if ($topline_link) { ?><li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a></li><?php } ?>
</ul>
<div class="flux_content">
@@ -57,96 +102,139 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
<h1 class="title"><?php echo $item->title (); ?></h1>
<?php
$author = $item->author ();
- echo $author != '' ? '<div class="author">' . Translate::t ('by_author', $author) . '</div>' : '';
- if($this->conf->lazyload() == 'yes') {
- echo lazyimg($item->content ());
+ echo $author != '' ? '<div class="author">' . Minz_Translate::t ('by_author', $author) . '</div>' : '';
+ if ($lazyload) {
+ echo $hidePosts ? lazyIframe(lazyimg($item->content())) : lazyimg($item->content());
} else {
echo $item->content();
}
?>
</div>
-
- <ul class="horizontal-list bottom">
- <?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
- <?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
- if ($this->conf->bottomlineSharing ()) {
+ <ul class="horizontal-list bottom"><?php
+ if ($this->loginOk) {
+ if ($bottomline_read) {
+ ?><li class="item manage"><?php
+ $arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('id' => $item->id ()));
+ if ($item->isRead()) {
+ $arUrl['params']['is_read'] = 0;
+ }
+ ?><a class="read" href="<?php echo Minz_Url::display($arUrl); ?>"><?php
+ echo FreshRSS_Themes::icon($item->isRead () ? 'read' : 'unread'); ?></a><?php
+ ?></li><?php
+ }
+ if ($bottomline_favorite) {
+ ?><li class="item manage"><?php
+ $arUrl = array('c' => 'entry', 'a' => 'bookmark', 'params' => array('id' => $item->id ()));
+ if ($item->isFavorite()) {
+ $arUrl['params']['is_favorite'] = 0;
+ }
+ ?><a class="bookmark" href="<?php echo Minz_Url::display($arUrl); ?>"><?php
+ echo FreshRSS_Themes::icon($item->isFavorite () ? 'starred' : 'non-starred'); ?></a><?php
+ ?></li><?php
+ }
+ } ?>
+ <li class="item"><?php
+ if ($bottomline_sharing) {
$link = urlencode ($item->link ());
- $title = urlencode ($item->title () . ' - ' . $feed->name ());
- ?>
- <div class="dropdown">
+ $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>
+ <a class="dropdown-toggle" href="#dropdown-share-<?php echo $item->id ();?>">
+ <?php echo FreshRSS_Themes::icon('share'); ?>
+ <?php echo Minz_Translate::t ('share'); ?>
+ </a>
<ul class="dropdown-menu">
- <li class="dropdown-close"><a href="#close">&nbsp;</a></li>
- <?php
- $shaarli = $this->conf->urlShaarli ();
- if ((!login_is_conf ($this->conf) || is_logged ()) && $shaarli) {
- ?>
+ <li class="dropdown-close"><a href="#close">❌</a></li>
+ <?php if ($shaarli) { ?>
<li class="item">
- <a target="_blank" href="<?php echo $shaarli . '?post=' . $link . '&amp;title=' . $title . '&amp;source=bookmarklet'; ?>">
- Shaarli
+ <a target="_blank" href="<?php echo $shaarli . '?post=' . $link . '&amp;title=' . $title . '&amp;source=FreshRSS'; ?>">
+ <?php echo Minz_Translate::t ('shaarli'); ?>
</a>
</li>
- <?php } ?>
+ <?php } if ($wallabag) { ?>
<li class="item">
- <a href="mailto:?subject=<?php echo urldecode($title); ?>&amp;body=<?php echo $link; ?>">
- <?php echo Translate::t ('by_email'); ?>
+ <a target="_blank" href="<?php echo $wallabag . '?action=add&amp;url=' . base64_encode (urldecode($link)); ?>">
+ <?php echo Minz_Translate::t ('wallabag'); ?>
</a>
</li>
+ <?php } if ($diaspora) { ?>
+ <li class="item">
+ <a target="_blank" href="<?php echo $diaspora . '/bookmarklet?url=' . $link . '&amp;title=' . $title; ?>">
+ <?php echo Minz_Translate::t ('diaspora'); ?>
+ </a>
+ </li>
+ <?php } if ($twitter) { ?>
<li class="item">
<a target="_blank" href="https://twitter.com/share?url=<?php echo $link; ?>&amp;text=<?php echo $title; ?>">
- Twitter
+ <?php echo Minz_Translate::t ('twitter'); ?>
+ </a>
+ </li>
+ <?php } if ($google_plus) { ?>
+ <li class="item">
+ <a target="_blank" href="https://plus.google.com/share?url=<?php echo $link; ?>">
+ <?php echo Minz_Translate::t ('g+'); ?>
</a>
</li>
+ <?php } if ($facebook) { ?>
<li class="item">
<a target="_blank" href="https://www.facebook.com/sharer.php?u=<?php echo $link; ?>&amp;t=<?php echo $title; ?>">
- Facebook
+ <?php echo Minz_Translate::t ('facebook'); ?>
</a>
</li>
+ <?php } if ($email) { ?>
<li class="item">
- <a target="_blank" href="https://plus.google.com/share?url=<?php echo $link; ?>">
- Google+
+ <a href="mailto:?subject=<?php echo urldecode($title); ?>&amp;body=<?php echo $link; ?>">
+ <?php echo Minz_Translate::t ('by_email'); ?>
+ </a>
+ </li>
+ <?php } if ($print) { ?>
+ <li class="item">
+ <a href="#" class="print-article">
+ <?php echo Minz_Translate::t ('print'); ?>
</a>
</li>
+ <?php } ?>
</ul>
- </div><?php } ?>
- </li>
- <?php
- $tags = $this->conf->bottomlineTags () ? $item->tags() : null;
- if (!empty($tags)) {
- ?>
- <li class="item">
+ </div>
+ <?php } ?>
+ </li><?php
+ $tags = $bottomline_tags ? $item->tags() : null;
+ if (!empty($tags)) {
+ ?><li class="item">
<div class="dropdown">
<div id="dropdown-tags-<?php echo $item->id ();?>" class="dropdown-target"></div>
- <i class="icon i_tag"></i> <a class="dropdown-toggle" href="#dropdown-tags-<?php echo $item->id ();?>"><?php echo Translate::t ('related_tags'); ?></a>
+ <a class="dropdown-toggle" href="#dropdown-tags-<?php echo $item->id ();?>"><?php
+ echo FreshRSS_Themes::icon('tag'), Minz_Translate::t ('related_tags');
+ ?></a>
<ul class="dropdown-menu">
- <li class="dropdown-close"><a href="#close">&nbsp;</a></li>
- <?php foreach($tags as $tag) { ?>
- <li class="item"><a href="<?php echo _url ('index', 'index', 'search', urlencode ('#' . $tag)); ?>"><?php echo $tag; ?></a></li>
- <?php } ?>
+ <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', urlencode ('#' . $tag)); ?>"><?php echo $tag; ?></a></li><?php
+ } ?>
</ul>
</div>
- </li>
- <?php } ?>
- <?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 } ?>
+ </li><?php
+ }
+ if ($bottomline_date) {
+ ?><li class="item date"><?php echo $item->date (); ?></li><?php
+ }
+ if ($bottomline_link) {
+ ?><li class="item link"><a target="_blank" href="<?php echo $item->link (); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a></li><?php
+ } ?>
</ul>
</div>
</div>
<?php } ?>
- <?php $this->entryPaginator->render ('pagination.phtml', 'next'); ?>
+ <?php $this->renderHelper('pagination'); ?>
</div>
<?php $this->partial ('nav_entries'); ?>
<?php } else { ?>
<div id="stream" class="alert alert-warn normal">
- <span class="alert-head"><?php echo Translate::t ('no_feed_to_display'); ?></span>
+ <span class="alert-head"><?php echo Minz_Translate::t ('no_feed_to_display'); ?></span>
+ <?php echo Minz_Translate::t ('think_to_add'); ?>
</div>
-<?php } ?> \ No newline at end of file
+<?php } ?>
diff --git a/app/views/helpers/view/reader_view.phtml b/app/views/helpers/view/reader_view.phtml
index f808990f7..bda96e86d 100644
--- a/app/views/helpers/view/reader_view.phtml
+++ b/app/views/helpers/view/reader_view.phtml
@@ -1,33 +1,33 @@
<?php
$this->partial ('nav_menu');
-if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
- $items = $this->entryPaginator->items ();
+if (!empty($this->entries)) {
+ $lazyload = $this->conf->lazyload;
?>
<div id="stream" class="reader">
- <?php foreach ($items as $item) { ?>
+ <?php foreach ($this->entries as $item) { ?>
<div class="flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>">
<div class="flux_content">
<div class="content">
<?php
- $feed = HelperCategory::findFeed($this->cat_aside, $item->feed ()); //We most likely already have the feed object in cache
+ $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);
?>
<a href="<?php echo $item->link (); ?>">
- <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <span><?php echo htmlspecialchars($feed->name(), ENT_NOQUOTES, 'UTF-8'); ?></span>
+ <img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" /> <span><?php echo $feed->name(); ?></span>
</a>
<h1 class="title"><?php echo $item->title (); ?></h1>
<div class="author">
<?php $author = $item->author (); ?>
- <?php echo $author != '' ? Translate::t ('by_author', $author) . ' - ' : ''; ?>
+ <?php echo $author != '' ? Minz_Translate::t ('by_author', $author) . ' — ' : ''; ?>
<?php echo $item->date (); ?>
</div>
<?php
- if($this->conf->lazyload() == 'yes') {
+ if ($lazyload) {
echo lazyimg($item->content ());
} else {
echo $item->content();
@@ -38,11 +38,12 @@ if (isset ($this->entryPaginator) && !$this->entryPaginator->isEmpty ()) {
</div>
<?php } ?>
- <?php $this->entryPaginator->render ('pagination.phtml', 'next'); ?>
+ <?php $this->renderHelper('pagination'); ?>
</div>
<?php } else { ?>
<div id="stream" class="alert alert-warn reader">
- <span class="alert-head"><?php echo Translate::t ('no_feed_to_display'); ?></span>
+ <span class="alert-head"><?php echo Minz_Translate::t ('no_feed_to_display'); ?></span>
+ <?php echo Minz_Translate::t ('think_to_add'); ?>
</div>
-<?php } ?> \ No newline at end of file
+<?php } ?>
diff --git a/app/views/helpers/view/rss_view.phtml b/app/views/helpers/view/rss_view.phtml
index 9358ef2a5..620bf1388 100755
--- a/app/views/helpers/view/rss_view.phtml
+++ b/app/views/helpers/view/rss_view.phtml
@@ -2,17 +2,16 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title><?php echo $this->rss_title; ?></title>
- <link><?php echo Url::display(null, 'html', true); ?></link>
- <description><?php echo Translate::t ('rss_feeds_of', $this->rss_title); ?></description>
+ <link><?php echo Minz_Url::display(null, 'html', true); ?></link>
+ <description><?php echo Minz_Translate::t ('rss_feeds_of', $this->rss_title); ?></description>
<pubDate><?php echo date('D, d M Y H:i:s O'); ?></pubDate>
<lastBuildDate><?php echo gmdate('D, d M Y H:i:s'); ?> GMT</lastBuildDate>
- <atom:link href="<?php echo Url::display ($this->rss_url, 'html', true); ?>" rel="self" type="application/rss+xml" />
+ <atom:link href="<?php echo Minz_Url::display ($this->rss_url, 'html', true); ?>" rel="self" type="application/rss+xml" />
<?php
-$items = $this->entryPaginator->items ();
-foreach ($items as $item) {
+foreach ($this->entries as $item) {
?>
<item>
- <title><?php echo htmlspecialchars(html_entity_decode($item->title (), ENT_NOQUOTES, 'UTF-8'), ENT_NOQUOTES, 'UTF-8'); ?></title>
+ <title><?php echo $item->title (); ?></title>
<link><?php echo $item->link (); ?></link>
<?php $author = $item->author (); ?>
<?php if ($author != '') { ?>
diff --git a/app/views/index/about.phtml b/app/views/index/about.phtml
index ca1254053..76ff804d8 100644
--- a/app/views/index/about.phtml
+++ b/app/views/index/about.phtml
@@ -1,24 +1,27 @@
<div class="post content">
- <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Translate::t ('back_to_rss_feeds'); ?></a>
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
- <h1><?php echo Translate::t ('about_freshrss'); ?></h1>
+ <h1><?php echo Minz_Translate::t ('about_freshrss'); ?></h1>
<dl class="infos">
- <dt><?php echo Translate::t ('project_website'); ?></dt>
- <dd><a href="http://marienfressinaud.github.io/FreshRSS/">http://marienfressinaud.github.io/FreshRSS/</a></dd>
+ <dt><?php echo Minz_Translate::t ('project_website'); ?></dt>
+ <dd><a href="<?php echo FRESHRSS_WEBSITE; ?>"><?php echo FRESHRSS_WEBSITE; ?></a></dd>
- <dt><?php echo Translate::t ('lead_developer'); ?></dt>
- <dd><a href="mailto:contact@marienfressinaud.fr">Marien Fressinaud</a> - <a href="http://marienfressinaud.fr"><?php echo Translate::t ('website'); ?></a></dd>
+ <dt><?php echo Minz_Translate::t ('lead_developer'); ?></dt>
+ <dd><a href="mailto:contact@marienfressinaud.fr">Marien Fressinaud</a> — <a href="http://marienfressinaud.fr"><?php echo Minz_Translate::t ('website'); ?></a></dd>
- <dt><?php echo Translate::t ('bugs_reports'); ?></dt>
- <dd><?php echo Translate::t ('github_or_email'); ?></dd>
+ <dt><?php echo Minz_Translate::t ('bugs_reports'); ?></dt>
+ <dd><?php echo Minz_Translate::t ('github_or_email'); ?></dd>
- <dt><?php echo Translate::t ('license'); ?></dt>
- <dd><?php echo Translate::t ('agpl3'); ?></dd>
+ <dt><?php echo Minz_Translate::t ('license'); ?></dt>
+ <dd><?php echo Minz_Translate::t ('agpl3'); ?></dd>
+
+ <dt><?php echo Minz_Translate::t ('version'); ?></dt>
+ <dd><?php echo FRESHRSS_VERSION; ?></dd>
</dl>
- <p><?php echo Translate::t ('freshrss_description'); ?></p>
+ <p><?php echo Minz_Translate::t ('freshrss_description'); ?></p>
- <h1><?php echo Translate::t ('credits'); ?></h1>
- <p><?php echo Translate::t ('credits_content'); ?></p>
+ <h1><?php echo Minz_Translate::t ('credits'); ?></h1>
+ <p><?php echo Minz_Translate::t ('credits_content'); ?></p>
</div>
diff --git a/app/views/index/formLogin.phtml b/app/views/index/formLogin.phtml
new file mode 100644
index 000000000..e4560c1a0
--- /dev/null
+++ b/app/views/index/formLogin.phtml
@@ -0,0 +1,34 @@
+<div class="prompt">
+<?php
+if (Minz_Configuration::canLogIn()) {
+ ?><h1><?php echo Minz_Translate::t('login'); ?></h1><?php
+ switch (Minz_Configuration::authType()) {
+
+ case 'form':
+ ?><form id="loginForm" method="post" action="<?php echo _url('index', 'formLogin'); ?>">
+ <p>
+ <label for="username"><?php echo Minz_Translate::t('username'); ?></label>
+ <input type="text" id="username" name="username" size="16" required="required" maxlength="16" pattern="[0-9a-zA-Z]{1,16}" autofocus="autofocus" />
+ </p><p>
+ <label for="passwordPlain"><?php echo Minz_Translate::t('password'); ?></label>
+ <input type="password" id="passwordPlain" required="required" />
+ <input type="hidden" id="challenge" name="challenge" /><br />
+ <noscript><strong><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></strong></noscript>
+ </p><p>
+ <button id="loginButton" type="submit" class="btn btn-important"><?php echo Minz_Translate::t('login'); ?></button>
+ </p>
+ </form><?php
+ break;
+
+ case 'persona':
+ ?><p><?php echo FreshRSS_Themes::icon('login'); ?> <a class="signin" href="#"><?php echo Minz_Translate::t('login'); ?></a></p><?php
+ break;
+ }
+} else {
+ ?><h1>FreshRSS</h1>
+ <p><?php echo Minz_Translate::t('forbidden_access', Minz_Configuration::authType()); ?></p><?php
+}
+?>
+
+<p><a href="<?php echo _url('index', 'about'); ?>"><?php echo Minz_Translate::t('about_freshrss'); ?></a></p>
+</div>
diff --git a/app/views/index/index.phtml b/app/views/index/index.phtml
index bd18d2d77..4545a33e4 100644
--- a/app/views/index/index.phtml
+++ b/app/views/index/index.phtml
@@ -1,29 +1,30 @@
<?php
-$output = Request::param ('output', 'normal');
-$token = $this->conf->token();
-$token_param = Request::param ('token', '');
-$token_is_ok = ($token != '' && $token == $token_param);
+$output = Minz_Request::param ('output', 'normal');
-if(!login_is_conf ($this->conf) ||
- is_logged() ||
- $this->conf->anonAccess() == 'yes' ||
- ($output == 'rss' && $token_is_ok)) {
- if($output == 'rss') {
+if ($this->loginOk || Minz_Configuration::allowAnonymous()) {
+ if ($output === 'normal') {
+ $this->renderHelper ('view/normal_view');
+ } elseif ($output === 'rss') {
$this->renderHelper ('view/rss_view');
- } elseif($output == 'reader') {
+ } elseif ($output === 'reader') {
$this->renderHelper ('view/reader_view');
- } elseif($output == 'global') {
+ } elseif ($output === 'global') {
$this->renderHelper ('view/global_view');
} else {
+ Minz_Request::_param ('output', 'normal');
+ $output = 'normal';
$this->renderHelper ('view/normal_view');
}
+} elseif ($output === 'rss') {
+ $token = $this->conf->token;
+ $token_param = Minz_Request::param ('token', '');
+ $token_is_ok = ($token != '' && $token == $token_param);
+ if ($token_is_ok) {
+ $this->renderHelper ('view/rss_view');
+ } else {
+ Minz_Request::forward(array('c' => 'index', 'a' => 'formLogin'), true);
+ }
} else {
-?>
-<div class="post content">
- <h1><?php echo Translate::t ('forbidden_access'); ?></h1>
- <p><?php echo Translate::t ('forbidden_access_description'); ?></p>
- <p><a href="<?php echo _url ('index', 'about'); ?>"><?php echo Translate::t ('about_freshrss'); ?></a></p>
-</div>
-<?php
-} \ No newline at end of file
+ Minz_Request::forward(array('c' => 'index', 'a' => 'formLogin'), true);
+}
diff --git a/app/views/index/logs.phtml b/app/views/index/logs.phtml
index 09f0c4ecd..1b77b39af 100644
--- a/app/views/index/logs.phtml
+++ b/app/views/index/logs.phtml
@@ -1,21 +1,25 @@
<div class="post content">
- <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Translate::t ('back_to_rss_feeds'); ?></a>
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
- <h1><?php echo Translate::t ('logs'); ?></h1>
+ <h1><?php echo Minz_Translate::t ('logs'); ?></h1>
+ <form method="post" action="<?php echo _url ('index', 'logs'); ?>"><p>
+ <input type="hidden" name="clearLogs" />
+ <button type="submit" class="btn"><?php echo Minz_Translate::t ('clear_logs'); ?></button>
+ </p></form>
<?php $items = $this->logsPaginator->items (); ?>
<?php if (!empty ($items)) { ?>
<div class="logs">
<?php $this->logsPaginator->render ('logs_pagination.phtml', 'page'); ?>
-
+
<?php foreach ($items as $log) { ?>
- <div class="log <?php echo $log->level (); ?>"><span class="date"><?php echo date ('d/m/Y - H:i:s', strtotime ($log->date ())); ?></span><?php echo htmlspecialchars ($log->info (), ENT_NOQUOTES, 'UTF-8'); ?></div>
+ <div class="log <?php echo $log->level (); ?>"><span class="date"><?php echo @date ('Y-m-d H:i:s', @strtotime ($log->date ())); ?></span><?php echo htmlspecialchars ($log->info (), ENT_NOQUOTES, 'UTF-8'); ?></div>
<?php } ?>
-
+
<?php $this->logsPaginator->render ('logs_pagination.phtml','page'); ?>
</div>
<?php } else { ?>
- <p class="alert alert-warn"><?php echo Translate::t ('logs_empty'); ?></p>
+ <p class="alert alert-warn"><?php echo Minz_Translate::t ('logs_empty'); ?></p>
<?php } ?>
</div>
diff --git a/app/views/index/stats.phtml b/app/views/index/stats.phtml
new file mode 100644
index 000000000..b5c18813d
--- /dev/null
+++ b/app/views/index/stats.phtml
@@ -0,0 +1,125 @@
+<div class="post content">
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
+
+ <h1><?php echo Minz_Translate::t ('stats'); ?></h1>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('stats_entry_repartition'); ?></h2>
+ <table>
+ <thead>
+ <tr>
+ <th> </th>
+ <th><?php echo Minz_Translate::t ('main_stream'); ?></th>
+ <th><?php echo Minz_Translate::t ('all_feeds'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <th><?php echo Minz_Translate::t ('status_total'); ?></th>
+ <td class="numeric"><?php echo formatNumber($this->repartition['main_stream']['total']); ?></td>
+ <td class="numeric"><?php echo formatNumber($this->repartition['all_feeds']['total']); ?></td>
+ </tr>
+ <tr>
+ <th><?php echo Minz_Translate::t ('status_read'); ?></th>
+ <td class="numeric"><?php echo formatNumber($this->repartition['main_stream']['read']); ?></td>
+ <td class="numeric"><?php echo formatNumber($this->repartition['all_feeds']['read']); ?></td>
+ </tr>
+ <tr>
+ <th><?php echo Minz_Translate::t ('status_unread'); ?></th>
+ <td class="numeric"><?php echo formatNumber($this->repartition['main_stream']['unread']); ?></td>
+ <td class="numeric"><?php echo formatNumber($this->repartition['all_feeds']['unread']); ?></td>
+ </tr>
+ <tr>
+ <th><?php echo Minz_Translate::t ('status_favorites'); ?></th>
+ <td class="numeric"><?php echo formatNumber($this->repartition['main_stream']['favorite']); ?></td>
+ <td class="numeric"><?php echo formatNumber($this->repartition['all_feeds']['favorite']); ?></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('stats_entry_per_day'); ?></h2>
+ <div id="statsEntryPerDay" style="height: 300px"></div>
+ </div>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('stats_feed_per_category'); ?></h2>
+ <div id="statsFeedPerCategory" style="height: 300px"></div>
+ <div id="statsFeedPerCategoryLegend"></div>
+ </div>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('stats_entry_per_category'); ?></h2>
+ <div id="statsEntryPerCategory" style="height: 300px"></div>
+ <div id="statsEntryPerCategoryLegend"></div>
+ </div>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('stats_top_feed'); ?></h2>
+ <table>
+ <thead>
+ <tr>
+ <th><?php echo Minz_Translate::t ('feed'); ?></th>
+ <th><?php echo Minz_Translate::t ('category'); ?></th>
+ <th><?php echo Minz_Translate::t ('stats_entry_count'); ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php foreach ($this->topFeed as $feed): ?>
+ <tr>
+ <td><?php echo $feed['name']; ?></td>
+ <td><?php echo $feed['category']; ?></td>
+ <td class="numeric"><?php echo formatNumber($feed['count']); ?></td>
+ </tr>
+ <?php endforeach;?>
+ </tbody>
+ </table>
+ </div>
+</div>
+
+<script>
+"use strict";
+function initStats() {
+ if (!window.Flotr) {
+ if (window.console) {
+ console.log('FreshRSS waiting for Flotr…');
+ }
+ window.setTimeout(initStats, 50);
+ return;
+ }
+ // Entry per day
+ Flotr.draw(document.getElementById('statsEntryPerDay'),
+ [<?php echo $this->count ?>],
+ {
+ grid: {verticalLines: false},
+ bars: {horizontal: false, show: true},
+ xaxis: {noTicks: 6, showLabels: false, tickDecimals: 0},
+ yaxis: {min: 0},
+ mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return numberFormat(obj.y);}}
+ });
+ // Feed per category
+ Flotr.draw(document.getElementById('statsFeedPerCategory'),
+ <?php echo $this->feedByCategory ?>,
+ {
+ grid: {verticalLines: false, horizontalLines: false},
+ pie: {explode: 10, show: true, labelFormatter: function(){return '';}},
+ xaxis: {showLabels: false},
+ yaxis: {showLabels: false},
+ mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.series.label + ' - '+ numberFormat(obj.y) + ' ('+ (obj.fraction * 100).toFixed(1) + '%)';}},
+ legend: {container: document.getElementById('statsFeedPerCategoryLegend'), noColumns: 3}
+ });
+ // Entry per category
+ Flotr.draw(document.getElementById('statsEntryPerCategory'),
+ <?php echo $this->entryByCategory ?>,
+ {
+ grid: {verticalLines: false, horizontalLines: false},
+ pie: {explode: 10, show: true, labelFormatter: function(){return '';}},
+ xaxis: {showLabels: false},
+ yaxis: {showLabels: false},
+ mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.series.label + ' - '+ numberFormat(obj.y) + ' ('+ (obj.fraction * 100).toFixed(1) + '%)';}},
+ legend: {container: document.getElementById('statsEntryPerCategoryLegend'), noColumns: 3}
+ });
+}
+initStats();
+</script>
diff --git a/app/views/javascript/actualize.phtml b/app/views/javascript/actualize.phtml
index f39540a9a..1f6072c29 100644
--- a/app/views/javascript/actualize.phtml
+++ b/app/views/javascript/actualize.phtml
@@ -1,37 +1,41 @@
-var feeds = new Array ();
+"use strict";
+var feeds = [];
<?php foreach ($this->feeds as $feed) { ?>
-feeds.push ("<?php echo Url::display (array ('c' => 'feed', 'a' => 'actualize', 'params' => array ('id' => $feed->id (), 'ajax' => '1')), 'php'); ?>");
+feeds.push("<?php echo Minz_Url::display (array ('c' => 'feed', 'a' => 'actualize', 'params' => array ('id' => $feed->id (), 'ajax' => '1')), 'php'); ?>");
<?php } ?>
-function initProgressBar (init) {
+function initProgressBar(init) {
if (init) {
- $("body").after ("\<div id=\"actualizeProgress\" class=\"actualizeProgress\">\
- <?php echo Translate::t ('refresh'); ?> <span class=\"progress\">0 / " + feeds.length + "</span><br />\
+ $("body").after("\<div id=\"actualizeProgress\" class=\"actualizeProgress\">\
+ <?php echo Minz_Translate::t ('refresh'); ?> <span class=\"progress\">0 / " + feeds.length + "</span><br />\
<progress id=\"actualizeProgressBar\" value=\"0\" max=\"" + feeds.length + "\"></progress>\
</div>");
} else {
- window.location.reload ();
+ window.location.reload();
}
}
-function updateProgressBar (i) {
+function updateProgressBar(i) {
$("#actualizeProgressBar").val(i);
- $("#actualizeProgress .progress").html (i + " / " + feeds.length);
+ $("#actualizeProgress .progress").html(i + " / " + feeds.length);
}
-function updateFeeds () {
- initProgressBar (true);
+function updateFeeds() {
+ if (feeds.length === 0) {
+ return;
+ }
+ initProgressBar(true);
var i = 0;
for (var f in feeds) {
- $.ajax ({
+ $.ajax({
type: 'POST',
url: feeds[f],
- }).done (function (data) {
+ }).done(function (data) {
i++;
- updateProgressBar (i);
+ updateProgressBar(i);
- if (i == feeds.length) {
- initProgressBar (false);
+ if (i === feeds.length) {
+ initProgressBar(false);
}
});
}
diff --git a/app/views/javascript/nbUnreadsPerFeed.phtml b/app/views/javascript/nbUnreadsPerFeed.phtml
new file mode 100644
index 000000000..68f98ce9e
--- /dev/null
+++ b/app/views/javascript/nbUnreadsPerFeed.phtml
@@ -0,0 +1,8 @@
+<?php
+$result = array();
+foreach ($this->categories as $cat) {
+ foreach ($cat->feeds() as $feed) {
+ $result[$feed->id()] = $feed->nbNotRead();
+ }
+}
+echo json_encode($result);
diff --git a/app/views/javascript/nonce.phtml b/app/views/javascript/nonce.phtml
new file mode 100644
index 000000000..4ac46c8fc
--- /dev/null
+++ b/app/views/javascript/nonce.phtml
@@ -0,0 +1,2 @@
+<?php
+echo json_encode(array('salt1' => $this->salt1, 'nonce' => $this->nonce));