display.phtml 10 KB

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