sharing.phtml 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php $this->partial('aside_configure'); ?>
  2. <div class="post">
  3. <a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('gen.action.back_to_rss_feeds'); ?></a>
  4. <form method="post" action="<?php echo _url('configure', 'sharing'); ?>"
  5. data-simple='<div class="form-group" id="group-share-##key##"><label class="group-name">##label##</label><div class="group-controls"><a href="#" class="remove btn btn-attention" data-remove="group-share-##key##"><?php echo _i('close'); ?></a>
  6. <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" /></div></div>'
  7. data-advanced='<div class="form-group" id="group-share-##key##"><label class="group-name">##label##</label><div class="group-controls">
  8. <input type="hidden" id="share_##key##_type" name="share[##key##][type]" value="##type##" />
  9. <div class="stick">
  10. <input type="text" id="share_##key##_name" name="share[##key##][name]" class="extend" value="" placeholder="<?php echo _t('conf.sharing.share_name'); ?>" size="64" />
  11. <input type="url" id="share_##key##_url" name="share[##key##][url]" class="extend" value="" placeholder="<?php echo _t('conf.sharing.share_url'); ?>" size="64" />
  12. <a href="#" class="remove btn btn-attention" data-remove="group-share-##key##"><?php echo _i('close'); ?></a></div>
  13. <a target="_blank" class="btn" title="<?php echo _t('conf.sharing.more_information'); ?>" href="##help##"><?php echo _i('help'); ?></a>
  14. </div></div>'>
  15. <legend><?php echo _t('conf.sharing'); ?></legend>
  16. <?php
  17. foreach (FreshRSS_Context::$user_conf->sharing as $key => $share_options) {
  18. $share = FreshRSS_Share::get($share_options['type']);
  19. $share->update($share_options);
  20. ?>
  21. <div class="form-group group-share" id="group-share-<?php echo $key; ?>">
  22. <label class="group-name">
  23. <?php echo $share->name(true); ?>
  24. </label>
  25. <div class="group-controls">
  26. <input type='hidden' id='share_<?php echo $key; ?>_type' name="share[<?php echo $key; ?>][type]" value='<?php echo $share->type(); ?>' />
  27. <?php if ($share->formType() === 'advanced') { ?>
  28. <div class="stick">
  29. <input type="text" id="share_<?php echo $key; ?>_name" name="share[<?php echo $key; ?>][name]" class="extend" value="<?php echo $share->name(); ?>" placeholder="<?php echo _t('conf.sharing.share_name'); ?>" size="64" />
  30. <input type="url" id="share_<?php echo $key; ?>_url" name="share[<?php echo $key; ?>][url]" class="extend" value="<?php echo $share->baseUrl(); ?>" placeholder="<?php echo _t('conf.sharing.share_url'); ?>" size="64" />
  31. <a href='#' class='remove btn btn-attention' data-remove="group-share-<?php echo $key; ?>"><?php echo _i('close'); ?></a>
  32. </div>
  33. <a target="_blank" class="btn" title="<?php echo _t('conf.sharing.more_information'); ?>" href="<?php echo $share->help(); ?>"><?php echo _i('help'); ?></a>
  34. <?php } else { ?>
  35. <a href='#' class='remove btn btn-attention' data-remove="group-share-<?php echo $key; ?>"><?php echo _i('close'); ?></a>
  36. <?php } ?>
  37. </div>
  38. </div>
  39. <?php } ?>
  40. <div class="form-group">
  41. <div class="group-controls">
  42. <select>
  43. <?php foreach (FreshRSS_Share::enum() as $share) { ?>
  44. <option value='<?php echo $share->type(); ?>' data-form='<?php echo $share->formType(); ?>' data-help='<?php echo $share->help(); ?>'>
  45. <?php echo $share->name(true); ?>
  46. </option>
  47. <?php } ?>
  48. </select>
  49. <a href='#' class='share add btn'><?php echo _i('add'); ?></a>
  50. </div>
  51. </div>
  52. <div class="form-group form-actions">
  53. <div class="group-controls">
  54. <button type="submit" class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button>
  55. <button type="reset" class="btn"><?php echo _t('gen.action.cancel'); ?></button>
  56. </div>
  57. </div>
  58. </form>
  59. </div>