{{ 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}}