diff options
| author | 2012-10-22 23:41:56 +0200 | |
|---|---|---|
| committer | 2012-10-22 23:41:56 +0200 | |
| commit | 9a95cb844e80512205c519da69ec373e046b7f52 (patch) | |
| tree | f153ffbf6952c925227581501ed25fcb94230801 /app/views | |
| parent | a928ebf1d010433d81d3afe5a6981f7ca391b9c7 (diff) | |
Début gestion import (non fonctionnel) / export (presque fonctionnel)
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/configure/display.phtml | 66 | ||||
| -rw-r--r-- | app/views/configure/importExport.phtml | 24 |
2 files changed, 56 insertions, 34 deletions
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index 5b25a51fc..a5bb085c4 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -1,34 +1,32 @@ -<div class="post"> - <form method="post" action=""> - <h1>Configuration de l'affichage</h1> - - <label for="posts_per_page">Nombre d'articles par page</label> - <input type="number" id="posts_per_page" name="posts_per_page" value="<?php echo $this->conf->postsPerPage (); ?>" /> - - <label>Vue par défaut</label> - <div class="radio_group"> - <input type="radio" name="default_view" id="radio_all" value="all"<?php echo $this->conf->defaultView () == 'all' ? ' checked="checked"' : ''; ?> /> - <label for="radio_all">Tout afficher</label> - <br /> - <input type="radio" name="default_view" id="radio_not_read" value="not_read"<?php echo $this->conf->defaultView () == 'not_read' ? ' checked="checked"' : ''; ?> /> - <label for="radio_not_read">Afficher les non lus</label> - </div> - - <label for="sort_order">Ordre de tri</label> - <select name="sort_order" id="sort_order"> - <option value="low_to_high"<?php echo $this->conf->sortOrder () == 'low_to_high' ? ' selected="selected"' : ''; ?>>Du plus récent au plus ancien</option> - <option value="high_to_low"<?php echo $this->conf->sortOrder () == 'high_to_low' ? ' selected="selected"' : ''; ?>>Du plus ancien au plus récent</option> - </select> - - <label>Afficher les articles dépliés par défaut</label> - <div class="radio_group"> - <input type="radio" name="display_posts" id="radio_yes" value="yes"<?php echo $this->conf->displayPosts () == 'yes' ? ' checked="checked"' : ''; ?> /> - <label for="radio_yes">Oui</label> - <br /> - <input type="radio" name="display_posts" id="radio_no" value="no"<?php echo $this->conf->displayPosts () == 'no' ? ' checked="checked"' : ''; ?> /> - <label for="radio_no">Non<noscript> - <strong>nécessite que javascript soit activé</strong></noscript></label> - </div> - - <input type="submit" value="Valider" /> - </form> -</div> +<form method="post" action=""> + <h1>Configuration de l'affichage</h1> + + <label for="posts_per_page">Nombre d'articles par page</label> + <input type="number" id="posts_per_page" name="posts_per_page" value="<?php echo $this->conf->postsPerPage (); ?>" /> + + <label>Vue par défaut</label> + <div class="radio_group"> + <input type="radio" name="default_view" id="radio_all" value="all"<?php echo $this->conf->defaultView () == 'all' ? ' checked="checked"' : ''; ?> /> + <label for="radio_all">Tout afficher</label> + <br /> + <input type="radio" name="default_view" id="radio_not_read" value="not_read"<?php echo $this->conf->defaultView () == 'not_read' ? ' checked="checked"' : ''; ?> /> + <label for="radio_not_read">Afficher les non lus</label> + </div> + + <label for="sort_order">Ordre de tri</label> + <select name="sort_order" id="sort_order"> + <option value="low_to_high"<?php echo $this->conf->sortOrder () == 'low_to_high' ? ' selected="selected"' : ''; ?>>Du plus récent au plus ancien</option> + <option value="high_to_low"<?php echo $this->conf->sortOrder () == 'high_to_low' ? ' selected="selected"' : ''; ?>>Du plus ancien au plus récent</option> + </select> + + <label>Afficher les articles dépliés par défaut</label> + <div class="radio_group"> + <input type="radio" name="display_posts" id="radio_yes" value="yes"<?php echo $this->conf->displayPosts () == 'yes' ? ' checked="checked"' : ''; ?> /> + <label for="radio_yes">Oui</label> + <br /> + <input type="radio" name="display_posts" id="radio_no" value="no"<?php echo $this->conf->displayPosts () == 'no' ? ' checked="checked"' : ''; ?> /> + <label for="radio_no">Non<noscript> - <strong>nécessite que javascript soit activé</strong></noscript></label> + </div> + + <input type="submit" value="Valider" /> +</form> diff --git a/app/views/configure/importExport.phtml b/app/views/configure/importExport.phtml new file mode 100644 index 000000000..634800157 --- /dev/null +++ b/app/views/configure/importExport.phtml @@ -0,0 +1,24 @@ +<?php if ($this->req == 'export') { ?> +<?xml version="1.0" encoding="UTF-8" ?> +<!-- Generated by <?php echo Configuration::title (); ?> --> +<opml version="2.0"> + <head> + <title><?php echo Configuration::title (); ?> OPML Feed</title> + <dateCreated><?php echo date('D, d M Y H:i:s'); ?></dateCreated> + </head> + <body> +<?php echo opml_export ($this->feeds); ?> + </body> +</opml> +<?php } else { ?> + +<form method="post" action="" enctype="multipart/form-data"> + <h1>Exporter au format OPML</h1> + <a class="button" href="<?php echo Url::display (array ('c' => 'configure', 'a' => 'importExport', 'params' => array ('q' => 'export'))); ?>">Exporter</a> + + <h1>Importer au format OPML</h1> + <label for="file">Fichier</label> + <input type="file" name="file" id="file" /> + <input type="submit" value="Charger" /> +</form> +<?php } ?> |
