aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/template/html/edit_feed.html
diff options
context:
space:
mode:
Diffstat (limited to 'server/template/html/edit_feed.html')
-rw-r--r--server/template/html/edit_feed.html61
1 files changed, 61 insertions, 0 deletions
diff --git a/server/template/html/edit_feed.html b/server/template/html/edit_feed.html
new file mode 100644
index 0000000..fac2a9b
--- /dev/null
+++ b/server/template/html/edit_feed.html
@@ -0,0 +1,61 @@
+{{ 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>
+ {{ .feed.ParsingErrorMsg }}
+ </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>
+
+ <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>
+
+ <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>
+{{ end }}
+
+{{ end }} \ No newline at end of file