Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Favorites! Favorites evrywhere! #24

Merged
merged 1 commit into from
Jul 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions actdocs/templates/core/talk/schedule
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<thead>
<tr>
<th>{{Speaker}}</th>
<th>&nbsp;</th>
<th>{{Talk title}}</th>
[% IF global.config.talks_languages %]<th>{{Language}}</th>[% END %]
<th>{{Duration}}</th>
Expand All @@ -30,6 +31,8 @@
[% user_info(t.user) %]
</td>

<td width="30">[% PROCESS talk/fav_ajax onetalk = t %]</td>

<td>
[% IF t.type == 'Act::Event' %]
[% event_link(t) %]
Expand Down
20 changes: 20 additions & 0 deletions actdocs/templates/talk/fav_ajax
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[% IF global.request.user.has_registered %]
<a href="/ye2015/talk/[% onetalk.talk_id %]"
[%# For best toggling state, reversed test and tald_id stored in tag data- items: %]
[% IF global.request.user.is_my_talk(onetalk.talk_id) %]
title="{{remove from personal schedule}}"
data-toggle="tooltip" data-placement="top"
class="talk-checkbox"
data-talkfav="1" data-talkid="[% onetalk.talk_id %]"
data-titlerev="{{add to personal schedule}}">
<img src="/ye2015/img/fav-3.png" width="20px">
[% ELSE %]
title="{{add to personal schedule}}"
data-toggle="tooltip" data-placement="top"
class="talk-checkbox"
data-talkfav="0" data-talkid="[% onetalk.talk_id %]"
data-titlerev="{{remove from personal schedule}}">
<img src="/ye2015/img/no-fav-3.png" width="20px">
[% END %]
</a>
[% END %]
2 changes: 1 addition & 1 deletion actdocs/templates/talk/list
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[%
IF tag;
IF tag;
title = loc("List of talks tagged <tag>", tag);
ELSE;
title = loc("List of talks");
Expand Down
21 changes: 1 addition & 20 deletions actdocs/templates/talk/talk_list
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,7 @@
@date 14-Jun-2015
@desc Trying to make a star appearing close to the user's favorite talks. The star will also be a link to modify the choice
-->
[% IF global.request.user.has_registered %]
<a href="/ye2015/talk/[% t.talk_id %]"
[%# For best toggling state, reversed test and tald_id stored in tag data- items: %]
[% IF global.request.user.is_my_talk(t.talk_id) %]
title="{{remove from personal schedule}}"
data-toggle="tooltip" data-placement="top"
class="talk-checkbox"
data-talkfav="1" data-talkid="[% t.talk_id %]"
data-titlerev="{{add to personal schedule}}">
<img src="/ye2015/img/fav-3.png" width="20px">
[% ELSE %]
title="{{add to personal schedule}}"
data-toggle="tooltip" data-placement="top"
class="talk-checkbox"
data-talkfav="0" data-talkid="[% t.talk_id %]"
data-titlerev="{{remove from personal schedule}}">
<img src="/ye2015/img/no-fav-3.png" width="20px">
[% END %]
</a>
[% END %]
[% PROCESS talk/fav_ajax onetalk = t %]
</td>
<td>
[% talk_link(t) %]
Expand Down
6 changes: 6 additions & 0 deletions actdocs/templates/user/show
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,11 @@
<span class="label label-warning">{{Pending}}</span>
[% END %]
</td>
[% IF t.confirmed %]
<td width="30">
[% PROCESS talk/fav_ajax onetalk = t %]
</td>
[% END %]
<td>
[% talk_link(t) %]
</td>
Expand Down Expand Up @@ -206,6 +211,7 @@
<table class="table">
[% FOREACH t = mytalks %]
<tr>
<td width="30">[% PROCESS talk/fav_ajax onetalk = t %]</td>
<td>[% talk_link(t) %]</td>
</tr>
[% END %]
Expand Down