feed.phtml 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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 ('website_url'); ?></label>
  20. <div class="group-controls">
  21. <span class="control"><a target="_blank" href="<?php echo $this->flux->website (); ?>"><?php echo $this->flux->website (); ?></a></span>
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <label class="group-name"><?php echo Translate::t ('feed_url'); ?></label>
  26. <div class="group-controls">
  27. <span class="control"><a target="_blank" href="<?php echo $this->flux->url (); ?>"><?php echo $this->flux->url (); ?></a></span>
  28. </div>
  29. </div>
  30. <div class="form-group">
  31. <label class="group-name"></label>
  32. <div class="group-controls">
  33. <a class="btn" href="<?php echo _url ('feed', 'actualize', 'id', $this->flux->id ()); ?>">
  34. <i class="icon i_refresh"></i> <?php echo Translate::t('actualize'); ?>
  35. </a>
  36. </div>
  37. </div>
  38. <div class="form-group">
  39. <label class="group-name"><?php echo Translate::t ('number_articles'); ?></label>
  40. <div class="group-controls">
  41. <span class="control"><?php echo $this->flux->nbEntries (); ?></span>
  42. <label class="checkbox" for="keep_history">
  43. <input type="checkbox" name="keep_history" id="keep_history" value="yes"<?php echo $this->flux->keepHistory () == 'yes' ? ' checked="checked"' : ''; ?> />
  44. <?php echo Translate::t ('keep_history'); ?>
  45. </label>
  46. </div>
  47. </div>
  48. <div class="form-group">
  49. <label class="group-name" for="category"><?php echo Translate::t ('category'); ?></label>
  50. <div class="group-controls">
  51. <select name="category" id="category">
  52. <?php foreach ($this->categories as $cat) { ?>
  53. <option value="<?php echo $cat->id (); ?>"<?php echo $cat->id ()== $this->flux->category () ? ' selected="selected"' : ''; ?>>
  54. <?php echo $cat->name (); ?>
  55. </option>
  56. <?php } ?>
  57. </select>
  58. <a href="<?php echo _url ('configure', 'categorize'); ?>"><?php echo Translate::t ('categories_management'); ?></a>
  59. </div>
  60. </div>
  61. <legend><?php echo Translate::t ('advanced'); ?></legend>
  62. <div class="form-group">
  63. <label class="group-name" for="priority"><?php echo Translate::t ('show_in_all_flux'); ?></label>
  64. <div class="group-controls">
  65. <label class="checkbox" for="priority">
  66. <input type="checkbox" name="priority" id="priority" value="10"<?php echo $this->flux->priority () > 0 ? ' checked="checked"' : ''; ?> />
  67. <?php echo Translate::t ('yes'); ?>
  68. </label>
  69. </div>
  70. </div>
  71. <div class="form-group">
  72. <label class="group-name" for="path_entries"><?php echo Translate::t ('css_path_on_website'); ?></label>
  73. <div class="group-controls">
  74. <input type="text" name="path_entries" id="path_entries" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Translate::t ('blank_to_disable'); ?>" />
  75. <i class="icon i_help"></i> <?php echo Translate::t ('retrieve_truncated_feeds'); ?>
  76. </div>
  77. </div>
  78. <?php $auth = $this->flux->httpAuth (false); ?>
  79. <div class="form-group">
  80. <label class="group-name" for="http_user"><?php echo Translate::t ('http_username'); ?></label>
  81. <div class="group-controls">
  82. <input type="text" name="http_user" id="http_user" value="<?php echo $auth['username']; ?>" />
  83. <i class="icon i_help"></i> <?php echo Translate::t ('access_protected_feeds'); ?>
  84. </div>
  85. <label class="group-name" for="http_pass"><?php echo Translate::t ('http_password'); ?></label>
  86. <div class="group-controls">
  87. <input type="password" name="http_pass" id="http_pass" value="<?php echo $auth['password']; ?>" />
  88. </div>
  89. </div>
  90. <div class="form-group form-actions">
  91. <div class="group-controls">
  92. <button class="btn btn-important"><?php echo Translate::t ('save'); ?></button>
  93. <button class="btn btn-attention" formaction="<?php echo Url::display (array ('c' => 'feed', 'a' => 'delete', 'params' => array ('id' => $this->flux->id ()))); ?>"><?php echo Translate::t ('delete'); ?></button>
  94. </div>
  95. </div>
  96. </form>
  97. </div>
  98. <?php } else { ?>
  99. <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>
  100. <?php } ?>