feed.phtml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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 $this->flux->description (); ?></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"></label>
  53. <div class="group-controls">
  54. <a class="btn" href="<?php echo _url ('feed', 'actualize', 'id', $this->flux->id ()); ?>">
  55. <?php echo FreshRSS_Themes::icon('refresh'); ?> <?php echo Minz_Translate::t('actualize'); ?>
  56. </a>
  57. </div>
  58. </div>
  59. <div class="form-group">
  60. <label class="group-name"><?php echo Minz_Translate::t ('number_articles'); ?></label>
  61. <div class="group-controls">
  62. <span class="control"><?php echo $this->flux->nbEntries (); ?></span>
  63. <label class="checkbox" for="keep_history">
  64. <input type="checkbox" name="keep_history" id="keep_history" value="yes"<?php echo $this->flux->keepHistory () == 'yes' ? ' checked="checked"' : ''; ?> />
  65. <?php echo Minz_Translate::t ('keep_history'); ?>
  66. </label>
  67. </div>
  68. </div>
  69. <div class="form-group">
  70. <label class="group-name"></label>
  71. <div class="group-controls">
  72. <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>
  73. </div>
  74. </div>
  75. <legend><?php echo Minz_Translate::t ('advanced'); ?></legend>
  76. <div class="form-group">
  77. <label class="group-name" for="priority"><?php echo Minz_Translate::t ('show_in_all_flux'); ?></label>
  78. <div class="group-controls">
  79. <label class="checkbox" for="priority">
  80. <input type="checkbox" name="priority" id="priority" value="10"<?php echo $this->flux->priority () > 0 ? ' checked="checked"' : ''; ?> />
  81. <?php echo Minz_Translate::t ('yes'); ?>
  82. </label>
  83. </div>
  84. </div>
  85. <div class="form-group">
  86. <label class="group-name" for="path_entries"><?php echo Minz_Translate::t ('css_path_on_website'); ?></label>
  87. <div class="group-controls">
  88. <input type="text" name="path_entries" id="path_entries" value="<?php echo $this->flux->pathEntries (); ?>" placeholder="<?php echo Minz_Translate::t ('blank_to_disable'); ?>" />
  89. <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('retrieve_truncated_feeds'); ?>
  90. </div>
  91. </div>
  92. <?php $auth = $this->flux->httpAuth (false); ?>
  93. <div class="form-group">
  94. <label class="group-name" for="http_user"><?php echo Minz_Translate::t ('http_username'); ?></label>
  95. <div class="group-controls">
  96. <input type="text" name="http_user" id="http_user" value="<?php echo $auth['username']; ?>" autocomplete="off" />
  97. <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('access_protected_feeds'); ?>
  98. </div>
  99. <label class="group-name" for="http_pass"><?php echo Minz_Translate::t ('http_password'); ?></label>
  100. <div class="group-controls">
  101. <input type="password" name="http_pass" id="http_pass" value="<?php echo $auth['password']; ?>" autocomplete="off" />
  102. </div>
  103. </div>
  104. <div class="form-group form-actions">
  105. <div class="group-controls">
  106. <button class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
  107. <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>
  108. </div>
  109. </div>
  110. </form>
  111. </div>
  112. <?php } else { ?>
  113. <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>
  114. <?php } ?>