aboutsummaryrefslogtreecommitdiffstats
path: root/view/tpl
diff options
context:
space:
mode:
authormarijus <mario@mariovavti.com>2014-10-25 15:23:20 +0200
committermarijus <mario@mariovavti.com>2014-10-25 15:23:20 +0200
commit6497e78956825dc845eb8a998369154c4d823a95 (patch)
tree7969b4f1105661ee7d81ea3eb8447386e7e43514 /view/tpl
parent59e19a1f45a3502559dd1df33c453aa2f99cb995 (diff)
downloadvolse-hubzilla-6497e78956825dc845eb8a998369154c4d823a95.tar.gz
volse-hubzilla-6497e78956825dc845eb8a998369154c4d823a95.tar.bz2
volse-hubzilla-6497e78956825dc845eb8a998369154c4d823a95.zip
some work on photos like/dislike
Diffstat (limited to 'view/tpl')
-rwxr-xr-xview/tpl/nav.tpl3
-rwxr-xr-xview/tpl/photo_view.tpl85
2 files changed, 77 insertions, 11 deletions
diff --git a/view/tpl/nav.tpl b/view/tpl/nav.tpl
index a283b35a8..a8a7a7da7 100755
--- a/view/tpl/nav.tpl
+++ b/view/tpl/nav.tpl
@@ -50,7 +50,8 @@
{{if $nav.register}}<li class="{{$nav.register.2}}"><a href="{{$nav.register.0}}" title="{{$nav.register.3}}" >{{$nav.register.1}}</a><li>{{/if}}
{{if !$userinfo}}
{{if $nav.loginmenu}}
- <li class="{{$nav.loginmenu.0.2}} hidden-xs"><a data-toggle="dropdown" data-target="#" href="{{$nav.loginmenu.0.0}}" title="{{$nav.loginmenu.0.3}}" >{{$nav.loginmenu.0.1}} <span class="caret" id="usermenu-caret"></span></a>
+ <li class="{{$nav.loginmenu.0.2}} hidden-xs">
+ <a data-toggle="dropdown" data-target="#" href="{{$nav.loginmenu.0.0}}" title="{{$nav.loginmenu.0.3}}" >{{$nav.loginmenu.0.1}} <span class="caret" id="usermenu-caret"></span></a>
<ul class="dropdown-menu" role="menu">
{{foreach $nav.loginmenu as $loginmenu}}
<li role="presentation"><a class="{{$loginmenu.2}}" href="{{$loginmenu.0}}" title="{{$loginmenu.3}}" role="menuitem">{{$loginmenu.1}}</a></li>
diff --git a/view/tpl/photo_view.tpl b/view/tpl/photo_view.tpl
index ddbce5b0b..f6b709247 100755
--- a/view/tpl/photo_view.tpl
+++ b/view/tpl/photo_view.tpl
@@ -81,24 +81,89 @@
<div id="photo-photo"><a href="{{$photo.href}}" title="{{$photo.title}}" onclick="$.colorbox({href: '{{$photo.href}}'}); return false;"><img style="width: 100%;" src="{{$photo.src}}"></a></div>
<div id="photo-photo-end"></div>
+ {{if $tags}}
+ <div class="photo-item-tools-left" id="in-this-photo">
+ <span id="in-this-photo-text">{{$tag_hdr}}</span>
+ {{foreach $tags as $t}}
+ {{$t.0}}{{if $edit}}<span id="tag-remove">&nbsp;<a href="{{$t.1}}"><i class="icon-remove"></i></a>&nbsp;</span>{{/if}}
+ {{/foreach}}
+ </div>
+ {{/if}}
+
<div class="photo-item-tools">
- {{if $tags}}
+ {{if $like_count || $dislike_count}}
<div class="photo-item-tools-left pull-left">
- <div id="in-this-photo">
- <span id="in-this-photo-text">{{$tag_hdr}}</span>
- {{foreach $tags as $t}}
- {{$t.0}}{{if $edit}}<span id="tag-remove">&nbsp;<a href="{{$t.1}}"><i class="icon-remove"></i></a>&nbsp;</span>{{/if}}
- {{/foreach}}
+ <div class="{{if $like_count && $dislike_count}}btn-group{{/if}}">
+ {{if $like_count}}
+ <div class="btn-group">
+ <button type="button" class="btn btn-default btn-sm wall-item-like dropdown-toggle" data-toggle="dropdown" id="wall-item-like-{{$id}}">{{$like_count}} {{$like_button_label}}</button>
+ {{if $like_list_part}}
+ <ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-like-{{$item.id}}">{{foreach $like_list_part as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
+ {{else}}
+ <ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-like-{{$item.id}}">{{foreach $like_list as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
+ {{/if}}
+ </div>
+ {{/if}}
+ {{if $dislike_count}}
+ <div class="btn-group">
+ <button type="button" class="btn btn-default btn-sm wall-item-dislike dropdown-toggle" data-toggle="dropdown" id="wall-item-dislike-{{$id}}">{{$dislike_count}} {{$dislike_button_label}}</button>
+ {{if $dislike_list_part}}
+ <ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-dislike-{{$id}}">{{foreach $dislike_list_part as $disliker}}<li role="presentation">{{$disliker}}</li>{{/foreach}}</ul>
+ {{else}}
+ <ul class="dropdown-menu" role="menu" aria-labelledby="wall-item-dislike-{{$id}}">{{foreach $dislike_list as $disliker}}<li role="presentation">{{$disliker}}</li>{{/foreach}}</ul>
+ {{/if}}
+ </div>
+ {{/if}}
+ </div>
+ {{if $like_list_part}}
+ <div class="modal" id="likeModal-{{$id}}">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+ <h4 class="modal-title">{{$like_modal_title}}</h4>
+ </div>
+ <div class="modal-body">
+ <ul>{{foreach $like_list as $liker}}<li role="presentation">{{$liker}}</li>{{/foreach}}</ul>
+ </div>
+ <div class="modal-footer clear">
+ <button type="button" class="btn btn-default" data-dismiss="modal">{{$modal_dismiss}}</button>
+ </div>
+ </div><!-- /.modal-content -->
+ </div><!-- /.modal-dialog -->
+ </div><!-- /.modal -->
+ {{/if}}
+ {{if $dislike_list_part}}
+ <div class="modal" id="dislikeModal-{{$id}}">
+ <div class="modal-dialog">
+ <div class="modal-content">
+ <div class="modal-header">
+ <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
+ <h4 class="modal-title">{{$dislike_modal_title}}</h4>
+ </div>
+ <div class="modal-body">
+ <ul>{{foreach $dislike_list as $disliker}}<li role="presentation">{{$disliker}}</li>{{/foreach}}</ul>
+ </div>
+ <div class="modal-footer clear">
+ <button type="button" class="btn btn-default" data-dismiss="modal">{{$modal_dismiss}}</button>
+ </div>
+ </div><!-- /.modal-content -->
+ </div><!-- /.modal-dialog -->
+ </div><!-- /.modal -->
+ {{/if}}
</div>
</div>
{{/if}}
+
{{if $likebuttons}}
<div class="photo-item-tools-right btn-group pull-right">
- <i class="icon-thumbs-up-alt item-tool btn btn-default btn-sm" title="{{$likethis}}" onclick="dolike({{$id}},'like'); return false"></i>
- <i class="icon-thumbs-down-alt item-tool btn btn-default btn-sm" title="{{$nolike}}" onclick="dolike({{$id}},'dislike'); return false"></i>
- {{$like}}
- {{$dislike}}
+ <button type="button" class="btn btn-default btn-sm" onclick="dolike({{$id}},'like'); return false">
+ <i class="icon-thumbs-up-alt" title="{{$likethis}}"></i>
+ </button>
+ <button type="button" class="btn btn-default btn-sm" onclick="dolike({{$id}},'dislike'); return false">
+ <i class="icon-thumbs-down-alt" title="{{$nolike}}"></i>
+ </button>
</div>
<div id="like-rotator-{{$id}}" class="like-rotator pull-right"></div>
{{/if}}