feed.phtml 5.3 KB

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