feed.phtml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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 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>
  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 Minz_Translate::t ('damn'); ?></span> <?php echo Minz_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 Minz_Translate::t ('informations'); ?></legend>
  12. <div class="form-group">
  13. <label class="group-name" for="name"><?php echo Minz_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 Minz_Translate::t ('feed_description'); ?></label>
  20. <div class="group-controls">
  21. <textarea name="description" id="description"><?php echo htmlspecialchars($this->flux->description(), ENT_NOQUOTES, 'UTF-8'); ?></textarea>
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <label class="group-name"><?php echo Minz_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 (); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
  29. </div>
  30. </div>
  31. <div class="form-group">
  32. <label class="group-name"><?php echo Minz_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 (); ?>"><?php echo FreshRSS_Themes::icon('link'); ?></a>
  36.   <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>
  37. </div>
  38. </div>
  39. <div class="form-group">
  40. <label class="group-name" for="category"><?php echo Minz_Translate::t ('category'); ?></label>
  41. <div class="group-controls">
  42. <select name="category" id="category">
  43. <?php foreach ($this->categories as $cat) { ?>
  44. <option value="<?php echo $cat->id (); ?>"<?php echo $cat->id ()== $this->flux->category () ? ' selected="selected"' : ''; ?>>
  45. <?php echo $cat->name (); ?>
  46. </option>
  47. <?php } ?>
  48. </select>
  49. </div>
  50. </div>
  51. <legend><?php echo Minz_Translate::t ('archiving_configuration'); ?></legend>
  52. <div class="form-group">
  53. <label class="group-name"></label>
  54. <div class="group-controls">
  55. <a class="btn" href="<?php echo _url ('feed', 'actualize', 'id', $this->flux->id ()); ?>">
  56. <?php echo FreshRSS_Themes::icon('refresh'); ?> <?php echo Minz_Translate::t('actualize'); ?>
  57. </a>
  58. </div>
  59. </div>
  60. <div class="form-group">
  61. <label class="group-name"><?php echo Minz_Translate::t ('number_articles'); ?></label>
  62. <div class="group-controls">
  63. <span class="control"><?php echo $this->flux->nbEntries (); ?></span>
  64. </div>
  65. </div>
  66. <div class="form-group">
  67. <label class="group-name" for="keep_history"><?php echo Minz_Translate::t ('keep_history'); ?></label>
  68. <div class="group-controls">
  69. <input type="number" name="keep_history" id="keep_history" list="old_values" min="-1" max="1000000" value="<?php echo $this->flux->keepHistory(); ?>" />
  70. <datalist id="old_values">
  71. <option value="0">0</option>
  72. <option value="10">10</option>
  73. <option value="100">100</option>
  74. <option value="1000">1 000</option>
  75. <option value="10000">10 000</option>
  76. <option value="-1">∞</option>
  77. </datalist>
  78. <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('keep_history_help'); ?>
  79. </div>
  80. </div>
  81. <div class="form-group">
  82. <label class="group-name"></label>
  83. <div class="group-controls">
  84. <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>
  85. </div>
  86. </div>
  87. <legend><?php echo Minz_Translate::t ('advanced'); ?></legend>
  88. <div class="form-group">
  89. <label class="group-name" for="priority"><?php echo Minz_Translate::t ('show_in_all_flux'); ?></label>
  90. <div class="group-controls">
  91. <label class="checkbox" for="priority">
  92. <input type="checkbox" name="priority" id="priority" value="10"<?php echo $this->flux->priority () > 0 ? ' checked="checked"' : ''; ?> />
  93. <?php echo Minz_Translate::t ('yes'); ?>
  94. </label>
  95. </div>
  96. </div>
  97. <div class="form-group">
  98. <label class="group-name" for="path_entries"><?php echo Minz_Translate::t ('css_path_on_website'); ?></label>
  99. <div class="group-controls">
  100. <input type="text" name="path_entries" id="path_entries" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" />
  101. <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('retrieve_truncated_feeds'); ?>
  102. </div>
  103. </div>
  104. <?php $auth = $this->flux->httpAuth (false); ?>
  105. <div class="form-group">
  106. <label class="group-name" for="http_user"><?php echo Minz_Translate::t ('http_username'); ?></label>
  107. <div class="group-controls">
  108. <input type="text" name="http_user" id="http_user" value="<?php echo $auth['username']; ?>" autocomplete="off" />
  109. <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('access_protected_feeds'); ?>
  110. </div>
  111. <label class="group-name" for="http_pass"><?php echo Minz_Translate::t ('http_password'); ?></label>
  112. <div class="group-controls">
  113. <input type="password" name="http_pass" id="http_pass" value="<?php echo $auth['password']; ?>" autocomplete="off" />
  114. </div>
  115. </div>
  116. <div class="form-group form-actions">
  117. <div class="group-controls">
  118. <button class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
  119. <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>
  120. </div>
  121. </div>
  122. </form>
  123. </div>
  124. <?php } else { ?>
  125. <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>
  126. <?php } ?>