feed.phtml 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. <div class="form-group">
  52. <label class="group-name" for="priority"><?php echo Minz_Translate::t ('show_in_all_flux'); ?></label>
  53. <div class="group-controls">
  54. <label class="checkbox" for="priority">
  55. <input type="checkbox" name="priority" id="priority" value="10"<?php echo $this->flux->priority () > 0 ? ' checked="checked"' : ''; ?> />
  56. <?php echo Minz_Translate::t ('yes'); ?>
  57. </label>
  58. </div>
  59. </div>
  60. <div class="form-group form-actions">
  61. <div class="group-controls">
  62. <button class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
  63. <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>
  64. </div>
  65. </div>
  66. <legend><?php echo Minz_Translate::t ('archiving_configuration'); ?></legend>
  67. <div class="form-group">
  68. <label class="group-name"></label>
  69. <div class="group-controls">
  70. <a class="btn" href="<?php echo _url ('feed', 'actualize', 'id', $this->flux->id ()); ?>">
  71. <?php echo FreshRSS_Themes::icon('refresh'); ?> <?php echo Minz_Translate::t('actualize'); ?>
  72. </a>
  73. </div>
  74. </div>
  75. <div class="form-group">
  76. <label class="group-name"><?php echo Minz_Translate::t ('number_articles'); ?></label>
  77. <div class="group-controls">
  78. <span class="control"><?php echo $this->flux->nbEntries (); ?></span>
  79. </div>
  80. </div>
  81. <div class="form-group">
  82. <label class="group-name" for="keep_history"><?php echo Minz_Translate::t ('keep_history'); ?></label>
  83. <div class="group-controls">
  84. <select class="number" name="keep_history" id="keep_history"><?php
  85. foreach (array(-3 => '', -2 => Minz_Translate::t('by_default'), 0 => '0', 10 => '10', 50 => '50', 100 => '100', 500 => '500', 1000 => '1 000', 5000 => '5 000', 10000 => '10 000', -1 => '∞') as $v => $t) {
  86. echo '<option value="' . $v . ($this->flux->keepHistory() === $v ? '" selected="selected' : '') . '">' . $t . '</option>';
  87. }
  88. ?></select>
  89. </div>
  90. </div>
  91. <div class="form-group form-actions">
  92. <div class="group-controls">
  93. <button class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
  94. <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>
  95. </div>
  96. </div>
  97. <legend><?php echo Minz_Translate::t ('login_configuration'); ?></legend>
  98. <?php $auth = $this->flux->httpAuth (false); ?>
  99. <div class="form-group">
  100. <label class="group-name" for="http_user"><?php echo Minz_Translate::t ('http_username'); ?></label>
  101. <div class="group-controls">
  102. <input type="text" name="http_user" id="http_user" value="<?php echo $auth['username']; ?>" autocomplete="off" />
  103. <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('access_protected_feeds'); ?>
  104. </div>
  105. <label class="group-name" for="http_pass"><?php echo Minz_Translate::t ('http_password'); ?></label>
  106. <div class="group-controls">
  107. <input type="password" name="http_pass" id="http_pass" value="<?php echo $auth['password']; ?>" autocomplete="off" />
  108. </div>
  109. </div>
  110. <div class="form-group form-actions">
  111. <div class="group-controls">
  112. <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
  113. <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
  114. </div>
  115. </div>
  116. <legend><?php echo Minz_Translate::t ('advanced'); ?></legend>
  117. <div class="form-group">
  118. <label class="group-name" for="path_entries"><?php echo Minz_Translate::t ('css_path_on_website'); ?></label>
  119. <div class="group-controls">
  120. <input type="text" name="path_entries" id="path_entries" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" />
  121. <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('retrieve_truncated_feeds'); ?>
  122. </div>
  123. </div>
  124. <div class="form-group form-actions">
  125. <div class="group-controls">
  126. <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
  127. <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
  128. </div>
  129. </div>
  130. </form>
  131. </div>
  132. <?php } else { ?>
  133. <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>
  134. <?php } ?>