summaryrefslogtreecommitdiff
path: root/app/views/configure
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/configure')
-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
8 files changed, 507 insertions, 195 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>