diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/event.tpl | 10 | ||||
-rwxr-xr-x | view/event_form.tpl | 4 | ||||
-rwxr-xr-x | view/event_head.tpl | 67 | ||||
-rw-r--r-- | view/events-js.tpl | 6 | ||||
-rw-r--r-- | view/events.tpl | 24 | ||||
-rwxr-xr-x | view/theme/quattro/icons.less | 5 | ||||
-rwxr-xr-x | view/theme/quattro/style.css | 60 |
7 files changed, 171 insertions, 5 deletions
diff --git a/view/event.tpl b/view/event.tpl new file mode 100644 index 000000000..ac9f889ec --- /dev/null +++ b/view/event.tpl @@ -0,0 +1,10 @@ +{{ for $events as $event }} + <div class="event"> + + {{ if $event.item.author-name }}<a href="$event.item.author-link" ><img src="$event.item.author-avatar" height="32" width="32" />$event.item.author-name</a>{{ endif }} + $event.html + {{ if $event.item.plink }}<a href="$event.plink.0" title="$event.plink.1" target="external-link" class="plink-event-link icon s22 remote-link"></a>{{ endif }} + {{ if $event.edit }}<a href="$event.edit.0" title="$event.edit.1" class="edit-event-link icon s22 pencil"></a>{{ endif }} + </div> + <div class="clear"></div> +{{ endfor }} diff --git a/view/event_form.tpl b/view/event_form.tpl index 6de471aca..7d5f8cf4a 100755 --- a/view/event_form.tpl +++ b/view/event_form.tpl @@ -1,7 +1,7 @@ -<h3>$e_text</h3> +<h3>$title</h3> <p> -$e_desc +$desc </p> <form action="$post" method="post" > diff --git a/view/event_head.tpl b/view/event_head.tpl index fe0b8fe2a..498ac9941 100755 --- a/view/event_head.tpl +++ b/view/event_head.tpl @@ -1,3 +1,64 @@ +<link rel='stylesheet' type='text/css' href='$baseurl/library/fullcalendar/fullcalendar.css' /> +<script language="javascript" type="text/javascript" + src="$baseurl/library/fullcalendar/fullcalendar.min.js"></script> + +<script> + $(document).ready(function() { + $('#events-calendar').fullCalendar({ + events: '$baseurl/events/json/', + header: { + left: 'prev,next today', + center: 'title', + right: 'month,agendaWeek,agendaDay' + }, + timeFormat: 'H(:mm)', + eventClick: function(calEvent, jsEvent, view) { + $.get( + '$baseurl/events/?id='+calEvent.id, + function(data){ + $.fancybox(data); + } + ); + }, + + eventRender: function(event, element, view) { + //console.log(view.name); + if (event.item['author-name']==null) return; + switch(view.name){ + case "month": + element.find(".fc-event-title").html( + "<img src='{0}' style='height:10px;width:10px'>{1} : {2}".format( + event.item['author-avatar'], + event.item['author-name'], + event.title + )); + break; + case "agendaWeek": + element.find(".fc-event-title").html( + "<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format( + event.item['author-avatar'], + event.item['author-name'], + event.item.desc, + event.item.location + )); + break; + case "agendaDay": + element.find(".fc-event-title").html( + "<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format( + event.item['author-avatar'], + event.item['author-name'], + event.item.desc, + event.item.location + )); + break; + } + } + + }) + }); +</script> + + <script language="javascript" type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script> <script language="javascript" type="text/javascript"> @@ -24,9 +85,9 @@ tinyMCE.init({ theme_advanced_path : false, setup : function(ed) { ed.onInit.add(function(ed) { - ed.pasteAsPlainText = true; - }); - } + ed.pasteAsPlainText = true; + }); + } }); diff --git a/view/events-js.tpl b/view/events-js.tpl new file mode 100644 index 000000000..b0e182c56 --- /dev/null +++ b/view/events-js.tpl @@ -0,0 +1,6 @@ +$tabs +<h2>$title</h2> + +<div id="new-event-link"><a href="$new_event.0" >$new_event.1</a></div> + +<div id="events-calendar"></div> diff --git a/view/events.tpl b/view/events.tpl new file mode 100644 index 000000000..5a9787de3 --- /dev/null +++ b/view/events.tpl @@ -0,0 +1,24 @@ +$tabs +<h2>$title</h2> + +<div id="new-event-link"><a href="$new_event.0" >$new_event.1</a></div> + +<div id="event-calendar-wrapper"> + <a href="$previus.0" class="prevcal $previus.2"><div id="event-calendar-prev" class="icon s22 prev" title="$previus.1"></div></a> + $calendar + <a href="$next.0" class="nextcal $next.2"><div id="event-calendar-prev" class="icon s22 next" title="$next.1"></div></a> +</div> +<div class="event-calendar-end"></div> + + +{{ for $events as $event }} + <div class="event"> + {{ if $event.is_first }}<hr /><a name="link-$event.j" ><div class="event-list-date">$event.d</div></a>{{ endif }} + {{ if $event.item.author-name }}<a href="$event.item.author-link" ><img src="$event.item.author-avatar" height="32" width="32" />$event.item.author-name</a>{{ endif }} + $event.html + {{ if $event.item.plink }}<a href="$event.plink.0" title="$event.plink.1" target="external-link" class="plink-event-link icon s22 remote-link"></a>{{ endif }} + {{ if $event.edit }}<a href="$event.edit.0" title="$event.edit.1" class="edit-event-link icon s22 pencil"></a>{{ endif }} + </div> + <div class="clear"></div> + +{{ endfor }} diff --git a/view/theme/quattro/icons.less b/view/theme/quattro/icons.less index f87327703..e314fba1f 100755 --- a/view/theme/quattro/icons.less +++ b/view/theme/quattro/icons.less @@ -13,6 +13,11 @@ &.link { background-image: url("../../../images/icons/@{size}/link.png"); } &.lock { background-image: url("../../../images/icons/@{size}/lock.png"); } &.unlock { background-image: url("../../../images/icons/@{size}/unlock.png"); } + &.type-unkn { background-image: url("../../../images/icons/@{size}/zip.png"); } + &.type-audio{ background-image: url("../../../images/icons/@{size}/audio.png"); } + &.type-video{ background-image: url("../../../images/icons/@{size}/video.png"); } + &.type-image{ background-image: url("../../../images/icons/@{size}/image.png"); } + &.type-text { background-image: url("../../../images/icons/@{size}/text.png"); } } diff --git a/view/theme/quattro/style.css b/view/theme/quattro/style.css index 0f5db6fe1..4c24ade8e 100755 --- a/view/theme/quattro/style.css +++ b/view/theme/quattro/style.css @@ -48,6 +48,21 @@ .icon.s10.unlock { background-image: url("../../../images/icons/10/unlock.png"); } +.icon.s10.type-unkn { + background-image: url("../../../images/icons/10/zip.png"); +} +.icon.s10.type-audio { + background-image: url("../../../images/icons/10/audio.png"); +} +.icon.s10.type-video { + background-image: url("../../../images/icons/10/video.png"); +} +.icon.s10.type-image { + background-image: url("../../../images/icons/10/image.png"); +} +.icon.s10.type-text { + background-image: url("../../../images/icons/10/text.png"); +} .icon.s10.text { padding: 2px 0px 0px 15px; } @@ -85,6 +100,21 @@ .icon.s16.unlock { background-image: url("../../../images/icons/16/unlock.png"); } +.icon.s16.type-unkn { + background-image: url("../../../images/icons/16/zip.png"); +} +.icon.s16.type-audio { + background-image: url("../../../images/icons/16/audio.png"); +} +.icon.s16.type-video { + background-image: url("../../../images/icons/16/video.png"); +} +.icon.s16.type-image { + background-image: url("../../../images/icons/16/image.png"); +} +.icon.s16.type-text { + background-image: url("../../../images/icons/16/text.png"); +} .icon.s16.text { padding: 4px 0px 0px 20px; } @@ -122,6 +152,21 @@ .icon.s22.unlock { background-image: url("../../../images/icons/22/unlock.png"); } +.icon.s22.type-unkn { + background-image: url("../../../images/icons/22/zip.png"); +} +.icon.s22.type-audio { + background-image: url("../../../images/icons/22/audio.png"); +} +.icon.s22.type-video { + background-image: url("../../../images/icons/22/video.png"); +} +.icon.s22.type-image { + background-image: url("../../../images/icons/22/image.png"); +} +.icon.s22.type-text { + background-image: url("../../../images/icons/22/text.png"); +} .icon.s22.text { padding: 10px 0px 0px 25px; } @@ -159,6 +204,21 @@ .icon.s48.unlock { background-image: url("../../../images/icons/48/unlock.png"); } +.icon.s48.type-unkn { + background-image: url("../../../images/icons/48/zip.png"); +} +.icon.s48.type-audio { + background-image: url("../../../images/icons/48/audio.png"); +} +.icon.s48.type-video { + background-image: url("../../../images/icons/48/video.png"); +} +.icon.s48.type-image { + background-image: url("../../../images/icons/48/image.png"); +} +.icon.s48.type-text { + background-image: url("../../../images/icons/48/text.png"); +} /* global */ body { font-family: Liberation Sans, helvetica, arial, clean, sans-serif; |