2017-11-20 00:10:04 -05:00
{{ define "title"}}{{ t "Edit Feed: %s" .feed.Title }}{{ end }}
{{ define "content"}}
< section class = "page-header" >
< h1 > {{ .feed.Title }}< / h1 >
< ul >
< li >
< a href = "{{ route " feeds " } } " > {{ t "Feeds" }}< / a >
< / li >
< li >
< a href = "{{ route " addSubscription " } } " > {{ t "Add subscription" }}< / a >
< / li >
< li >
< a href = "{{ route " export " } } " > {{ t "Export" }}< / a >
< / li >
< li >
< a href = "{{ route " import " } } " > {{ t "Import" }}< / a >
< / li >
< / ul >
< / section >
{{ if not .categories }}
< p class = "alert alert-error" > {{ t "There is no category!" }}< / p >
{{ else }}
{{ if ne .feed.ParsingErrorCount 0 }}
< div class = "alert alert-error" >
< h3 > {{ t "Last Parsing Error" }}< / h3 >
2018-01-04 21:32:36 -05:00
< p > {{ t .feed.ParsingErrorMsg }}< / p >
2017-11-20 00:10:04 -05:00
< / div >
{{ end }}
< form action = "{{ route " updateFeed " " feedID " . feed . ID } } " method = "post" autocomplete = "off" >
< input type = "hidden" name = "csrf" value = "{{ .csrf }}" >
{{ if .errorMessage }}
< div class = "alert alert-error" > {{ t .errorMessage }}< / div >
{{ end }}
< label for = "form-title" > {{ t "Title" }}< / label >
< input type = "text" name = "title" id = "form-title" value = "{{ .form.Title }}" required autofocus >
< label for = "form-site-url" > {{ t "Site URL" }}< / label >
< input type = "url" name = "site_url" id = "form-site-url" placeholder = "https://domain.tld/" value = "{{ .form.SiteURL }}" required >
< label for = "form-feed-url" > {{ t "Feed URL" }}< / label >
< input type = "url" name = "feed_url" id = "form-feed-url" placeholder = "https://domain.tld/" value = "{{ .form.FeedURL }}" required >
2018-06-20 01:58:29 -04:00
< label for = "form-username" > {{ t "Feed Username" }}< / label >
2018-06-30 21:05:51 -04:00
< input type = "text" name = "feed_username" id = "form-username" value = "{{ .form.Username }}" autocomplete = "new-password" >
2018-06-20 01:58:29 -04:00
< label for = "form-password" > {{ t "Feed Password" }}< / label >
2018-06-30 21:05:51 -04:00
< input type = "password" name = "feed_password" id = "form-password" value = "{{ .form.Password }}" autocomplete = "new-password" >
2018-06-20 01:58:29 -04:00
2017-12-10 23:51:04 -05:00
< label for = "form-scraper-rules" > {{ t "Scraper Rules" }}< / label >
< input type = "text" name = "scraper_rules" id = "form-scraper-rules" value = "{{ .form.ScraperRules }}" >
2017-12-12 01:16:32 -05:00
< label for = "form-rewrite-rules" > {{ t "Rewrite Rules" }}< / label >
< input type = "text" name = "rewrite_rules" id = "form-rewrite-rules" value = "{{ .form.RewriteRules }}" >
2017-11-20 00:10:04 -05:00
< label for = "form-category" > {{ t "Category" }}< / label >
< select id = "form-category" name = "category_id" >
{{ range .categories }}
< option value = "{{ .ID }}" { { if eq . ID $ . form . CategoryID } } selected = "selected" { { end } } > {{ .Title }}< / option >
{{ end }}
< / select >
2017-12-12 22:19:36 -05:00
< label > < input type = "checkbox" name = "crawler" value = "1" { { if . form . Crawler } } checked { { end } } > {{ t "Fetch original content" }}< / label >
2017-11-20 00:10:04 -05:00
< div class = "buttons" >
< button type = "submit" class = "button button-primary" data-label-loading = "{{ t " Loading . . . " } } " > {{ t "Update" }}< / button > {{ t "or" }} < a href = "{{ route " feeds " } } " > {{ t "cancel" }}< / a >
< / div >
< / form >
2017-12-26 23:58:16 -05:00
< div class = "panel" >
< ul >
2018-02-04 17:37:42 -05:00
< li > < strong > {{ t "Last checked:" }} < / strong > < time datetime = "{{ isodate .feed.CheckedAt }}" title = "{{ isodate .feed.CheckedAt }}" > {{ elapsed $.user.Timezone .feed.CheckedAt }}< / time > < / li >
2017-12-27 22:45:59 -05:00
< li > < strong > {{ t "ETag header:" }} < / strong > {{ if .feed.EtagHeader }}{{ .feed.EtagHeader }}{{ else }}{{ t "None" }}{{ end }}< / li >
< li > < strong > {{ t "LastModified header:" }} < / strong > {{ if .feed.LastModifiedHeader }}{{ .feed.LastModifiedHeader }}{{ else }}{{ t "None" }}{{ end }}< / li >
2017-12-26 23:58:16 -05:00
< / ul >
< / div >
2017-11-20 00:10:04 -05:00
{{ end }}
{{ end }}