feed.phtml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php $this->partial ('aside_feed'); ?>
  2. <?php if ($this->flux) { ?>
  3. <div class="post">
  4. <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>
  5. <h1><?php echo $this->flux->name (); ?></h1>
  6. <?php echo $this->flux->description (); ?>
  7. <?php if ($this->flux->inError ()) { ?>
  8. <p class="alert alert-error"><span class="alert-head"><?php echo Translate::t ('damn'); ?></span> <?php echo Translate::t ('feed_in_error'); ?></p>
  9. <?php } ?>
  10. <form method="post" action="<?php echo _url ('configure', 'feed', 'id', $this->flux->id ()); ?>">
  11. <legend><?php echo Translate::t ('informations'); ?></legend>
  12. <div class="form-group">
  13. <label class="group-name" for="name"><?php echo Translate::t ('title'); ?></label>
  14. <div class="group-controls">
  15. <input type="text" name="name" id="name" value="<?php echo $this->flux->name () ; ?>" />
  16. </div>
  17. </div>
  18. <div class="form-group">
  19. <label class="group-name"><?php echo Translate::t ('feed_description'); ?></label>
  20. <div class="group-controls">
  21. <textarea name="description" id="description"><?php echo $this->flux->description (); ?></textarea>
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <label class="group-name"><?php echo Translate::t ('website_url'); ?></label>
  26. <div class="group-controls">
  27. <input type="text" name="website" id="website" value="<?php echo $this->flux->website (); ?>" />
  28. <a target="_blank" href="<?php echo $this->flux->website (); ?>"><i class="icon i_link">↗</i></a>
  29. </div>
  30. </div>
  31. <div class="form-group">
  32. <label class="group-name"><?php echo Translate::t ('feed_url'); ?></label>
  33. <div class="group-controls">
  34. <input type="text" name="url" id="url" value="<?php echo $this->flux->url (); ?>" />
  35. <a target="_blank" href="<?php echo $this->flux->url (); ?>"><i class="icon i_link">↗</i></a>
  36. </div>
  37. </div>
  38. <div class="form-group">
  39. <label class="group-name"></label>
  40. <div class="group-controls">
  41. <a class="btn" href="<?php echo _url ('feed', 'actualize', 'id', $this->flux->id ()); ?>">
  42. <i class="icon i_refresh">↻</i> <?php echo Translate::t('actualize'); ?>
  43. </a>
  44. </div>
  45. </div>
  46. <div class="form-group">
  47. <label class="group-name"><?php echo Translate::t ('number_articles'); ?></label>
  48. <div class="group-controls">
  49. <span class="control"><?php echo $this->flux->nbEntries (); ?></span>
  50. <label class="checkbox" for="keep_history">
  51. <input type="checkbox" name="keep_history" id="keep_history" value="yes"<?php echo $this->flux->keepHistory () == 'yes' ? ' checked="checked"' : ''; ?> />
  52. <?php echo Translate::t ('keep_history'); ?>
  53. </label>
  54. </div>
  55. </div>
  56. <div class="form-group">
  57. <label class="group-name" for="category"><?php echo Translate::t ('category'); ?></label>
  58. <div class="group-controls">
  59. <select name="category" id="category">
  60. <?php foreach ($this->categories as $cat) { ?>
  61. <option value="<?php echo $cat->id (); ?>"<?php echo $cat->id ()== $this->flux->category () ? ' selected="selected"' : ''; ?>>
  62. <?php echo $cat->name (); ?>
  63. </option>
  64. <?php } ?>
  65. </select>
  66. </div>
  67. </div>
  68. <legend><?php echo Translate::t ('advanced'); ?></legend>
  69. <div class="form-group">
  70. <label class="group-name" for="priority"><?php echo Translate::t ('show_in_all_flux'); ?></label>
  71. <div class="group-controls">
  72. <label class="checkbox" for="priority">
  73. <input type="checkbox" name="priority" id="priority" value="10"<?php echo $this->flux->priority () > 0 ? ' checked="checked"' : ''; ?> />
  74. <?php echo Translate::t ('yes'); ?>
  75. </label>
  76. </div>
  77. </div>
  78. <div class="form-group">
  79. <label class="group-name" for="path_entries"><?php echo Translate::t ('css_path_on_website'); ?></label>
  80. <div class="group-controls">
  81. <input type="text" name="path_entries" id="path_entries" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Translate::t ('blank_to_disable'); ?>" />
  82. <i class="icon i_help">ⓘ</i> <?php echo Translate::t ('retrieve_truncated_feeds'); ?>
  83. </div>
  84. </div>
  85. <?php $auth = $this->flux->httpAuth (false); ?>
  86. <div class="form-group">
  87. <label class="group-name" for="http_user"><?php echo Translate::t ('http_username'); ?></label>
  88. <div class="group-controls">
  89. <input type="text" name="http_user" id="http_user" value="<?php echo $auth['username']; ?>" autocomplete="off" />
  90. <i class="icon i_help">ⓘ</i> <?php echo Translate::t ('access_protected_feeds'); ?>
  91. </div>
  92. <label class="group-name" for="http_pass"><?php echo Translate::t ('http_password'); ?></label>
  93. <div class="group-controls">
  94. <input type="password" name="http_pass" id="http_pass" value="<?php echo $auth['password']; ?>" autocomplete="off" />
  95. </div>
  96. </div>
  97. <div class="form-group form-actions">
  98. <div class="group-controls">
  99. <button class="btn btn-important"><?php echo Translate::t ('save'); ?></button>
  100. <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>
  101. </div>
  102. </div>
  103. </form>
  104. </div>
  105. <?php } else { ?>
  106. <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>
  107. <?php } ?>