diff options
| author | 2013-12-27 19:23:11 +0100 | |
|---|---|---|
| committer | 2013-12-27 19:23:11 +0100 | |
| commit | 9f52ab97cb947944546917623d8fe0999d8bda9b (patch) | |
| tree | 711f1e2b99278fbb4f0be5c8f387633767b5ebb7 /app/views | |
| parent | a1249e56a7151ea20f64ac3091c0a3383d21049c (diff) | |
Début 0.8-dev
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/126
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/configure/archiving.phtml | 47 | ||||
| -rw-r--r-- | app/views/configure/display.phtml | 73 | ||||
| -rw-r--r-- | app/views/configure/users.phtml | 72 |
3 files changed, 120 insertions, 72 deletions
diff --git a/app/views/configure/archiving.phtml b/app/views/configure/archiving.phtml new file mode 100644 index 000000000..e4aacc7c6 --- /dev/null +++ b/app/views/configure/archiving.phtml @@ -0,0 +1,47 @@ +<?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->oldEntries(); ?>" /> <?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'); ?>(<?php echo Minz_Translate::t('by_default'); ?>)</label> + <div class="group-controls"> + <select class="number" name="keep_history_default" id="keep_history_default"><?php + foreach (array(-3 => '', 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->keepHistoryDefault() == $v ? '" selected="selected' : '') . '">' . $t . ' </option>'; + } + ?></select> + </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> + + <legend><?php echo Minz_Translate::t ('advanced'); ?></legend> + <div class="form-group"> + <label class="group-name"></label> + <div class="group-controls"> + <p><?php echo $this->nb_total; ?> <?php echo Minz_Translate::t('articles') ?>, <?php echo formatBytes($this->size_total); ?>.</p> + <p><a class="btn" href="<?php echo _url('entry', 'optimize'); ?>"> + <?php echo Minz_Translate::t('optimize_bdd'); ?> + </a></p> + <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('optimize_todo_sometimes'); ?> + </div> + </div> + </form> +</div> diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index fca533752..800181659 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -4,7 +4,7 @@ <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 Minz_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 Minz_Translate::t ('language'); ?></label> @@ -38,65 +38,6 @@ </div> </div> - <legend><?php echo Minz_Translate::t ('login_configuration'); ?></legend> - - <div class="form-group"> - <label class="group-name" for="mail_login"><?php echo Minz_Translate::t ('persona_connection_email'); ?></label> - <?php $mail = $this->conf->mailLogin (); ?> - <div class="group-controls"> - <input type="email" id="mail_login" name="mail_login" value="<?php echo $mail ? $mail : ''; ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" /> - <noscript><b><?php echo Minz_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 Minz_Translate::t ('allow_anonymous'); ?> - </label> - </div> - </div> - - <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 FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('explain_token', Minz_Url::display(null, 'html', true), $token); ?> - </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> - - <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->oldEntries (); ?>" /> <?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'); ?> (<?php echo Minz_Translate::t('by_default'); ?>)</label> - <div class="group-controls"> - <select class="number" name="keep_history_default" id="keep_history_default"><?php - foreach (array(-3 => '', 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->keepHistoryDefault() == $v ? '" selected="selected' : '') . '">' . $t . ' </option>'; - } - ?></select> - </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> - <legend><?php echo Minz_Translate::t ('reading_configuration'); ?></legend> <div class="form-group"> @@ -246,17 +187,5 @@ <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"></label> - <div class="group-controls"> - <p><?php echo $this->nb_total; ?> <?php echo Minz_Translate::t('articles') ?>, <?php echo formatBytes($this->size_total); ?>.</p> - <p><a class="btn" href="<?php echo _url('entry', 'optimize'); ?>"> - <?php echo Minz_Translate::t('optimize_bdd'); ?> - </a></p> - <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('optimize_todo_sometimes'); ?> - </div> - </div> </form> </div> diff --git a/app/views/configure/users.phtml b/app/views/configure/users.phtml new file mode 100644 index 000000000..a8e2deea1 --- /dev/null +++ b/app/views/configure/users.phtml @@ -0,0 +1,72 @@ +<?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', 'users'); ?>"> + <legend><?php echo Minz_Translate::t('users'); ?></legend> + + <div class="form-group"> + <label class="group-name" for="current_user">Current user</label> + <div class="group-controls"> + <input id="current_user" type="text" readonly="readonly" value="<?php echo Minz_Configuration::currentUser(); ?>" /> + <code>$_SERVER['REMOTE_USER'] = <?php echo isset($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'] : ''; ?></code> + </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="yes"<?php echo $this->conf->anonAccess() == 'yes' ? ' checked="checked"' : ''; ?> /> + <?php echo Minz_Translate::t('allow_anonymous'); ?> + </label> + </div> + </div> + + <div class="form-group"> + <label class="group-name" for="auth_type">Authentification method</label> + <div class="group-controls"> + <select id="auth_type" name="auth_type"> + <option value="none">None (dangerous)</option> + <option value="http_auth">HTTP Auth ($_SERVER['REMOTE_USER'])</option> + <option value="persona">Mozilla Persona</option> + </select> + (selector not implemented yet) + </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> + + <legend><?php echo Minz_Translate::t('login_configuration'); ?></legend> + + <div class="form-group"> + <label class="group-name" for="mail_login"><?php echo Minz_Translate::t('persona_connection_email'); ?></label> + <?php $mail = $this->conf->mailLogin(); ?> + <div class="group-controls"> + <input type="email" id="mail_login" name="mail_login" value="<?php echo $mail ? $mail : ''; ?>" placeholder="<?php echo Minz_Translate::t('blank_to_disable'); ?>" /> + <noscript><b><?php echo Minz_Translate::t('javascript_should_be_activated'); ?></b></noscript> + </div> + </div> + + <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 FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('explain_token', Minz_Url::display(null, 'html', true), $token); ?> + </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> |
