github.com/Azareal/Gosora@v0.0.0-20210729070923-553e66b59003/templates/profile.html (about) 1 {{template "header.html" . }} 2 <div id="profile_container"class="colstack"> 3 4 <div id="profile_left_lane"class="colstack_left"> 5 <div id="profile_left_pane"class="rowmenu"> 6 <div class="topBlock"> 7 <div class="rowitem avatarRow"> 8 <a href="{{.ProfileOwner.Avatar}}"><img src="{{.ProfileOwner.Avatar}}"class="avatar"alt="Avatar"title="{{.ProfileOwner.Name}}'s Avatar"aria-hidden="true"></a> 9 </div> 10 <div class="rowitem nameRow"> 11 <span class="profileName"title="{{.ProfileOwner.Name}}">{{.ProfileOwner.Name}}</span>{{if .ProfileOwner.Tag}}<span class="username"title="{{.ProfileOwner.Tag}}">{{.ProfileOwner.Tag}}</span>{{end}} 12 </div> 13 </div> 14 <div class="levelBlock"> 15 <div class="rowitem passive"> 16 <div class="profile_menu_item level_inprogress{{if eq .CurrentScore 0}} level_zero{{end}}"> 17 <div class="levelBit"{{if ne .CurrentScore 0}}style="width:{{.Percentage}}%"{{end}}> 18 <a>{{level .ProfileOwner.Level}}</a> 19 </div> 20 <div class="progressWrap"{{/**{{if ne .CurrentScore 0}}style="width:40%"{{end}}**/}}> 21 <div>{{.CurrentScore}} / {{.NextScore}}</div> 22 </div> 23 </div> 24 </div> 25 </div> 26 <div class="passiveBlock"> 27 {{if not .CurrentUser.Loggedin}}<div class="rowitem passive"> 28 <a class="profile_menu_item">{{lang "profile.login_for_options"}}</a> 29 </div>{{else}} 30 {{if .CanMessage}}<div class="rowitem passive"> 31 <a href="/user/convos/create/?with={{.ProfileOwner.ID}}"class="profile_menu_item">{{lang "profile.send_message"}}</a> 32 </div>{{end}} 33 <!--<div class="rowitem passive"> 34 <a class="profile_menu_item">{{lang "profile.add_friend"}}</a> 35 </div>--> 36 37 {{if (.CurrentUser.IsSuperMod) and not (.ProfileOwner.IsSuperMod)}}<div class="rowitem passive"> 38 {{if .ProfileOwner.IsBanned}}<a href="/users/unban/{{.ProfileOwner.ID}}?s={{.CurrentUser.Session}}"class="profile_menu_item">{{lang "profile.unban"}}</a> 39 {{else}}<a href="#ban_user"class="profile_menu_item">{{lang "profile.ban"}}</a>{{end}} 40 </div> 41 <div class="rowitem passive"> 42 <a href="#delete_posts"class="profile_menu_item">{{lang "profile.delete_posts"}}</a> 43 </div> 44 {{end}} 45 46 <div class="rowitem passive"> 47 {{if .Blocked}}<a href="/user/block/remove/{{.ProfileOwner.ID}}"class="profile_menu_item">{{lang "profile.unblock"}}</a>{{else}}<a href="/user/block/create/{{.ProfileOwner.ID}}"class="profile_menu_item">{{lang "profile.block"}}</a>{{end}} 48 </div> 49 <div class="rowitem passive"> 50 <a href="/report/submit/{{.ProfileOwner.ID}}?s={{.CurrentUser.Session}}&type=user"class="profile_menu_item report_item"aria-label="{{lang "profile.report_user_aria"}}"title="{{lang "profile.report_user_tooltip"}}"></a> 51 </div> 52 {{end}} 53 </div> 54 </div> 55 </div> 56 57 <div id="profile_right_lane"class="colstack_right"> 58 {{if .CurrentUser.Loggedin}} 59 {{if .CurrentUser.Perms.BanUsers}} 60 <!-- TODO: Inline the display:none; CSS --> 61 <div id="ban_user_head"class="colstack_item colstack_head hash_hide ban_user_hash"style="display:none;"> 62 <div class="rowitem"><h1><a>{{lang "profile.ban_user_head"}}</a></h1></div> 63 </div> 64 <form id="ban_user_form"class="hash_hide ban_user_hash"action="/users/ban/submit/{{.ProfileOwner.ID}}?s={{.CurrentUser.Session}}"method="post"style="display:none;"> 65 <div class="the_form"> 66 {{/** TODO: Put a JS duration calculator here instead of this text? **/}} 67 <div class="colline">{{lang "profile.ban_user_notice"}}</div> 68 <div class="colstack_item"> 69 <div class="formrow real_first_child"> 70 <div class="formitem formlabel"><a>{{lang "profile.ban_user_days"}}</a></div> 71 <div class="formitem"> 72 <input name="dur-days"type="number"value=0 min=0> 73 </div> 74 </div> 75 <div class="formrow"> 76 <div class="formitem formlabel"><a>{{lang "profile.ban_user_weeks"}}</a></div> 77 <div class="formitem"> 78 <input name="dur-weeks"type="number"value=0 min=0> 79 </div> 80 </div> 81 <div class="formrow"> 82 <div class="formitem formlabel"><a>{{lang "profile.ban_user_months"}}</a></div> 83 <div class="formitem"> 84 <input name="dur-months"type="number"value=0 min=0> 85 </div> 86 </div> 87 <div class="formrow"> 88 <div class="formitem formlabel"><a>{{lang "profile.ban_delete_posts"}}</a></div> 89 <div class="formitem"><select name="delete-posts"> 90 <option value=1>{{lang "option_yes"}}</option> 91 <option selected value=0>{{lang "option_no"}}</option> 92 </select></div> 93 </div> 94 {{/**<!--<div class="formrow"> 95 <div class="formitem formlabel"><a>{{lang "profile.ban_user_reason"}}</a></div> 96 <div class="formitem"><textarea name="ban-reason" placeholder="A really horrible person"required></textarea></div> 97 </div>-->**/}} 98 <div class="formrow"> 99 <div class="formitem"><button name="ban-button"class="formbutton form_middle_button">{{lang "profile.ban_user_button"}}</button></div> 100 </div> 101 </div> 102 </div> 103 </form> 104 105 <div id="delete_posts_head"class="colstack_item colstack_head hash_hide delete_posts_hash"style="display:none;"> 106 <div class="rowitem"><h1><a>{{lang "profile.delete_posts_head"}}</a></h1></div> 107 </div> 108 <form id="delete_posts_form"class="hash_hide delete_posts_hash"action="/users/delete-posts/submit/{{.ProfileOwner.ID}}?s={{.CurrentUser.Session}}"method="post"style="display:none;"> 109 <div class="the_form"> 110 <div class="colline">{{langf "profile.delete_posts_notice" .ProfileOwner.Posts}}</div> 111 <div class="colstack_item"> 112 <div class="formrow real_first_child"> 113 <div class="formitem"><button name="delete-posts-button"class="formbutton form_middle_button">{{lang "profile.delete_posts_button"}}</button></div> 114 </div> 115 </div> 116 </div> 117 </form> 118 {{end}} 119 {{end}} 120 121 <div id="profile_comments_head"class="colstack_item colstack_head hash_hide"> 122 <div class="rowitem"><h1><a>{{lang "profile.comments_head"}}</a></h1></div> 123 </div>{{if .ShowComments}} 124 <div id="profile_comments"class="colstack_item hash_hide">{{template "profile_comments_row.html" . }}</div>{{end}} 125 126 {{if .CurrentUser.Loggedin}} 127 {{if .CanComment}} 128 <form id="profile_comments_form"class="hash_hide"action="/profile/reply/create/?s={{.CurrentUser.Session}}"method="post"> 129 <input name="uid"value='{{.ProfileOwner.ID}}'type="hidden"> 130 <div class="colstack_item topic_reply_form"style="border-top:none;"> 131 <div class="formrow"> 132 <div class="formitem"><textarea class="input_content"name="content"placeholder="{{lang "profile.comments_form_content"}}"></textarea></div> 133 </div> 134 <div class="formrow quick_button_row"> 135 <div class="formitem"><button name="reply-button"class="formbutton">{{lang "profile.comments_form_button"}}</button></div> 136 </div> 137 </div> 138 </form> 139 {{end}} 140 {{else}} 141 <div class="colstack_item"style="border-top:none;"> 142 <div class="rowitem passive">{{lang "profile.comments_form_guest"}}</div> 143 </div> 144 {{end}} 145 </div> 146 147 </div> 148 {{template "footer.html" . }}