diff options
author | redmatrix <git@macgirvin.com> | 2016-02-24 18:54:52 -0800 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-02-24 18:54:52 -0800 |
commit | c95d7c69eb3135f137390323a09eb105776ce29c (patch) | |
tree | 5183b1d8e9fde8ff9e7628ad0160c0b78bd35f30 /view | |
parent | 6300f47cdcd921141b8f98b71d373d53aa3d80f2 (diff) | |
download | volse-hubzilla-c95d7c69eb3135f137390323a09eb105776ce29c.tar.gz volse-hubzilla-c95d7c69eb3135f137390323a09eb105776ce29c.tar.bz2 volse-hubzilla-c95d7c69eb3135f137390323a09eb105776ce29c.zip |
issue #216 - calendar sharing
Diffstat (limited to 'view')
-rw-r--r-- | view/pdl/mod_cal.pdl | 3 | ||||
-rwxr-xr-x | view/tpl/event_cal.tpl | 14 | ||||
-rwxr-xr-x | view/tpl/event_head.tpl | 13 | ||||
-rwxr-xr-x | view/tpl/events_cal-js.tpl | 17 |
4 files changed, 44 insertions, 3 deletions
diff --git a/view/pdl/mod_cal.pdl b/view/pdl/mod_cal.pdl new file mode 100644 index 000000000..f12bf39c3 --- /dev/null +++ b/view/pdl/mod_cal.pdl @@ -0,0 +1,3 @@ +[region=aside] +[widget=fullprofile][/widget] +[/region] diff --git a/view/tpl/event_cal.tpl b/view/tpl/event_cal.tpl new file mode 100755 index 000000000..61458b263 --- /dev/null +++ b/view/tpl/event_cal.tpl @@ -0,0 +1,14 @@ +{{foreach $events as $event}} + <div class="event-wrapper"> + <div class="event"> + <div class="event-owner"> + {{if $event.item.author.xchan_name}}<a href="{{$event.item.author.xchan_url}}" ><img src="{{$event.item.author.xchan_photo_s}}">{{$event.item.author.xchan_name}}</a>{{/if}} + </div> + {{$event.html}} + <div class="event-buttons"> + {{if $event.item.plink}}<a href="{{$event.plink.0}}" title="{{$event.plink.1}}" class="plink-event-link"><i class="icon-external-link btn btn-default" ></i></a>{{/if}} + </div> + <div class="clear"></div> + </div> + </div> +{{/foreach}} diff --git a/view/tpl/event_head.tpl b/view/tpl/event_head.tpl index dc98d14b3..5083c5835 100755 --- a/view/tpl/event_head.tpl +++ b/view/tpl/event_head.tpl @@ -6,7 +6,7 @@ <script> function showEvent(eventid) { $.get( - '{{$baseurl}}/events/?id='+eventid, + '{{$baseurl}}{{$module_url}}/?id='+eventid, function(data){ $.colorbox({ scrolling: false, html: data, onComplete: function() { $.colorbox.resize(); }}); } @@ -36,7 +36,7 @@ $(document).ready(function() { $('#events-calendar').fullCalendar({ - events: '{{$baseurl}}/events/json', + events: '{{$baseurl}}{{$module_url}}/json', header: false, lang: '{{$lang}}', firstDay: {{$first_day}}, @@ -109,10 +109,17 @@ }); // center on date + // @fixme does not work for cal/$nick module_url var args=location.href.replace(baseurl,"").split("/"); + {{if $modparams == 2}} + if (args.length>=5) { + $("#events-calendar").fullCalendar('gotoDate',args[3] , args[4]-1); + } + {{else}} if (args.length>=4) { $("#events-calendar").fullCalendar('gotoDate',args[2] , args[3]-1); - } + } + {{/if}} // show event popup var hash = location.hash.split("-") diff --git a/view/tpl/events_cal-js.tpl b/view/tpl/events_cal-js.tpl new file mode 100755 index 000000000..b3c7ff03b --- /dev/null +++ b/view/tpl/events_cal-js.tpl @@ -0,0 +1,17 @@ +<div class="generic-content-wrapper"> + <div class="section-title-wrapper"> + <div class="pull-right"> + <div class="btn-group"> + <button class="btn btn-default btn-xs" onclick="changeView('prev', false);" title="{{$prev}}"><i class="icon-backward"></i></button> + <button id="events-spinner" class="btn btn-default btn-xs" onclick="changeView('today', false);" title="{{$today}}"><i class="icon-bullseye"></i></button> + <button class="btn btn-default btn-xs" onclick="changeView('next', false);" title="{{$next}}"><i class="icon-forward"></i></button> + </div> + </div> + <h2 id="title"></h2> + <div class="clear"></div> + </div> + <div class="clear"></div> + <div class="section-content-wrapper-np"> + <div id="events-calendar"></div> + </div> +</div> |