views.go 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235
  1. // Code generated by go generate; DO NOT EDIT.
  2. // 2018-01-31 22:01:40.010173412 -0800 PST m=+0.035694895
  3. package template
  4. var templateViewsMap = map[string]string{
  5. "about": `{{ define "title"}}{{ t "About" }}{{ end }}
  6. {{ define "content"}}
  7. <section class="page-header">
  8. <h1>{{ t "About" }}</h1>
  9. <ul>
  10. <li>
  11. <a href="{{ route "settings" }}">{{ t "Settings" }}</a>
  12. </li>
  13. <li>
  14. <a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
  15. </li>
  16. <li>
  17. <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
  18. </li>
  19. {{ if .user.IsAdmin }}
  20. <li>
  21. <a href="{{ route "users" }}">{{ t "Users" }}</a>
  22. </li>
  23. {{ end }}
  24. </ul>
  25. </section>
  26. <div class="panel">
  27. <h3>{{ t "Version" }}</h3>
  28. <ul>
  29. <li><strong>{{ t "Version:" }}</strong> {{ .version }}</li>
  30. <li><strong>{{ t "Build Date:" }}</strong> {{ .build_date }}</li>
  31. </ul>
  32. </div>
  33. <div class="panel">
  34. <h3>{{ t "Authors" }}</h3>
  35. <ul>
  36. <li><strong>{{ t "Author:" }}</strong> Frédéric Guillot</li>
  37. <li><strong>{{ t "License:" }}</strong> Apache 2.0</li>
  38. </ul>
  39. </div>
  40. {{ end }}
  41. `,
  42. "add_subscription": `{{ define "title"}}{{ t "New Subscription" }}{{ end }}
  43. {{ define "content"}}
  44. <section class="page-header">
  45. <h1>{{ t "New Subscription" }}</h1>
  46. <ul>
  47. <li>
  48. <a href="{{ route "feeds" }}">{{ t "Feeds" }}</a>
  49. </li>
  50. <li>
  51. <a href="{{ route "export" }}">{{ t "Export" }}</a>
  52. </li>
  53. <li>
  54. <a href="{{ route "import" }}">{{ t "Import" }}</a>
  55. </li>
  56. </ul>
  57. </section>
  58. {{ if not .categories }}
  59. <p class="alert alert-error">{{ t "There is no category. You must have at least one category." }}</p>
  60. {{ else }}
  61. <form action="{{ route "submitSubscription" }}" method="post" autocomplete="off">
  62. <input type="hidden" name="csrf" value="{{ .csrf }}">
  63. {{ if .errorMessage }}
  64. <div class="alert alert-error">{{ t .errorMessage }}</div>
  65. {{ end }}
  66. <label for="form-url">{{ t "URL" }}</label>
  67. <input type="url" name="url" id="form-url" placeholder="https://domain.tld/" value="{{ .form.URL }}" required autofocus>
  68. <label for="form-category">{{ t "Category" }}</label>
  69. <select id="form-category" name="category_id">
  70. {{ range .categories }}
  71. <option value="{{ .ID }}">{{ .Title }}</option>
  72. {{ end }}
  73. </select>
  74. <label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "Fetch original content" }}</label>
  75. <div class="buttons">
  76. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Find a subscription" }}</button>
  77. </div>
  78. </form>
  79. {{ end }}
  80. {{ end }}
  81. `,
  82. "categories": `{{ define "title"}}{{ t "Categories" }} ({{ .total }}){{ end }}
  83. {{ define "content"}}
  84. <section class="page-header">
  85. <h1>{{ t "Categories" }} ({{ .total }})</h1>
  86. <ul>
  87. <li>
  88. <a href="{{ route "createCategory" }}">{{ t "Create a category" }}</a>
  89. </li>
  90. </ul>
  91. </section>
  92. {{ if not .categories }}
  93. <p class="alert alert-error">{{ t "There is no category." }}</p>
  94. {{ else }}
  95. <div class="items">
  96. {{ range .categories }}
  97. <article class="item">
  98. <div class="item-header">
  99. <span class="item-title">
  100. <a href="{{ route "categoryEntries" "categoryID" .ID }}">{{ .Title }}</a>
  101. </span>
  102. </div>
  103. <div class="item-meta">
  104. <ul>
  105. <li>
  106. {{ if eq .FeedCount 0 }}
  107. {{ t "No feed." }}
  108. {{ else }}
  109. {{ plural "plural.categories.feed_count" .FeedCount .FeedCount }}
  110. {{ end }}
  111. </li>
  112. </ul>
  113. <ul>
  114. <li>
  115. <a href="{{ route "editCategory" "categoryID" .ID }}">{{ t "Edit" }}</a>
  116. </li>
  117. {{ if eq .FeedCount 0 }}
  118. <li>
  119. <a href="#"
  120. data-confirm="true"
  121. data-label-question="{{ t "Are you sure?" }}"
  122. data-label-yes="{{ t "yes" }}"
  123. data-label-no="{{ t "no" }}"
  124. data-label-loading="{{ t "Work in progress..." }}"
  125. data-url="{{ route "removeCategory" "categoryID" .ID }}">{{ t "Remove" }}</a>
  126. </li>
  127. {{ end }}
  128. </ul>
  129. </div>
  130. </article>
  131. {{ end }}
  132. </div>
  133. {{ end }}
  134. {{ end }}
  135. `,
  136. "category_entries": `{{ define "title"}}{{ .category.Title }} ({{ .total }}){{ end }}
  137. {{ define "content"}}
  138. <section class="page-header">
  139. <h1>{{ .category.Title }} ({{ .total }})</h1>
  140. {{ if .entries }}
  141. <ul>
  142. <li>
  143. <a href="#" data-on-click="markPageAsRead">{{ t "Mark this page as read" }}</a>
  144. </li>
  145. </ul>
  146. {{ end }}
  147. </section>
  148. {{ if not .entries }}
  149. <p class="alert">{{ t "There is no article in this category." }}</p>
  150. {{ else }}
  151. <div class="items">
  152. {{ range .entries }}
  153. <article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
  154. <div class="item-header">
  155. <span class="item-title">
  156. {{ if ne .Feed.Icon.IconID 0 }}
  157. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16">
  158. {{ end }}
  159. <a href="{{ route "categoryEntry" "categoryID" .Feed.Category.ID "entryID" .ID }}">{{ .Title }}</a>
  160. </span>
  161. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  162. </div>
  163. {{ template "item_meta" . }}
  164. </article>
  165. {{ end }}
  166. </div>
  167. {{ template "pagination" .pagination }}
  168. {{ end }}
  169. {{ end }}
  170. `,
  171. "choose_subscription": `{{ define "title"}}{{ t "Choose a Subscription" }}{{ end }}
  172. {{ define "content"}}
  173. <section class="page-header">
  174. <h1>{{ t "New Subscription" }}</h1>
  175. <ul>
  176. <li>
  177. <a href="{{ route "feeds" }}">{{ t "Feeds" }}</a>
  178. </li>
  179. <li>
  180. <a href="{{ route "export" }}">{{ t "Export" }}</a>
  181. </li>
  182. <li>
  183. <a href="{{ route "import" }}">{{ t "Import" }}</a>
  184. </li>
  185. </ul>
  186. </section>
  187. <form action="{{ route "chooseSubscription" }}" method="POST">
  188. <input type="hidden" name="csrf" value="{{ .csrf }}">
  189. <input type="hidden" name="category_id" value="{{ .categoryID }}">
  190. <h3>{{ t "Choose a Subscription" }}</h3>
  191. {{ range .subscriptions }}
  192. <div class="radio-group">
  193. <label title="{{ .URL }}"><input type="radio" name="url" value="{{ .URL }}"> {{ .Title }}</label> ({{ .Type }})
  194. <small title="Type = {{ .Type }}"><a href="{{ .URL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ .URL }}</a></small>
  195. </div>
  196. {{ end }}
  197. <br>
  198. <label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "Fetch original content" }}</label>
  199. <div class="buttons">
  200. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Subscribe" }}</button>
  201. </div>
  202. </form>
  203. {{ end }}
  204. `,
  205. "create_category": `{{ define "title"}}{{ t "New Category" }}{{ end }}
  206. {{ define "content"}}
  207. <section class="page-header">
  208. <h1>{{ t "New Category" }}</h1>
  209. <ul>
  210. <li>
  211. <a href="{{ route "categories" }}">{{ t "Categories" }}</a>
  212. </li>
  213. </ul>
  214. </section>
  215. <form action="{{ route "saveCategory" }}" method="post" autocomplete="off">
  216. <input type="hidden" name="csrf" value="{{ .csrf }}">
  217. {{ if .errorMessage }}
  218. <div class="alert alert-error">{{ t .errorMessage }}</div>
  219. {{ end }}
  220. <label for="form-title">{{ t "Title" }}</label>
  221. <input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus>
  222. <div class="buttons">
  223. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Save" }}</button> {{ t "or" }} <a href="{{ route "categories" }}">{{ t "cancel" }}</a>
  224. </div>
  225. </form>
  226. {{ end }}
  227. `,
  228. "create_user": `{{ define "title"}}{{ t "New User" }}{{ end }}
  229. {{ define "content"}}
  230. <section class="page-header">
  231. <h1>{{ t "New User" }}</h1>
  232. <ul>
  233. <li>
  234. <a href="{{ route "settings" }}">{{ t "Settings" }}</a>
  235. </li>
  236. <li>
  237. <a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
  238. </li>
  239. <li>
  240. <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
  241. </li>
  242. <li>
  243. <a href="{{ route "users" }}">{{ t "Users" }}</a>
  244. </li>
  245. <li>
  246. <a href="{{ route "about" }}">{{ t "About" }}</a>
  247. </li>
  248. </ul>
  249. </section>
  250. <form action="{{ route "saveUser" }}" method="post" autocomplete="off">
  251. <input type="hidden" name="csrf" value="{{ .csrf }}">
  252. {{ if .errorMessage }}
  253. <div class="alert alert-error">{{ t .errorMessage }}</div>
  254. {{ end }}
  255. <label for="form-username">{{ t "Username" }}</label>
  256. <input type="text" name="username" id="form-username" value="{{ .form.Username }}" required autofocus>
  257. <label for="form-password">{{ t "Password" }}</label>
  258. <input type="password" name="password" id="form-password" value="{{ .form.Password }}" required>
  259. <label for="form-confirmation">{{ t "Confirmation" }}</label>
  260. <input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}" required>
  261. <label><input type="checkbox" name="is_admin" value="1" {{ if .form.IsAdmin }}checked{{ end }}> {{ t "Administrator" }}</label>
  262. <div class="buttons">
  263. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Save" }}</button> {{ t "or" }} <a href="{{ route "users" }}">{{ t "cancel" }}</a>
  264. </div>
  265. </form>
  266. {{ end }}
  267. `,
  268. "edit_category": `{{ define "title"}}{{ t "Edit Category: %s" .category.Title }}{{ end }}
  269. {{ define "content"}}
  270. <section class="page-header">
  271. <h1>{{ t "Edit Category: %s" .category.Title }}</h1>
  272. <ul>
  273. <li>
  274. <a href="{{ route "categories" }}">{{ t "Categories" }}</a>
  275. </li>
  276. <li>
  277. <a href="{{ route "createCategory" }}">{{ t "Create a category" }}</a>
  278. </li>
  279. </ul>
  280. </section>
  281. <form action="{{ route "updateCategory" "categoryID" .category.ID }}" method="post" autocomplete="off">
  282. <input type="hidden" name="csrf" value="{{ .csrf }}">
  283. {{ if .errorMessage }}
  284. <div class="alert alert-error">{{ t .errorMessage }}</div>
  285. {{ end }}
  286. <label for="form-title">{{ t "Title" }}</label>
  287. <input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus>
  288. <div class="buttons">
  289. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button> {{ t "or" }} <a href="{{ route "categories" }}">{{ t "cancel" }}</a>
  290. </div>
  291. </form>
  292. {{ end }}
  293. `,
  294. "edit_feed": `{{ define "title"}}{{ t "Edit Feed: %s" .feed.Title }}{{ end }}
  295. {{ define "content"}}
  296. <section class="page-header">
  297. <h1>{{ .feed.Title }}</h1>
  298. <ul>
  299. <li>
  300. <a href="{{ route "feeds" }}">{{ t "Feeds" }}</a>
  301. </li>
  302. <li>
  303. <a href="{{ route "addSubscription" }}">{{ t "Add subscription" }}</a>
  304. </li>
  305. <li>
  306. <a href="{{ route "export" }}">{{ t "Export" }}</a>
  307. </li>
  308. <li>
  309. <a href="{{ route "import" }}">{{ t "Import" }}</a>
  310. </li>
  311. </ul>
  312. </section>
  313. {{ if not .categories }}
  314. <p class="alert alert-error">{{ t "There is no category!" }}</p>
  315. {{ else }}
  316. {{ if ne .feed.ParsingErrorCount 0 }}
  317. <div class="alert alert-error">
  318. <h3>{{ t "Last Parsing Error" }}</h3>
  319. <p>{{ t .feed.ParsingErrorMsg }}</p>
  320. </div>
  321. {{ end }}
  322. <form action="{{ route "updateFeed" "feedID" .feed.ID }}" method="post" autocomplete="off">
  323. <input type="hidden" name="csrf" value="{{ .csrf }}">
  324. {{ if .errorMessage }}
  325. <div class="alert alert-error">{{ t .errorMessage }}</div>
  326. {{ end }}
  327. <label for="form-title">{{ t "Title" }}</label>
  328. <input type="text" name="title" id="form-title" value="{{ .form.Title }}" required autofocus>
  329. <label for="form-site-url">{{ t "Site URL" }}</label>
  330. <input type="url" name="site_url" id="form-site-url" placeholder="https://domain.tld/" value="{{ .form.SiteURL }}" required>
  331. <label for="form-feed-url">{{ t "Feed URL" }}</label>
  332. <input type="url" name="feed_url" id="form-feed-url" placeholder="https://domain.tld/" value="{{ .form.FeedURL }}" required>
  333. <label for="form-scraper-rules">{{ t "Scraper Rules" }}</label>
  334. <input type="text" name="scraper_rules" id="form-scraper-rules" value="{{ .form.ScraperRules }}">
  335. <label for="form-rewrite-rules">{{ t "Rewrite Rules" }}</label>
  336. <input type="text" name="rewrite_rules" id="form-rewrite-rules" value="{{ .form.RewriteRules }}">
  337. <label for="form-category">{{ t "Category" }}</label>
  338. <select id="form-category" name="category_id">
  339. {{ range .categories }}
  340. <option value="{{ .ID }}" {{ if eq .ID $.form.CategoryID }}selected="selected"{{ end }}>{{ .Title }}</option>
  341. {{ end }}
  342. </select>
  343. <label><input type="checkbox" name="crawler" value="1" {{ if .form.Crawler }}checked{{ end }}> {{ t "Fetch original content" }}</label>
  344. <div class="buttons">
  345. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button> {{ t "or" }} <a href="{{ route "feeds" }}">{{ t "cancel" }}</a>
  346. </div>
  347. </form>
  348. <div class="panel">
  349. <ul>
  350. <li><strong>{{ t "Last checked:" }} </strong><time datetime="{{ isodate .feed.CheckedAt }}" title="{{ isodate .feed.CheckedAt }}">{{ elapsed .feed.CheckedAt }}</time></li>
  351. <li><strong>{{ t "ETag header:" }} </strong>{{ if .feed.EtagHeader }}{{ .feed.EtagHeader }}{{ else }}{{ t "None" }}{{ end }}</li>
  352. <li><strong>{{ t "LastModified header:" }} </strong>{{ if .feed.LastModifiedHeader }}{{ .feed.LastModifiedHeader }}{{ else }}{{ t "None" }}{{ end }}</li>
  353. </ul>
  354. </div>
  355. {{ end }}
  356. {{ end }}`,
  357. "edit_user": `{{ define "title"}}{{ t "Edit user: %s" .selected_user.Username }}{{ end }}
  358. {{ define "content"}}
  359. <section class="page-header">
  360. <h1>{{ t "Edit user %s" .selected_user.Username }}"</h1>
  361. <ul>
  362. <li>
  363. <a href="{{ route "settings" }}">{{ t "Settings" }}</a>
  364. </li>
  365. <li>
  366. <a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
  367. </li>
  368. <li>
  369. <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
  370. </li>
  371. <li>
  372. <a href="{{ route "users" }}">{{ t "Users" }}</a>
  373. </li>
  374. <li>
  375. <a href="{{ route "createUser" }}">{{ t "Add user" }}</a>
  376. </li>
  377. <li>
  378. <a href="{{ route "about" }}">{{ t "About" }}</a>
  379. </li>
  380. </ul>
  381. </section>
  382. <form action="{{ route "updateUser" "userID" .selected_user.ID }}" method="post" autocomplete="off">
  383. <input type="hidden" name="csrf" value="{{ .csrf }}">
  384. {{ if .errorMessage }}
  385. <div class="alert alert-error">{{ t .errorMessage }}</div>
  386. {{ end }}
  387. <label for="form-username">{{ t "Username" }}</label>
  388. <input type="text" name="username" id="form-username" value="{{ .form.Username }}" required autofocus>
  389. <label for="form-password">{{ t "Password" }}</label>
  390. <input type="password" name="password" id="form-password" value="{{ .form.Password }}">
  391. <label for="form-confirmation">{{ t "Confirmation" }}</label>
  392. <input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}">
  393. <label><input type="checkbox" name="is_admin" value="1" {{ if .form.IsAdmin }}checked{{ end }}> {{ t "Administrator" }}</label>
  394. <div class="buttons">
  395. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button> {{ t "or" }} <a href="{{ route "users" }}">{{ t "cancel" }}</a>
  396. </div>
  397. </form>
  398. {{ end }}
  399. `,
  400. "entry": `{{ define "title"}}{{ .entry.Title }}{{ end }}
  401. {{ define "content"}}
  402. <section class="entry">
  403. <header class="entry-header">
  404. <h1>
  405. <a href="{{ .entry.URL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ .entry.Title }}</a>
  406. </h1>
  407. <div class="entry-actions">
  408. <ul>
  409. <li>
  410. <a href="#"
  411. data-toggle-bookmark="true"
  412. data-bookmark-url="{{ route "toggleBookmark" "entryID" .entry.ID }}"
  413. data-label-loading="{{ t "Saving..." }}"
  414. data-label-star="☆ {{ t "Star" }}"
  415. data-label-unstar="★ {{ t "Unstar" }}"
  416. data-value="{{ if .Starred }}star{{ else }}unstar{{ end }}"
  417. >{{ if .entry.Starred }}★ {{ t "Unstar" }}{{ else }}☆ {{ t "Star" }}{{ end }}</a>
  418. </li>
  419. <li>
  420. <a href="#"
  421. title="{{ t "Save this article" }}"
  422. data-save-entry="true"
  423. data-save-url="{{ route "saveEntry" "entryID" .entry.ID }}"
  424. data-label-loading="{{ t "Saving..." }}"
  425. data-label-done="{{ t "Done!" }}"
  426. >{{ t "Save" }}</a>
  427. </li>
  428. <li>
  429. <a href="#"
  430. title="{{ t "Fetch original content" }}"
  431. data-fetch-content-entry="true"
  432. data-fetch-content-url="{{ route "fetchContent" "entryID" .entry.ID }}"
  433. data-label-loading="{{ t "Loading..." }}"
  434. data-label-done="{{ t "Done!" }}"
  435. >{{ t "Fetch original content" }}</a>
  436. </li>
  437. </ul>
  438. </div>
  439. <div class="entry-meta">
  440. <span class="entry-website">
  441. {{ if ne .entry.Feed.Icon.IconID 0 }}
  442. <img src="{{ route "icon" "iconID" .entry.Feed.Icon.IconID }}" width="16" height="16">
  443. {{ end }}
  444. <a href="{{ route "feedEntries" "feedID" .entry.Feed.ID }}">{{ .entry.Feed.Title }}</a>
  445. </span>
  446. {{ if .entry.Author }}
  447. <span class="entry-author">
  448. {{ if isEmail .entry.Author }}
  449. - <a href="mailto:{{ .entry.Author }}">{{ .entry.Author }}</a>
  450. {{ else }}
  451. – <em>{{ .entry.Author }}</em>
  452. {{ end }}
  453. </span>
  454. {{ end }}
  455. <span class="category">
  456. <a href="{{ route "categoryEntries" "categoryID" .entry.Feed.Category.ID }}">{{ .entry.Feed.Category.Title }}</a>
  457. </span>
  458. </div>
  459. <div class="entry-date">
  460. <time datetime="{{ isodate .entry.Date }}" title="{{ isodate .entry.Date }}">{{ elapsed .entry.Date }}</time>
  461. </div>
  462. </header>
  463. {{ if gt (len .entry.Content) 120 }}
  464. <div class="pagination-top">
  465. {{ template "entry_pagination" . }}
  466. </div>
  467. {{ end }}
  468. <article class="entry-content">
  469. {{ noescape (proxyFilter .entry.Content) }}
  470. </article>
  471. {{ if .entry.Enclosures }}
  472. <aside class="entry-enclosures">
  473. <h3>{{ t "Attachments" }}</h3>
  474. {{ range .entry.Enclosures }}
  475. <div class="entry-enclosure">
  476. {{ if hasPrefix .MimeType "audio/" }}
  477. <div class="enclosure-audio">
  478. <audio controls preload="metadata">
  479. <source src="{{ .URL }}" type="{{ .MimeType }}">
  480. </audio>
  481. </div>
  482. {{ else if hasPrefix .MimeType "video/" }}
  483. <div class="enclosure-video">
  484. <video controls preload="metadata">
  485. <source src="{{ .URL }}" type="{{ .MimeType }}">
  486. </video>
  487. </div>
  488. {{ else if hasPrefix .MimeType "image/" }}
  489. <div class="enclosure-image">
  490. <img src="{{ proxyURL .URL }}" title="{{ .URL }} ({{ .MimeType }})" alt="{{ .URL }} ({{ .MimeType }})">
  491. </div>
  492. {{ end }}
  493. <div class="entry-enclosure-download">
  494. <a href="{{ .URL }}" title="{{ .URL }} ({{ .MimeType }})" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer">{{ t "Download" }}</a>
  495. <small>({{ .URL }})</small>
  496. </div>
  497. </div>
  498. {{ end }}
  499. </aside>
  500. {{ end }}
  501. </section>
  502. <div class="pagination-bottom">
  503. {{ template "entry_pagination" . }}
  504. </div>
  505. {{ end }}
  506. `,
  507. "feed_entries": `{{ define "title"}}{{ .feed.Title }} ({{ .total }}){{ end }}
  508. {{ define "content"}}
  509. <section class="page-header">
  510. <h1>{{ .feed.Title }} ({{ .total }})</h1>
  511. <ul>
  512. <li>
  513. <a href="{{ route "refreshFeed" "feedID" .feed.ID }}">{{ t "Refresh" }}</a>
  514. </li>
  515. <li>
  516. <a href="{{ route "editFeed" "feedID" .feed.ID }}">{{ t "Edit" }}</a>
  517. </li>
  518. {{ if .entries }}
  519. <li>
  520. <a href="#" data-on-click="markPageAsRead">{{ t "Mark this page as read" }}</a>
  521. </li>
  522. {{ end }}
  523. </ul>
  524. </section>
  525. {{ if ne .feed.ParsingErrorCount 0 }}
  526. <div class="alert alert-error">
  527. <h3>{{ t "There is a problem with this feed" }}</h3>
  528. <p>{{ t .feed.ParsingErrorMsg }}</p>
  529. </div>
  530. {{ else if not .entries }}
  531. <p class="alert">{{ t "There is no article for this feed." }}</p>
  532. {{ else }}
  533. <div class="items">
  534. {{ range .entries }}
  535. <article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
  536. <div class="item-header">
  537. <span class="item-title">
  538. {{ if ne .Feed.Icon.IconID 0 }}
  539. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16">
  540. {{ end }}
  541. <a href="{{ route "feedEntry" "feedID" .Feed.ID "entryID" .ID }}">{{ .Title }}</a>
  542. </span>
  543. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  544. </div>
  545. {{ template "item_meta" . }}
  546. </article>
  547. {{ end }}
  548. </div>
  549. {{ template "pagination" .pagination }}
  550. {{ end }}
  551. {{ end }}
  552. `,
  553. "feeds": `{{ define "title"}}{{ t "Feeds" }} ({{ .total }}){{ end }}
  554. {{ define "content"}}
  555. <section class="page-header">
  556. <h1>{{ t "Feeds" }} ({{ .total }})</h1>
  557. <ul>
  558. <li>
  559. <a href="{{ route "addSubscription" }}">{{ t "Add subscription" }}</a>
  560. </li>
  561. <li>
  562. <a href="{{ route "export" }}">{{ t "Export" }}</a>
  563. </li>
  564. <li>
  565. <a href="{{ route "import" }}">{{ t "Import" }}</a>
  566. </li>
  567. <li>
  568. <a href="{{ route "refreshAllFeeds" }}">{{ t "Refresh all feeds in background" }}</a>
  569. </li>
  570. </ul>
  571. </section>
  572. {{ if not .feeds }}
  573. <p class="alert">{{ t "You don't have any subscription." }}</p>
  574. {{ else }}
  575. <div class="items">
  576. {{ range .feeds }}
  577. <article class="item {{ if ne .ParsingErrorCount 0 }}feed-parsing-error{{ end }}">
  578. <div class="item-header">
  579. <span class="item-title">
  580. {{ if .Icon }}
  581. <img src="{{ route "icon" "iconID" .Icon.IconID }}" width="16" height="16">
  582. {{ end }}
  583. <a href="{{ route "feedEntries" "feedID" .ID }}">{{ .Title }}</a>
  584. </span>
  585. <span class="category">
  586. <a href="{{ route "categoryEntries" "categoryID" .Category.ID }}">{{ .Category.Title }}</a>
  587. </span>
  588. </div>
  589. <div class="item-meta">
  590. <ul>
  591. <li>
  592. <a href="{{ .SiteURL }}" target="_blank" rel="noopener noreferrer" referrerpolicy="no-referrer" data-original-link="true">{{ domain .SiteURL }}</a>
  593. </li>
  594. <li>
  595. {{ t "Last check:" }} <time datetime="{{ isodate .CheckedAt }}" title="{{ isodate .CheckedAt }}">{{ elapsed .CheckedAt }}</time>
  596. </li>
  597. </ul>
  598. <ul>
  599. <li>
  600. <a href="{{ route "refreshFeed" "feedID" .ID }}">{{ t "Refresh" }}</a>
  601. </li>
  602. <li>
  603. <a href="{{ route "editFeed" "feedID" .ID }}">{{ t "Edit" }}</a>
  604. </li>
  605. <li>
  606. <a href="#"
  607. data-confirm="true"
  608. data-label-question="{{ t "Are you sure?" }}"
  609. data-label-yes="{{ t "yes" }}"
  610. data-label-no="{{ t "no" }}"
  611. data-label-loading="{{ t "Work in progress..." }}"
  612. data-url="{{ route "removeFeed" "feedID" .ID }}">{{ t "Remove" }}</a>
  613. </li>
  614. </ul>
  615. </div>
  616. {{ if ne .ParsingErrorCount 0 }}
  617. <div class="parsing-error">
  618. <strong title="{{ .ParsingErrorMsg }}" class="parsing-error-count">{{ plural "plural.feed.error_count" .ParsingErrorCount .ParsingErrorCount }}</strong>
  619. <small class="parsing-error-message">({{ .ParsingErrorMsg }})</small>
  620. </div>
  621. {{ end }}
  622. </article>
  623. {{ end }}
  624. </div>
  625. {{ end }}
  626. {{ end }}
  627. `,
  628. "history": `{{ define "title"}}{{ t "History" }} ({{ .total }}){{ end }}
  629. {{ define "content"}}
  630. <section class="page-header">
  631. <h1>{{ t "History" }} ({{ .total }})</h1>
  632. {{ if .entries }}
  633. <ul>
  634. <li>
  635. <a href="{{ route "flushHistory" }}">{{ t "Flush history" }}</a>
  636. </li>
  637. </ul>
  638. {{ end }}
  639. </section>
  640. {{ if not .entries }}
  641. <p class="alert alert-info">{{ t "There is no history at the moment." }}</p>
  642. {{ else }}
  643. <div class="items">
  644. {{ range .entries }}
  645. <article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
  646. <div class="item-header">
  647. <span class="item-title">
  648. {{ if ne .Feed.Icon.IconID 0 }}
  649. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16">
  650. {{ end }}
  651. <a href="{{ route "readEntry" "entryID" .ID }}">{{ .Title }}</a>
  652. </span>
  653. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  654. </div>
  655. {{ template "item_meta" . }}
  656. </article>
  657. {{ end }}
  658. </div>
  659. {{ template "pagination" .pagination }}
  660. {{ end }}
  661. {{ end }}
  662. `,
  663. "import": `{{ define "title"}}{{ t "Import" }}{{ end }}
  664. {{ define "content"}}
  665. <section class="page-header">
  666. <h1>{{ t "Import" }}</h1>
  667. <ul>
  668. <li>
  669. <a href="{{ route "feeds" }}">{{ t "Feeds" }}</a>
  670. </li>
  671. <li>
  672. <a href="{{ route "addSubscription" }}">{{ t "Add subscription" }}</a>
  673. </li>
  674. <li>
  675. <a href="{{ route "export" }}">{{ t "Export" }}</a>
  676. </li>
  677. </ul>
  678. </section>
  679. <form action="{{ route "uploadOPML" }}" method="post" enctype="multipart/form-data">
  680. <input type="hidden" name="csrf" value="{{ .csrf }}">
  681. {{ if .errorMessage }}
  682. <div class="alert alert-error">{{ t .errorMessage }}</div>
  683. {{ end }}
  684. <label for="form-file">{{ t "OPML file" }}</label>
  685. <input type="file" name="file" id="form-file">
  686. <div class="buttons">
  687. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Import" }}</button>
  688. </div>
  689. </form>
  690. {{ end }}
  691. `,
  692. "integrations": `{{ define "title"}}{{ t "Integrations" }}{{ end }}
  693. {{ define "content"}}
  694. <section class="page-header">
  695. <h1>{{ t "Integrations" }}</h1>
  696. <ul>
  697. <li>
  698. <a href="{{ route "settings" }}">{{ t "Settings" }}</a>
  699. </li>
  700. <li>
  701. <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
  702. </li>
  703. {{ if .user.IsAdmin }}
  704. <li>
  705. <a href="{{ route "users" }}">{{ t "Users" }}</a>
  706. </li>
  707. {{ end }}
  708. <li>
  709. <a href="{{ route "about" }}">{{ t "About" }}</a>
  710. </li>
  711. </ul>
  712. </section>
  713. <form method="post" autocomplete="off" action="{{ route "updateIntegration" }}">
  714. <input type="hidden" name="csrf" value="{{ .csrf }}">
  715. {{ if .errorMessage }}
  716. <div class="alert alert-error">{{ t .errorMessage }}</div>
  717. {{ end }}
  718. <h3>Fever</h3>
  719. <div class="form-section">
  720. <label>
  721. <input type="checkbox" name="fever_enabled" value="1" {{ if .form.FeverEnabled }}checked{{ end }}> {{ t "Activate Fever API" }}
  722. </label>
  723. <label for="form-fever-username">{{ t "Fever Username" }}</label>
  724. <input type="text" name="fever_username" id="form-fever-username" value="{{ .form.FeverUsername }}">
  725. <label for="form-fever-password">{{ t "Fever Password" }}</label>
  726. <input type="password" name="fever_password" id="form-fever-password" value="{{ .form.FeverPassword }}">
  727. <p>{{ t "Fever API endpoint:" }} <strong>{{ baseURL }}{{ route "feverEndpoint" }}</strong></p>
  728. </div>
  729. <h3>Pinboard</h3>
  730. <div class="form-section">
  731. <label>
  732. <input type="checkbox" name="pinboard_enabled" value="1" {{ if .form.PinboardEnabled }}checked{{ end }}> {{ t "Save articles to Pinboard" }}
  733. </label>
  734. <label for="form-pinboard-token">{{ t "Pinboard API Token" }}</label>
  735. <input type="password" name="pinboard_token" id="form-pinboard-token" value="{{ .form.PinboardToken }}">
  736. <label for="form-pinboard-tags">{{ t "Pinboard Tags" }}</label>
  737. <input type="text" name="pinboard_tags" id="form-pinboard-tags" value="{{ .form.PinboardTags }}">
  738. <label>
  739. <input type="checkbox" name="pinboard_mark_as_unread" value="1" {{ if .form.PinboardMarkAsUnread }}checked{{ end }}> {{ t "Mark bookmark as unread" }}
  740. </label>
  741. </div>
  742. <h3>Instapaper</h3>
  743. <div class="form-section">
  744. <label>
  745. <input type="checkbox" name="instapaper_enabled" value="1" {{ if .form.InstapaperEnabled }}checked{{ end }}> {{ t "Save articles to Instapaper" }}
  746. </label>
  747. <label for="form-instapaper-username">{{ t "Instapaper Username" }}</label>
  748. <input type="text" name="instapaper_username" id="form-instapaper-username" value="{{ .form.InstapaperUsername }}">
  749. <label for="form-instapaper-password">{{ t "Instapaper Password" }}</label>
  750. <input type="password" name="instapaper_password" id="form-instapaper-password" value="{{ .form.InstapaperPassword }}">
  751. </div>
  752. <h3>Wallabag</h3>
  753. <div class="form-section">
  754. <label>
  755. <input type="checkbox" name="wallabag_enabled" value="1" {{ if .form.WallabagEnabled }}checked{{ end }}> {{ t "Save articles to Wallabag" }}
  756. </label>
  757. <label for="form-wallabag-url">{{ t "Wallabag API Endpoint" }}</label>
  758. <input type="url" name="wallabag_url" id="form-wallabag-url" value="{{ .form.WallabagURL }}" placeholder="http://v2.wallabag.org/">
  759. <label for="form-wallabag-client-id">{{ t "Wallabag Client ID" }}</label>
  760. <input type="text" name="wallabag_client_id" id="form-wallabag-client-id" value="{{ .form.WallabagClientID }}">
  761. <label for="form-wallabag-client-secret">{{ t "Wallabag Client Secret" }}</label>
  762. <input type="password" name="wallabag_client_secret" id="form-wallabag-client-secret" value="{{ .form.WallabagClientSecret }}">
  763. <label for="form-wallabag-username">{{ t "Wallabag Username" }}</label>
  764. <input type="text" name="wallabag_username" id="form-wallabag-username" value="{{ .form.WallabagUsername }}">
  765. <label for="form-wallabag-password">{{ t "Wallabag Password" }}</label>
  766. <input type="password" name="wallabag_password" id="form-wallabag-password" value="{{ .form.WallabagPassword }}">
  767. </div>
  768. <div class="buttons">
  769. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button>
  770. </div>
  771. </form>
  772. <h3>{{ t "Miniflux API" }}</h3>
  773. <div class="panel">
  774. <ul>
  775. <li>
  776. {{ t "API Endpoint" }} = <strong>{{ baseURL }}/v1/</strong>
  777. </li>
  778. <li>
  779. {{ t "Username" }} = <strong>{{ .user.Username }}</strong>
  780. </li>
  781. <li>
  782. {{ t "Password" }} = <strong>{{ t "Your account password" }}</strong>
  783. </li>
  784. </ul>
  785. </div>
  786. <h3>{{ t "Bookmarklet" }}</h3>
  787. <div class="panel">
  788. <p>{{ t "This special link allows you to subscribe to a website directly by using a bookmark in your web browser." }}</p>
  789. <div class="bookmarklet">
  790. <a href="javascript:location.href='{{ baseURL }}{{ route "bookmarklet" }}?uri='+encodeURIComponent(window.location.href)">{{ t "Add to Miniflux" }}</a>
  791. </div>
  792. <p>{{ t "Drag and drop this link to your bookmarks." }}</p>
  793. </div>
  794. {{ end }}
  795. `,
  796. "login": `{{ define "title"}}{{ t "Sign In" }}{{ end }}
  797. {{ define "content"}}
  798. <section class="login-form">
  799. <form action="{{ route "checkLogin" }}" method="post">
  800. <input type="hidden" name="csrf" value="{{ .csrf }}">
  801. {{ if .errorMessage }}
  802. <div class="alert alert-error">{{ t .errorMessage }}</div>
  803. {{ end }}
  804. <label for="form-username">{{ t "Username" }}</label>
  805. <input type="text" name="username" id="form-username" value="{{ .form.Username }}" required autofocus>
  806. <label for="form-password">{{ t "Password" }}</label>
  807. <input type="password" name="password" id="form-password" value="{{ .form.Password }}" required>
  808. <div class="buttons">
  809. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Sign in" }}</button>
  810. </div>
  811. </form>
  812. {{ if hasOAuth2Provider "google" }}
  813. <div class="oauth2">
  814. <a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "Sign in with Google" }}</a>
  815. </div>
  816. {{ end }}
  817. </section>
  818. {{ end }}
  819. `,
  820. "sessions": `{{ define "title"}}{{ t "Sessions" }}{{ end }}
  821. {{ define "content"}}
  822. <section class="page-header">
  823. <h1>{{ t "Sessions" }}</h1>
  824. <ul>
  825. <li>
  826. <a href="{{ route "settings" }}">{{ t "Settings" }}</a>
  827. </li>
  828. <li>
  829. <a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
  830. </li>
  831. {{ if .user.IsAdmin }}
  832. <li>
  833. <a href="{{ route "users" }}">{{ t "Users" }}</a>
  834. </li>
  835. <li>
  836. <a href="{{ route "createUser" }}">{{ t "Add user" }}</a>
  837. </li>
  838. {{ end }}
  839. <li>
  840. <a href="{{ route "about" }}">{{ t "About" }}</a>
  841. </li>
  842. </ul>
  843. </section>
  844. <table>
  845. <tr>
  846. <th>{{ t "Date" }}</th>
  847. <th>{{ t "IP Address" }}</th>
  848. <th>{{ t "User Agent" }}</th>
  849. <th>{{ t "Actions" }}</th>
  850. </tr>
  851. {{ range .sessions }}
  852. <tr {{ if eq .Token $.currentSessionToken }}class="row-highlighted"{{ end }}>
  853. <td class="column-20" title="{{ isodate .CreatedAt }}">{{ elapsed .CreatedAt }}</td>
  854. <td class="column-20" title="{{ .IP }}">{{ .IP }}</td>
  855. <td title="{{ .UserAgent }}">{{ .UserAgent }}</td>
  856. <td class="column-20">
  857. {{ if eq .Token $.currentSessionToken }}
  858. {{ t "Current session" }}
  859. {{ else }}
  860. <a href="#"
  861. data-confirm="true"
  862. data-label-question="{{ t "Are you sure?" }}"
  863. data-label-yes="{{ t "yes" }}"
  864. data-label-no="{{ t "no" }}"
  865. data-label-loading="{{ t "Work in progress..." }}"
  866. data-url="{{ route "removeSession" "sessionID" .ID }}">{{ t "Remove" }}</a>
  867. {{ end }}
  868. </td>
  869. </tr>
  870. {{ end }}
  871. </table>
  872. {{ end }}
  873. `,
  874. "settings": `{{ define "title"}}{{ t "Settings" }}{{ end }}
  875. {{ define "content"}}
  876. <section class="page-header">
  877. <h1>{{ t "Settings" }}</h1>
  878. <ul>
  879. <li>
  880. <a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
  881. </li>
  882. <li>
  883. <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
  884. </li>
  885. {{ if .user.IsAdmin }}
  886. <li>
  887. <a href="{{ route "users" }}">{{ t "Users" }}</a>
  888. </li>
  889. {{ end }}
  890. <li>
  891. <a href="{{ route "about" }}">{{ t "About" }}</a>
  892. </li>
  893. </ul>
  894. </section>
  895. <form method="post" autocomplete="off" action="{{ route "updateSettings" }}">
  896. <input type="hidden" name="csrf" value="{{ .csrf }}">
  897. {{ if .errorMessage }}
  898. <div class="alert alert-error">{{ t .errorMessage }}</div>
  899. {{ end }}
  900. <label for="form-username">{{ t "Username" }}</label>
  901. <input type="text" name="username" id="form-username" value="{{ .form.Username }}" required>
  902. <label for="form-password">{{ t "Password" }}</label>
  903. <input type="password" name="password" id="form-password" value="{{ .form.Password }}" autocomplete="off">
  904. <label for="form-confirmation">{{ t "Confirmation" }}</label>
  905. <input type="password" name="confirmation" id="form-confirmation" value="{{ .form.Confirmation }}" autocomplete="off">
  906. <label for="form-language">{{ t "Language" }}</label>
  907. <select id="form-language" name="language">
  908. {{ range $key, $value := .languages }}
  909. <option value="{{ $key }}" {{ if eq $key $.form.Language }}selected="selected"{{ end }}>{{ $value }}</option>
  910. {{ end }}
  911. </select>
  912. <label for="form-timezone">{{ t "Timezone" }}</label>
  913. <select id="form-timezone" name="timezone">
  914. {{ range $key, $value := .timezones }}
  915. <option value="{{ $key }}" {{ if eq $key $.form.Timezone }}selected="selected"{{ end }}>{{ $value }}</option>
  916. {{ end }}
  917. </select>
  918. <label for="form-theme">{{ t "Theme" }}</label>
  919. <select id="form-theme" name="theme">
  920. {{ range $key, $value := .themes }}
  921. <option value="{{ $key }}" {{ if eq $key $.form.Theme }}selected="selected"{{ end }}>{{ $value }}</option>
  922. {{ end }}
  923. </select>
  924. <label for="form-entry-direction">{{ t "Entry Sorting" }}</label>
  925. <select id="form-entry-direction" name="entry_direction">
  926. <option value="asc" {{ if eq "asc" $.form.EntryDirection }}selected="selected"{{ end }}>{{ t "Older entries first" }}</option>
  927. <option value="desc" {{ if eq "desc" $.form.EntryDirection }}selected="selected"{{ end }}>{{ t "Recent entries first" }}</option>
  928. </select>
  929. <div class="buttons">
  930. <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Update" }}</button>
  931. </div>
  932. </form>
  933. {{ if hasOAuth2Provider "google" }}
  934. <div class="panel">
  935. {{ if hasKey .user.Extra "google_id" }}
  936. <a href="{{ route "oauth2Unlink" "provider" "google" }}">{{ t "Unlink my Google account" }}</a>
  937. {{ else }}
  938. <a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "Link my Google account" }}</a>
  939. {{ end }}
  940. </div>
  941. {{ end }}
  942. {{ end }}
  943. `,
  944. "starred": `{{ define "title"}}{{ t "Favorites" }} ({{ .total }}){{ end }}
  945. {{ define "content"}}
  946. <section class="page-header">
  947. <h1>{{ t "Favorites" }} ({{ .total }})</h1>
  948. </section>
  949. {{ if not .entries }}
  950. <p class="alert alert-info">{{ t "There is no bookmark at the moment." }}</p>
  951. {{ else }}
  952. <div class="items">
  953. {{ range .entries }}
  954. <article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
  955. <div class="item-header">
  956. <span class="item-title">
  957. {{ if ne .Feed.Icon.IconID 0 }}
  958. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16">
  959. {{ end }}
  960. <a href="{{ route "starredEntry" "entryID" .ID }}">{{ .Title }}</a>
  961. </span>
  962. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  963. </div>
  964. {{ template "item_meta" . }}
  965. </article>
  966. {{ end }}
  967. </div>
  968. {{ template "pagination" .pagination }}
  969. {{ end }}
  970. {{ end }}
  971. `,
  972. "unread": `{{ define "title"}}{{ t "Unread Items" }} {{ if gt .countUnread 0 }}({{ .countUnread }}){{ end }} {{ end }}
  973. {{ define "content"}}
  974. <section class="page-header">
  975. <h1>{{ t "Unread" }} (<span class="unread-counter">{{ .countUnread }}</span>)</h1>
  976. {{ if .entries }}
  977. <ul>
  978. <li>
  979. <a href="#" data-on-click="markPageAsRead">{{ t "Mark this page as read" }}</a>
  980. </li>
  981. <li>
  982. <a href="{{ route "markAllAsRead" }}">{{ t "Mark all as read" }}</a>
  983. </li>
  984. </ul>
  985. {{ end }}
  986. </section>
  987. {{ if not .entries }}
  988. <p class="alert">{{ t "There is no unread article." }}</p>
  989. {{ else }}
  990. <div class="items hide-read-items">
  991. {{ range .entries }}
  992. <article class="item touch-item item-status-{{ .Status }}" data-id="{{ .ID }}">
  993. <div class="item-header">
  994. <span class="item-title">
  995. {{ if ne .Feed.Icon.IconID 0 }}
  996. <img src="{{ route "icon" "iconID" .Feed.Icon.IconID }}" width="16" height="16">
  997. {{ end }}
  998. <a href="{{ route "unreadEntry" "entryID" .ID }}">{{ .Title }}</a>
  999. </span>
  1000. <span class="category"><a href="{{ route "categoryEntries" "categoryID" .Feed.Category.ID }}">{{ .Feed.Category.Title }}</a></span>
  1001. </div>
  1002. {{ template "item_meta" . }}
  1003. </article>
  1004. {{ end }}
  1005. </div>
  1006. {{ template "pagination" .pagination }}
  1007. {{ end }}
  1008. {{ end }}`,
  1009. "users": `{{ define "title"}}{{ t "Users" }}{{ end }}
  1010. {{ define "content"}}
  1011. <section class="page-header">
  1012. <h1>{{ t "Users" }}</h1>
  1013. <ul>
  1014. <li>
  1015. <a href="{{ route "settings" }}">{{ t "Settings" }}</a>
  1016. </li>
  1017. <li>
  1018. <a href="{{ route "integrations" }}">{{ t "Integrations" }}</a>
  1019. </li>
  1020. <li>
  1021. <a href="{{ route "sessions" }}">{{ t "Sessions" }}</a>
  1022. </li>
  1023. <li>
  1024. <a href="{{ route "createUser" }}">{{ t "Add user" }}</a>
  1025. </li>
  1026. <li>
  1027. <a href="{{ route "about" }}">{{ t "About" }}</a>
  1028. </li>
  1029. </ul>
  1030. </section>
  1031. {{ if eq (len .users) 1 }}
  1032. <p class="alert">{{ t "You are the only user." }}</p>
  1033. {{ else }}
  1034. <table>
  1035. <tr>
  1036. <th class="column-20">{{ t "Username" }}</th>
  1037. <th>{{ t "Administrator" }}</th>
  1038. <th>{{ t "Last Login" }}</th>
  1039. <th>{{ t "Actions" }}</th>
  1040. </tr>
  1041. {{ range .users }}
  1042. {{ if ne .ID $.user.ID }}
  1043. <tr>
  1044. <td>{{ .Username }}</td>
  1045. <td>{{ if eq .IsAdmin true }}{{ t "Yes" }}{{ else }}{{ t "No" }}{{ end }}</td>
  1046. <td>
  1047. {{ if .LastLoginAt }}
  1048. <time datetime="{{ isodate .LastLoginAt }}" title="{{ isodate .LastLoginAt }}">{{ elapsed .LastLoginAt }}</time>
  1049. {{ else }}
  1050. {{ t "Never" }}
  1051. {{ end }}
  1052. </td>
  1053. <td>
  1054. <a href="{{ route "editUser" "userID" .ID }}">{{ t "Edit" }}</a>,
  1055. <a href="#"
  1056. data-confirm="true"
  1057. data-label-question="{{ t "Are you sure?" }}"
  1058. data-label-yes="{{ t "yes" }}"
  1059. data-label-no="{{ t "no" }}"
  1060. data-label-loading="{{ t "Work in progress..." }}"
  1061. data-url="{{ route "removeUser" "userID" .ID }}">{{ t "Remove" }}</a>
  1062. </td>
  1063. </tr>
  1064. {{ end }}
  1065. {{ end }}
  1066. </table>
  1067. {{ end }}
  1068. {{ end }}
  1069. `,
  1070. }
  1071. var templateViewsMapChecksums = map[string]string{
  1072. "about": "ad2fb778fc73c39b733b3f81b13e5c7d689b041fadd24ee2d4577f545aa788ad",
  1073. "add_subscription": "053c920b0d7e109ea19dce6a448e304ce720db8633588ea04db16677f7209a7b",
  1074. "categories": "ca1280cd157bb527d4fc907da67b05a8347378f6dce965b9389d4bcdf3600a11",
  1075. "category_entries": "a92bd528d1162e7af4972f7ad25feddf7ceb17164db593805caf3d363ff32aac",
  1076. "choose_subscription": "a325f9c976ca2b2dc148e25c8fef0cf6ccab0e04e86e604e7812bb18dc4cdde1",
  1077. "create_category": "2b82af5d2dcd67898dc5daa57a6461e6ff8121a6089b2a2a1be909f35e4a2275",
  1078. "create_user": "233764778c915754141a20429ec8db9bf80ef2d7704867a2d7232c1e9df233ae",
  1079. "edit_category": "cee720faadcec58289b707ad30af623d2ee66c1ce23a732965463250d7ff41c5",
  1080. "edit_feed": "30ff6ee5526b8beb9b457526b77ede55938f53eb279b1acc719ce896359e2ed8",
  1081. "edit_user": "5edd693460330750ba5ee03319d4e3cb5aabbd9a0e48b3b760799bca72c5ec4e",
  1082. "entry": "6b4405e0c8e4a7d31874659f8835f4e43e01dc3c20686091517ac750196dd70f",
  1083. "feed_entries": "3a7b4d942d9ac9da7df5c09950fbadaa0ff564696953c4f1c302d955696cc2ee",
  1084. "feeds": "65b0a47c4438810b9d51c60f3f3b2519690e56ff74029e6296c68626b83a470b",
  1085. "history": "d2476fd727e4f53428b5ed1f3f9423063583337ec8cfe1dd9c931fcb03852a20",
  1086. "import": "73b5112e20bfd232bf73334544186ea419505936bc237d481517a8622901878f",
  1087. "integrations": "a677434e9a8be1f80cfbc1d04828dacc7abcec2a22b45c80594d49cc2ba7c0e5",
  1088. "login": "7d83c3067c02f1f6aafdd8816c7f97a4eb5a5a4bdaaaa4cc1e2fbb9c17ea65e8",
  1089. "sessions": "d8ef5900d8ea8395804b320002e5f45ed0ab8b790e43f674f61f8b9787041cbd",
  1090. "settings": "ea2505b9d0a6d6bb594dba87a92079de19baa6d494f0651693a7685489fb7de9",
  1091. "starred": "121b761ce218de472ebf70879c1aa2fe3b9ae8981c11f1ed53a355e34049b269",
  1092. "unread": "17335b21dc5fb79207da317a8e8a6685a122bc94c323662cbda7cfdbf73dd2f9",
  1093. "users": "a07201315fdb1d8f381f31699b8acee0066719c26cd29c2aeb9808282d69e0a3",
  1094. }