display.phtml 7.9 KB

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