aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-11-25 22:55:07 +0100
committerMario Vavti <mario@mariovavti.com>2015-11-25 22:55:07 +0100
commit3ea84d7eab20947ac52dc7e6c205252f0a76c047 (patch)
tree9cb7c69c30fd108deb2f700fe5a88d24dba3d194
parenta80c45940e14d75ef91b39e62d8aab9e2efc01cc (diff)
downloadvolse-hubzilla-3ea84d7eab20947ac52dc7e6c205252f0a76c047.tar.gz
volse-hubzilla-3ea84d7eab20947ac52dc7e6c205252f0a76c047.tar.bz2
volse-hubzilla-3ea84d7eab20947ac52dc7e6c205252f0a76c047.zip
some basic event styling
-rw-r--r--include/event.php22
-rwxr-xr-xmod/events.php6
-rw-r--r--view/css/conversation.css16
-rw-r--r--view/theme/redbasic/css/style.css51
-rwxr-xr-xview/tpl/event.tpl2
5 files changed, 36 insertions, 61 deletions
diff --git a/include/event.php b/include/event.php
index e303ad232..9d111ca25 100644
--- a/include/event.php
+++ b/include/event.php
@@ -21,35 +21,37 @@ function format_event_html($ev) {
$bd_format = t('l F d, Y \@ g:i A') ; // Friday January 18, 2011 @ 8:01 AM
- $o = '<div class="vevent">' . "\r\n";
+ //todo: move this to template
- $o .= '<p class="summary event-summary">' . bbcode($ev['summary']) . '</p>' . "\r\n";
+ $o = '<div class="vevent">' . "\r\n";
- $o .= '<p class="description event-description">' . bbcode($ev['description']) . '</p>' . "\r\n";
+ $o .= '<div class="event-title"><h3><i class="icon-calendar"></i>&nbsp;' . bbcode($ev['summary']) . '</h3></div>' . "\r\n";
- $o .= '<p class="event-start">' . t('Starts:') . ' <abbr class="dtstart" title="'
+ $o .= '<div class="event-start"><span class="event-label">' . t('Starts:') . '</span>&nbsp;<span class="dtstart" title="'
. datetime_convert('UTC', 'UTC', $ev['start'], (($ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' ))
. '" >'
. (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(),
$ev['start'] , $bd_format ))
: day_translate(datetime_convert('UTC', 'UTC',
$ev['start'] , $bd_format)))
- . '</abbr></p>' . "\r\n";
+ . '</span></div>' . "\r\n";
if(! $ev['nofinish'])
- $o .= '<p class="event-end" >' . t('Finishes:') . ' <abbr class="dtend" title="'
+ $o .= '<div class="event-end" ><span class="event-label">' . t('Finishes:') . '</span>&nbsp;<span class="dtend" title="'
. datetime_convert('UTC','UTC',$ev['finish'], (($ev['adjust']) ? ATOM_TIME : 'Y-m-d\TH:i:s' ))
. '" >'
. (($ev['adjust']) ? day_translate(datetime_convert('UTC', date_default_timezone_get(),
$ev['finish'] , $bd_format ))
: day_translate(datetime_convert('UTC', 'UTC',
$ev['finish'] , $bd_format )))
- . '</abbr></p>' . "\r\n";
+ . '</span></div>' . "\r\n";
+
+ $o .= '<div class="event-description">' . bbcode($ev['description']) . '</div>' . "\r\n";
if(strlen($ev['location']))
- $o .= '<p class="event-location"> ' . t('Location:') . ' <span class="location">'
+ $o .= '<div class="event-location"><span class="event-label"> ' . t('Location:') . '</span>&nbsp;<span class="location">'
. bbcode($ev['location'])
- . '</span></p>' . "\r\n";
+ . '</span></div>' . "\r\n";
$o .= '</div>' . "\r\n";
@@ -887,7 +889,7 @@ function event_store_item($arr, $event) {
$item_arr['verb'] = ACTIVITY_POST;
$item_arr['item_wall'] = $item_wall;
$item_arr['item_origin'] = $item_origin;
- $item_arr['item_thread_top'] = $item_thread_top;;
+ $item_arr['item_thread_top'] = $item_thread_top;
$attach = array(array(
'href' => z_root() . '/events/ical/' . urlencode($event['event_hash']),
diff --git a/mod/events.php b/mod/events.php
index 0366c9b02..64d7dfb93 100755
--- a/mod/events.php
+++ b/mod/events.php
@@ -91,7 +91,11 @@ function events_post(&$a) {
linkify_tags($a, $location, local_channel());
$action = ($event_hash == '') ? 'new' : "event/" . $event_hash;
- $onerror_url = $a->get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish&type=$type";
+
+ //fixme: this url gives a wsod if there is a linebreak detected in one of the variables ($desc or $location)
+ //$onerror_url = $a->get_baseurl() . "/events/" . $action . "?summary=$summary&description=$desc&location=$location&start=$start_text&finish=$finish_text&adjust=$adjust&nofinish=$nofinish&type=$type";
+ $onerror_url = $a->get_baseurl() . "/events";
+
if(strcmp($finish,$start) < 0 && !$nofinish) {
notice( t('Event can not end before it has started.') . EOL);
if(intval($_REQUEST['preview'])) {
diff --git a/view/css/conversation.css b/view/css/conversation.css
index 08b51d2fa..6a64e7cc2 100644
--- a/view/css/conversation.css
+++ b/view/css/conversation.css
@@ -245,3 +245,19 @@ a.wall-item-name-link {
color: #FF0000;
font-size: 1em !important;
}
+
+/* event item */
+
+.event-title h3 {
+ font-weight: bold;
+}
+
+.event-title,
+.event-end,
+.event-description {
+ padding-bottom: 10px;
+}
+
+.event-label {
+ font-weight: bold;
+}
diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css
index 959550dbd..4dd58dd4c 100644
--- a/view/theme/redbasic/css/style.css
+++ b/view/theme/redbasic/css/style.css
@@ -857,41 +857,10 @@ nav .acpopup {
border-color: #ccc !important;
}
-.eventcal {
- float: left;
- font-size: 20px;
-}
-
#event-summary-text {
margin-top: 15px;
}
-.event-wrapper {
- width: 400px;
- height: auto;
- padding: 10px;
-}
-
-.vevent {
- max-width: 100%;
- margin: 10px;
- padding: 10px;
- border: 1px solid #CCCCCC;
-}
-
-.vevent .event-summary {
- margin: 10px;
- font-weight: bold;
-}
-
-.vevent .event-description, .vevent .event-location {
- margin-left: 10px;
- margin-right: 10px;
-}
-.vevent .event-start {
- margin-left: 10px;
- margin-right: 10px;
-}
#new-event-link {
margin-bottom: 10px;
@@ -904,29 +873,13 @@ nav .acpopup {
margin-bottom: 15px;
}
-.event-description:before {
- content: url('../../../../images/calendar.png');
- margin-right: 15px;
-}
-
-.event-start, .event-end {
- margin-left: 10px;
- width: 300px;
- clear: both;
-}
-
.event-owner img {
- padding: 10px;
+ padding-bottom: 10px;
+ padding-right: 10px;
}
.event-buttons {
margin-top: 10px;
- margin-left: 10px;
-}
-
-.event-start .dtstart, .event-end .dtend {
- float: right;
- margin-right: 10px;
}
.event-list-date {
diff --git a/view/tpl/event.tpl b/view/tpl/event.tpl
index c1793c3e7..3fc2063ef 100755
--- a/view/tpl/event.tpl
+++ b/view/tpl/event.tpl
@@ -2,7 +2,7 @@
<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}}" height="64" width="64" />{{$event.item.author.xchan_name}}</a>{{/if}}
+ {{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">