aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/js/main.js6
-rw-r--r--view/theme/redbasic/css/style.css8
-rwxr-xr-xview/tpl/profile_advanced.tpl20
3 files changed, 34 insertions, 0 deletions
diff --git a/view/js/main.js b/view/js/main.js
index f43ae4d1b..cb492b9de 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -695,6 +695,12 @@ function updateConvItems(mode,data) {
liking = 1;
}
+ function doprofilelike(ident,verb) {
+ $.get('like/' + ident + '?verb=' + verb, function() { window.location.href=window.location.href; });
+ }
+
+
+
function dosubthread(ident) {
unpause();
$('#like-rotator-' + ident.toString()).spin('tiny');
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 59586fb59..589a48192 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -372,6 +372,14 @@ aside li {
margin-top: 10px;
}
+#profile-like {
+ margin-left: 15px;
+}
+
+#profile-like-wrapper {
+ margin-bottom: 15px;
+}
+
.fn {
padding: 0px 0px 5px 0px;
diff --git a/view/tpl/profile_advanced.tpl b/view/tpl/profile_advanced.tpl
index f25608430..0faa54637 100755
--- a/view/tpl/profile_advanced.tpl
+++ b/view/tpl/profile_advanced.tpl
@@ -1,6 +1,26 @@
<div id="profile-content-wrapper" class="generic-content-wrapper">
<h2>{{$title}}</h2>
+{{if $profile.canlike || $profile.like_count}}
+<div id="profile-like-wrapper">
+{{if $profile.canlike}}
+ <button type="button" class="btn btn-default btn-sm" onclick="doprofilelike('profile/' + '{{$profile.profile_guid}}','like'); return false;">
+ <i class="icon-thumbs-up-alt" title="{{$profile.likethis}}"></i>
+ </button>
+{{/if}}
+
+
+{{if $profile.like_count}}
+<div class="btn-group">
+<button type="button" class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="profile-like">{{$profile.like_count}} {{$profile.like_button_label}}</button>
+{{if $profile.likers}}
+<ul class="dropdown-menu" role="menu" aria-labelledby="profile-like">{{foreach $profile.likers as $liker}}<li role="presentation"><a href="{{$liker.url}}">{{$liker.name}}</a></li>{{/foreach}}</ul>
+{{/if}}
+</div>
+{{/if}}
+</div>
+{{/if}}
+
<dl id="aprofile-fullname" class="aprofile">
<dt>{{$profile.fullname.0}}</dt>
<dd>{{$profile.fullname.1}}</dd>