display.phtml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <?php $this->partial('aside_configure'); ?>
  2. <main 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. <h1><?= _t('conf.display') ?></h1>
  7. <form method="post" action="<?= _url('configure', 'display') ?>">
  8. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  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; $themeAvailable = false; ?>
  25. <?php foreach($this->themes as $theme) { ?>
  26. <?php if (FreshRSS_Context::$user_conf->theme === $theme['id']) {
  27. $checked = 'checked="checked"';
  28. $themeAvailable = true;
  29. } else {
  30. $checked = '';
  31. } ?>
  32. <input type="radio" name="theme" id="img-<?= $i ?>" <?= $checked ?> value="<?= $theme['id'] ?>"
  33. data-leave-validation="<?= (FreshRSS_Context::$user_conf->theme === $theme['id']) ? 1 : 0 ?>" />
  34. <li class="slide-container">
  35. <div class="slide">
  36. <img src="<?= Minz_Url::display('/themes/' . $theme['id'] . '/thumbs/original.png') ?>" />
  37. </div>
  38. <div class="nav">
  39. <?php if ($i !== 1) {?>
  40. <label for="img-<?= $i - 1 ?>" class="prev">‹</label>
  41. <?php } ?>
  42. <?php if ($i !== $slides) {?>
  43. <label for="img-<?= $i + 1 ?>" class="next">›</label>
  44. <?php } ?>
  45. </div>
  46. <div class="properties">
  47. <div><?= sprintf('%s — %s %s', $theme['name'], _t('gen.short.by_author'), $theme['author']) ?></div>
  48. <div><?= $theme['description'] ?></div>
  49. <div class="page-number"><?= sprintf('%d/%d', $i, $slides) ?></div>
  50. </div>
  51. </li>
  52. <?php $i++ ?>
  53. <?php } ?>
  54. <?php if (!$themeAvailable) {?>
  55. <input type="radio" name="theme" checked="checked" value="Origine" data-leave-validation="0" />
  56. <li class="slide-container">
  57. <div class="slide">
  58. </div>
  59. <div class="nav">
  60. <label for="img-<?= $i - 1 ?>" class="prev">‹</label>
  61. </div>
  62. <div class="properties alert-error">
  63. <div><?= _t('conf.display.theme_not_available', FreshRSS_Context::$user_conf->theme)?></div>
  64. </div>
  65. </li>
  66. <?php }?>
  67. </ul>
  68. </div>
  69. </div>
  70. <?php $width = FreshRSS_Context::$user_conf->content_width; ?>
  71. <div class="form-group">
  72. <label class="group-name" for="content_width"><?= _t('conf.display.width.content') ?></label>
  73. <div class="group-controls">
  74. <select name="content_width" id="content_width" required="" data-leave-validation="<?= $width ?>">
  75. <option value="thin" <?= $width === 'thin' ? 'selected="selected"' : '' ?>>
  76. <?= _t('conf.display.width.thin') ?>
  77. </option>
  78. <option value="medium" <?= $width === 'medium' ? 'selected="selected"' : '' ?>>
  79. <?= _t('conf.display.width.medium') ?>
  80. </option>
  81. <option value="large" <?= $width === 'large' ? 'selected="selected"' : '' ?>>
  82. <?= _t('conf.display.width.large') ?>
  83. </option>
  84. <option value="no_limit" <?= $width === 'no_limit' ? 'selected="selected"' : '' ?>>
  85. <?= _t('conf.display.width.no_limit') ?>
  86. </option>
  87. </select>
  88. </div>
  89. </div>
  90. <?php $topline_thumbnail = FreshRSS_Context::$user_conf->topline_thumbnail; ?>
  91. <div class="form-group">
  92. <label class="group-name" for="topline_thumbnail"><?= _t('conf.display.thumbnail.label') ?></label>
  93. <div class="group-controls">
  94. <select name="topline_thumbnail" id="topline_thumbnail" required="" data-leave-validation="<?= $topline_thumbnail ?>">
  95. <option value="none" <?= $topline_thumbnail === 'none' ? 'selected="selected"' : '' ?>>
  96. <?= _t('conf.display.thumbnail.none') ?>
  97. </option>
  98. <option value="portrait" <?= $topline_thumbnail === 'portrait' ? 'selected="selected"' : '' ?>>
  99. <?= _t('conf.display.thumbnail.portrait') ?>
  100. </option>
  101. <option value="square" <?= $topline_thumbnail === 'square' ? 'selected="selected"' : '' ?>>
  102. <?= _t('conf.display.thumbnail.square') ?>
  103. </option>
  104. <option value="landscape" <?= $topline_thumbnail === 'landscape' ? 'selected="selected"' : '' ?>>
  105. <?= _t('conf.display.thumbnail.landscape') ?>
  106. </option>
  107. </select>
  108. </div>
  109. </div>
  110. <div class="form-group">
  111. <label class="group-name"><?= _t('conf.display.icon.entry') ?></label>
  112. <div class="group-controls">
  113. <table class="config-articleicons">
  114. <thead>
  115. <tr>
  116. <th> </th>
  117. <th title="<?= _t('conf.shortcut.mark_read') ?>"><?= _i('read') ?></th>
  118. <th title="<?= _t('conf.shortcut.mark_favorite') ?>"><?= _i('bookmark') ?></th>
  119. <th><?= _t('conf.display.icon.related_tags') ?></th>
  120. <th><?= _t('conf.display.icon.sharing') ?></th>
  121. <th><?= _t('conf.display.icon.summary') ?></th>
  122. <th><?= _t('conf.display.icon.display_authors') ?></th>
  123. <th><?= _t('conf.display.icon.publication_date') ?></th>
  124. <th><?= _i('link') ?></th>
  125. </tr>
  126. </thead>
  127. <tbody>
  128. <tr>
  129. <th><?= _t('conf.display.icon.top_line') ?></th>
  130. <td><input type="checkbox" name="topline_read" value="1"<?=
  131. FreshRSS_Context::$user_conf->topline_read ? ' checked="checked"' : '' ?>
  132. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_read ?>" /></td>
  133. <td><input type="checkbox" name="topline_favorite" value="1"<?=
  134. FreshRSS_Context::$user_conf->topline_favorite ? ' checked="checked"' : '' ?>
  135. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_favorite ?>" /></td>
  136. <td><input type="checkbox" disabled="disabled" /></td>
  137. <td><input type="checkbox" disabled="disabled" /></td>
  138. <td><input type="checkbox" name="topline_summary" value="1"<?=
  139. FreshRSS_Context::$user_conf->topline_summary ? 'checked="checked"' : '' ?>
  140. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_summary ?>" /></td>
  141. <td><input type="checkbox" name="topline_display_authors" value="1"<?=
  142. FreshRSS_Context::$user_conf->topline_display_authors ? ' checked="checked"' : '' ?>
  143. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_display_authors ?>" /></td>
  144. <td><input type="checkbox" name="topline_date" value="1"<?=
  145. FreshRSS_Context::$user_conf->topline_date ? ' checked="checked"' : '' ?>
  146. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_date ?>" /></td>
  147. <td><input type="checkbox" name="topline_link" value="1"<?= FreshRSS_Context::$user_conf->topline_link ? ' checked="checked"' : '' ?>
  148. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_link ?>" /></td>
  149. </tr><tr>
  150. <th><?= _t('conf.display.icon.bottom_line') ?></th>
  151. <td><input type="checkbox" name="bottomline_read" value="1"<?=
  152. FreshRSS_Context::$user_conf->bottomline_read ? ' checked="checked"' : '' ?>
  153. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_read ?>" /></td>
  154. <td><input type="checkbox" name="bottomline_favorite" value="1"<?=
  155. FreshRSS_Context::$user_conf->bottomline_favorite ? ' checked="checked"' : '' ?>
  156. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_favorite ?>" /></td>
  157. <td><input type="checkbox" name="bottomline_tags" value="1"<?=
  158. FreshRSS_Context::$user_conf->bottomline_tags ? ' checked="checked"' : '' ?>
  159. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_tags ?>" /></td>
  160. <td><input type="checkbox" name="bottomline_sharing" value="1"<?=
  161. FreshRSS_Context::$user_conf->bottomline_sharing ? ' checked="checked"' : '' ?>
  162. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_sharing ?>" /></td>
  163. <td><input type="checkbox" disabled="disabled" /></td>
  164. <td><input type="checkbox" disabled="disabled" /></td>
  165. <td><input type="checkbox" name="bottomline_date" value="1"<?=
  166. FreshRSS_Context::$user_conf->bottomline_date ? ' checked="checked"' : '' ?>
  167. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_date ?>" /></td>
  168. <td><input type="checkbox" name="bottomline_link" value="1"<?=
  169. FreshRSS_Context::$user_conf->bottomline_link ? ' checked="checked"' : '' ?>
  170. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_link ?>" /></td>
  171. </tr>
  172. </tbody>
  173. </table>
  174. </div>
  175. </div>
  176. <div class="form-group">
  177. <label class="group-name" for="html5_notif_timeout"><?= _t('conf.display.notif_html5.timeout') ?></label>
  178. <div class="group-controls">
  179. <input type="number" id="html5_notif_timeout" name="html5_notif_timeout" value="<?=
  180. FreshRSS_Context::$user_conf->html5_notif_timeout ?>"
  181. data-leave-validation="<?= FreshRSS_Context::$user_conf->html5_notif_timeout ?>" /> <?= _t('conf.display.notif_html5.seconds') ?>
  182. </div>
  183. </div>
  184. <div class="form-group">
  185. <div class="group-controls">
  186. <label class="checkbox" for="show_nav_buttons">
  187. <input type="checkbox" name="show_nav_buttons" id="show_nav_buttons" value="1"<?=
  188. FreshRSS_Context::$user_conf->show_nav_buttons ? ' checked="checked"' : '' ?>
  189. data-leave-validation="<?= FreshRSS_Context::$user_conf->show_nav_buttons ?>" />
  190. <?= _t('conf.display.show_nav_buttons') ?>
  191. </label>
  192. </div>
  193. </div>
  194. <div class="form-group form-actions">
  195. <div class="group-controls">
  196. <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
  197. <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
  198. </div>
  199. </div>
  200. </form>
  201. </main>