display.phtml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  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. <table>
  75. <thead>
  76. <tr>
  77. <th> </th>
  78. <th title="<?= _t('gen.action.mark_read') ?>"><?= _i('read') ?></th>
  79. <th title="<?= _t('gen.action.mark_favorite') ?>"><?= _i('bookmark') ?></th>
  80. <th><?= _t('conf.display.icon.related_tags') ?></th>
  81. <th><?= _t('conf.display.icon.sharing') ?></th>
  82. <th><?= _t('conf.display.icon.display_authors') ?></th>
  83. <th><?= _t('conf.display.icon.publication_date') ?></th>
  84. <th><?= _i('link') ?></th>
  85. </tr>
  86. </thead>
  87. <tbody>
  88. <tr>
  89. <th><?= _t('conf.display.icon.top_line') ?></th>
  90. <td><input type="checkbox" name="topline_read" value="1"<?=
  91. FreshRSS_Context::$user_conf->topline_read ? ' checked="checked"' : '' ?>
  92. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_read ?>"/></td>
  93. <td><input type="checkbox" name="topline_favorite" value="1"<?=
  94. FreshRSS_Context::$user_conf->topline_favorite ? ' checked="checked"' : '' ?>
  95. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_favorite ?>"/></td>
  96. <td><input type="checkbox" disabled="disabled" /></td>
  97. <td><input type="checkbox" disabled="disabled" /></td>
  98. <td><input type="checkbox" name="topline_display_authors" value="1"<?=
  99. FreshRSS_Context::$user_conf->topline_display_authors ? ' checked="checked"' : '' ?>
  100. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_display_authors ?>"/></td>
  101. <td><input type="checkbox" name="topline_date" value="1"<?=
  102. FreshRSS_Context::$user_conf->topline_date ? ' checked="checked"' : '' ?>
  103. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_date ?>"/></td>
  104. <td><input type="checkbox" name="topline_link" value="1"<?= FreshRSS_Context::$user_conf->topline_link ? ' checked="checked"' : '' ?>
  105. data-leave-validation="<?= FreshRSS_Context::$user_conf->topline_link ?>"/></td>
  106. </tr><tr>
  107. <th><?= _t('conf.display.icon.bottom_line') ?></th>
  108. <td><input type="checkbox" name="bottomline_read" value="1"<?=
  109. FreshRSS_Context::$user_conf->bottomline_read ? ' checked="checked"' : '' ?>
  110. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_read ?>"/></td>
  111. <td><input type="checkbox" name="bottomline_favorite" value="1"<?=
  112. FreshRSS_Context::$user_conf->bottomline_favorite ? ' checked="checked"' : '' ?>
  113. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_favorite ?>"/></td>
  114. <td><input type="checkbox" name="bottomline_tags" value="1"<?=
  115. FreshRSS_Context::$user_conf->bottomline_tags ? ' checked="checked"' : '' ?>
  116. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_tags ?>"/></td>
  117. <td><input type="checkbox" name="bottomline_sharing" value="1"<?=
  118. FreshRSS_Context::$user_conf->bottomline_sharing ? ' checked="checked"' : '' ?>
  119. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_sharing ?>"/></td>
  120. <td><input type="checkbox" disabled="disabled" /></td>
  121. <td><input type="checkbox" name="bottomline_date" value="1"<?=
  122. FreshRSS_Context::$user_conf->bottomline_date ? ' checked="checked"' : '' ?>
  123. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_date ?>"/></td>
  124. <td><input type="checkbox" name="bottomline_link" value="1"<?=
  125. FreshRSS_Context::$user_conf->bottomline_link ? ' checked="checked"' : '' ?>
  126. data-leave-validation="<?= FreshRSS_Context::$user_conf->bottomline_link ?>"/></td>
  127. </tr>
  128. </tbody>
  129. </table><br />
  130. </div>
  131. <div class="form-group">
  132. <label class="group-name" for="html5_notif_timeout"><?= _t('conf.display.notif_html5.timeout') ?></label>
  133. <div class="group-controls">
  134. <input type="number" id="html5_notif_timeout" name="html5_notif_timeout" value="<?=
  135. FreshRSS_Context::$user_conf->html5_notif_timeout ?>"
  136. data-leave-validation="<?= FreshRSS_Context::$user_conf->html5_notif_timeout ?>"/> <?= _t('conf.display.notif_html5.seconds') ?>
  137. </div>
  138. </div>
  139. <div class="form-group">
  140. <div class="group-controls">
  141. <label class="checkbox" for="show_nav_buttons">
  142. <input type="checkbox" name="show_nav_buttons" id="show_nav_buttons" value="1"<?=
  143. FreshRSS_Context::$user_conf->show_nav_buttons ? ' checked="checked"' : '' ?>
  144. data-leave-validation="<?= FreshRSS_Context::$user_conf->show_nav_buttons ?>"/>
  145. <?= _t('conf.display.show_nav_buttons') ?>
  146. </label>
  147. </div>
  148. </div>
  149. <div class="form-group form-actions">
  150. <div class="group-controls">
  151. <button type="submit" class="btn btn-important"><?= _t('gen.action.submit') ?></button>
  152. <button type="reset" class="btn"><?= _t('gen.action.cancel') ?></button>
  153. </div>
  154. </div>
  155. </form>
  156. </div>