aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/status.tmpl13
-rw-r--r--templates/user.tmpl17
2 files changed, 30 insertions, 0 deletions
diff --git a/templates/status.tmpl b/templates/status.tmpl
index 1e3d514..6c255a0 100644
--- a/templates/status.tmpl
+++ b/templates/status.tmpl
@@ -46,6 +46,19 @@
<input type="submit" value="mute" class="btn-link more-link">
</form>
{{end}}
+ {{if .Bookmarked}}
+ <form action="/unbookmark/{{.ID}}" method="post" target="_self">
+ <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
+ <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}">
+ <input type="submit" value="unbookmark" class="btn-link more-link">
+ </form>
+ {{else}}
+ <form action="/bookmark/{{.ID}}" method="post" target="_self">
+ <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
+ <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}">
+ <input type="submit" value="bookmark" class="btn-link more-link">
+ </form>
+ {{end}}
{{if eq $.Ctx.UserID .Account.ID}}
<form action="/delete/{{.ID}}" method="post" target="_self">
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
diff --git a/templates/user.tmpl b/templates/user.tmpl
index cb21b8a..3bb7523 100644
--- a/templates/user.tmpl
+++ b/templates/user.tmpl
@@ -97,6 +97,11 @@
<a href="/user/{{.User.ID}}/followers"> followers ({{.User.FollowersCount}}) </a> -
<a href="/user/{{.User.ID}}/media"> media </a>
</div>
+ {{if .IsCurrent}}
+ <div>
+ <a href="/user/{{.User.ID}}/bookmarks"> bookmarks </a>
+ </div>
+ {{end}}
<div>
<a href="/usersearch/{{.User.ID}}"> search statuses </a>
</div>
@@ -111,6 +116,8 @@
<div class="page-title"> Statuses </div>
{{range .Statuses}}
{{template "status.tmpl" (WithContext . $.Ctx)}}
+{{else}}
+<div class="no-data-found">No data found</div>
{{end}}
{{else if eq .Type "following"}}
@@ -125,6 +132,16 @@
<div class="page-title"> Statuses with media </div>
{{range .Statuses}}
{{template "status.tmpl" (WithContext . $.Ctx)}}
+{{else}}
+<div class="no-data-found">No data found</div>
+{{end}}
+
+{{else if eq .Type "bookmarks"}}
+<div class="page-title"> Bookmarks </div>
+{{range .Statuses}}
+{{template "status.tmpl" (WithContext . $.Ctx)}}
+{{else}}
+<div class="no-data-found">No data found</div>
{{end}}
{{end}}