Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/templates/_profile_menu.html
akuma06 80ab45d81e New profile user menu (#761)
* Fixing user profile page

* Modified css rule word-break to break-word
* Modified torrents table in user page to look like home listing
* Made the button reset api look like a button according to actual
design
* Modified user menu to have the same spacing accross templates
* User menu is in another template file loaded dynamically

* Fixing the access to userprofile variable

* Menu needs to access the user profile with $.UserProfile
* User Notification template variable removed, instead using user
profile variable

* Reverting back theme flickering fix
2017-05-26 14:33:55 +02:00

47 lignes
2,2 Kio
HTML

{{ define "profile_menu" }}
<div class="profile-sidebar">
<!-- SIDEBAR USERPIC -->
<div class="profile-userpic">
<img src="{{ getAvatar $.UserProfile.MD5 130 }}" alt="{{ $.UserProfile.Username }}">
</div>
<!-- END SIDEBAR USERPIC -->
<!-- SIDEBAR USER TITLE -->
<div class="profile-usertitle">
<p class="profile-usertitle-name">
{{ $.UserProfile.Username}}
</p>
<p class="profile-usertitle-job">
{{GetRole $.UserProfile}}
</p>
</div>
<!-- END SIDEBAR USER TITLE -->
<!-- SIDEBAR BUTTONS -->
<div class="profile-userbuttons">
{{if gt $.User.ID 0 }}
{{if not (CurrentUserIdentical $.User $.UserProfile.ID) }}
{{if not (IsFollower $.UserProfile $.User)}}
<a class="form-input" href="{{ genRoute "user_follow" "id" ( print $.UserProfile.ID ) "username" $.UserProfile.Username }}" class="btn btn-success btn-sm">{{ call $.T "follow"}}</a><br>
{{else}}
<a class="form-input" href="{{ genRoute "user_follow" "id" ( print $.UserProfile.ID ) "username" $.UserProfile.Username }}" class="btn btn-danger btn-sm">{{ call $.T "unfollow"}}</a><br>
{{end}}
{{end}}
{{end}}
<!-- <button type="button" class="btn btn-danger btn-sm">Message</button> -->
</div>
<br>
<!-- END SIDEBAR BUTTONS -->
<!-- SIDEBAR MENU -->
<div class="profile-usermenu">
<a class="form-input" href="{{ genRoute "user_profile" "id" ( print $.UserProfile.ID ) "username" $.UserProfile.Username }}"><i class="glyphicon glyphicon-home"></i>{{call $.T "torrents"}}</a> <br>
{{if gt $.User.ID 0 }}
{{ if CurrentUserIdentical $.User $.UserProfile.ID }}
<a class="form-input" href="{{ genRoute "user_notifications" "id" (print $.UserProfile.ID) "username" $.UserProfile.Username }}"><i class="glyphicon glyphicon-bell"></i>{{ call $.T "my_notifications"}}</a> <br>
{{end}}
{{if CurrentOrAdmin $.User $.UserProfile.ID }}
<a class="form-input" href="{{ genRoute "user_profile_details" "id" ( print $.UserProfile.ID ) "username" $.UserProfile.Username }}"><i class="glyphicon glyphicon-user"></i>{{call $.T "settings"}}</a> <br>
{{end}}
{{end}}
</div>
<!-- END MENU -->
</div>
{{end}}