display.phtml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <?php $this->partial('aside_configure'); ?>
  2. <div class="post">
  3. <div class="link-back-wrapper">
  4. <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
  5. </div>
  6. <form method="post" action="<?= _url('configure', 'display') ?>">
  7. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  8. <legend><?= _t('conf.display') ?></legend>
  9. <div class="form-group">
  10. <label class="group-name" for="language"><?= _t('conf.display.language') ?></label>
  11. <div class="group-controls">
  12. <select name="language" id="language" data-leave-validation="<?= FreshRSS_Context::$user_conf->language ?>">
  13. <?php $languages = Minz_Translate::availableLanguages(); ?>
  14. <?php foreach ($languages as $lang) { ?>
  15. <option value="<?= $lang ?>"<?= FreshRSS_Context::$user_conf->language === $lang ? ' selected="selected"' : '' ?>><?= _t('gen.lang.' . $lang) ?></option>
  16. <?php } ?>
  17. </select>
  18. </div>
  19. </div>
  20. <div class="form-group">
  21. <label class="group-name" for="theme"><?= _t('conf.display.theme') ?></label>
  22. <div class="group-controls">
  23. <ul class="slides">
  24. <?php $slides = count($this->themes); $i = 1; ?>
  25. <?php foreach($this->themes as $theme) { ?>
  26. <input type="radio" name="theme" id="img-<?= $i ?>" <?=
  27. FreshRSS_Context::$user_conf->theme === $theme['id'] ? 'checked="checked"' : '' ?> value="<?= $theme['id'] ?>"
  28. data-leave-validation="<?= (FreshRSS_Context::$user_conf->theme === $theme['id']) ? 1 : 0 ?>"/>
  29. <li class="slide-container">
  30. <div class="slide">
  31. <img src="<?= Minz_Url::display('/themes/' . $theme['id'] . '/thumbs/original.png') ?>"/>
  32. </div>
  33. <div class="nav">
  34. <?php if ($i !== 1) {?>
  35. <label for="img-<?= $i - 1 ?>" class="prev">&#x2039;</label>
  36. <?php } ?>
  37. <?php if ($i !== $slides) {?>
  38. <label for="img-<?= $i + 1 ?>" class="next">&#x203a;</label>
  39. <?php } ?>
  40. </div>
  41. <div class="properties">
  42. <div><?= sprintf('%s — %s %s', $theme['name'], _t('gen.short.by_author'), $theme['author']) ?></div>
  43. <div><?= $theme['description'] ?></div>
  44. <div class="page-number"><?= sprintf('%d/%d', $i, $slides) ?></div>
  45. </div>
  46. </li>
  47. <?php $i++ ?>
  48. <?php } ?>
  49. </ul>
  50. </div>
  51. </div>
  52. <?php $width = FreshRSS_Context::$user_conf->content_width; ?>
  53. <div class="form-group">
  54. <label class="group-name" for="content_width"><?= _t('conf.display.width.content') ?></label>
  55. <div class="group-controls">
  56. <select name="content_width" id="content_width" required="" data-leave-validation="<?= $width ?>">
  57. <option value="thin" <?= $width === 'thin' ? 'selected="selected"' : '' ?>>
  58. <?= _t('conf.display.width.thin') ?>
  59. </option>
  60. <option value="medium" <?= $width === 'medium' ? 'selected="selected"' : '' ?>>
  61. <?= _t('conf.display.width.medium') ?>
  62. </option>
  63. <option value="large" <?= $width === 'large' ? 'selected="selected"' : '' ?>>
  64. <?= _t('conf.display.width.large') ?>
  65. </option>
  66. <option value="no_limit" <?= $width === 'no_limit' ? 'selected="selected"' : '' ?>>
  67. <?= _t('conf.display.width.no_limit') ?>
  68. </option>
  69. </select>
  70. </div>
  71. </div>
  72. <div class="form-group">
  73. <label class="group-name"><?= _t('conf.display.icon.entry') ?></label>
  74. <div class="group-controls">
  75. <table class="config-articleicons">
  76. <thead>
  77. <tr>
  78. <th> </th>
  79. <th title="<?= _t('gen.action.mark_read') ?>"><?= _i('read') ?></th>
  80. <th title="<?= _t('gen.action.mark_favorite') ?>"><?= _i('bookmark') ?></th>
  81. <th><?= _t('conf.display.icon.related_tags') ?></th>
  82. <th><?= _t('conf.display.icon.sharing') ?></th>
  83. <th><?= _t('conf.display.icon.display_authors') ?></th>
  84. <th><?= _t('conf.display.icon.publication_date') ?></th>
  85. <th><?= _i('link') ?></th>
  86. </tr>
  87. </thead>
  88. <tbody>
  89. <tr>
  90. <th><?= _t('conf.display.icon.top_line') ?></th>
  91. <td><input type="checkbox" name="topline_read" value="1"<?=
  92. FreshRSS_Context::$user_conf->topline_read ? ' checked="checked"' : '' ?>
  93. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_read ?>"/></td>
  94. <td><input type="checkbox" name="topline_favorite" value="1"<?=
  95. FreshRSS_Context::$user_conf->topline_favorite ? ' checked="checked"' : '' ?>
  96. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_favorite ?>"/></td>
  97. <td><input type="checkbox" disabled="disabled" /></td>
  98. <td><input type="checkbox" disabled="disabled" /></td>
  99. <td><input type="checkbox" name="topline_display_authors" value="1"<?=
  100. FreshRSS_Context::$user_conf->topline_display_authors ? ' checked="checked"' : '' ?>
  101. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_display_authors ?>"/></td>
  102. <td><input type="checkbox" name="topline_date" value="1"<?=
  103. FreshRSS_Context::$user_conf->topline_date ? ' checked="checked"' : '' ?>
  104. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_date ?>"/></td>
  105. <td><input type="checkbox" name="topline_link" value="1"<?= FreshRSS_Context::$user_conf->topline_link ? ' checked="checked"' : '' ?>
  106. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_link ?>"/></td>
  107. </tr><tr>
  108. <th><?= _t('conf.display.icon.bottom_line') ?></th>
  109. <td><input type="checkbox" name="bottomline_read" value="1"<?=
  110. FreshRSS_Context::$user_conf->bottomline_read ? ' checked="checked"' : '' ?>
  111. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_read ?>"/></td>
  112. <td><input type="checkbox" name="bottomline_favorite" value="1"<?=
  113. FreshRSS_Context::$user_conf->bottomline_favorite ? ' checked="checked"' : '' ?>
  114. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_favorite ?>"/></td>
  115. <td><input type="checkbox" name="bottomline_tags" value="1"<?=
  116. FreshRSS_Context::$user_conf->bottomline_tags ? ' checked="checked"' : '' ?>
  117. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_tags ?>"/></td>
  118. <td><input type="checkbox" name="bottomline_sharing" value="1"<?=
  119. FreshRSS_Context::$user_conf->bottomline_sharing ? ' checked="checked"' : '' ?>
  120. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_sharing ?>"/></td>
  121. <td><input type="checkbox" disabled="disabled" /></td>
  122. <td><input type="checkbox" name="bottomline_date" value="1"<?=
  123. FreshRSS_Context::$user_conf->bottomline_date ? ' checked="checked"' : '' ?>
  124. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_date ?>"/></td>
  125. <td><input type="checkbox" name="bottomline_link" value="1"<?=
  126. FreshRSS_Context::$user_conf->bottomline_link ? ' checked="checked"' : '' ?>
  127. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_link ?>"/></td>
  128. </tr>
  129. </tbody>
  130. </table>
  131. </div>
  132. </div>
  133. <div class="form-group">
  134. <label class="group-name" for="html5_notif_timeout"><?= _t('conf.display.notif_html5.timeout') ?></label>
  135. <div class="group-controls">
  136. <input type="number" id="html5_notif_timeout" name="html5_notif_timeout" value="<?=
  137. FreshRSS_Context::$user_conf->html5_notif_timeout ?>"
  138. data-leave-validation="<?= FreshRSS_Context::$user_conf->html5_notif_timeout ?>"/> <?= _t('conf.display.notif_html5.seconds') ?>
  139. </div>
  140. </div>
  141. <div class="form-group">
  142. <div class="group-controls">
  143. <label class="checkbox" for="show_nav_buttons">
  144. <input type="checkbox" name="show_nav_buttons" id="show_nav_buttons" value="1"<?=
  145. FreshRSS_Context::$user_conf->show_nav_buttons ? ' checked="checked"' : '' ?>
  146. data-leave-validation="<?= FreshRSS_Context::$user_conf->show_nav_buttons ?>"/>
  147. <?= _t('conf.display.show_nav_buttons') ?>
  148. </label>
  149. </div>
  150. </div>
  151. <div class="form-group form-actions">
  152. <div class="group-controls">
  153. <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
  154. <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
  155. </div>
  156. </div>
  157. </form>
  158. </div>