Events calendar now displays each event on its own page. Fixed some width problems.
This commit is contained in:
parent
b0ddddab30
commit
afcad66b68
3 changed files with 25 additions and 11 deletions
|
|
@ -388,11 +388,12 @@ sub showMessage {
|
|||
%message = getMessage($session{form}{mid});
|
||||
if ($message{messageId}) {
|
||||
$html .= '<h1>'.$message{subject}.'</h1>';
|
||||
$html .= '<table width="100%" cellpadding=3 cellspacing=1 border=0><tr><td class="tableHeader">';
|
||||
$html .= '<table width="100%" cellpadding=3 cellspacing=1 border=0><tr>';
|
||||
$html .= '<td class="tableHeader" width="100%" valign="top">';
|
||||
$html .= formatHeader($message{subject},$message{userId},$message{username},$message{dateOfPost},
|
||||
$message{views},'',$message{status});
|
||||
$html .= '</td>';
|
||||
$html .= '<td rowspan=2 valign="top" class="tableMenu" nowrap>';
|
||||
$html .= '<td rowspan=2 valign="top" class="tableMenu" nowrap="1">';
|
||||
if (canPostReply($_[1],\%message)) {
|
||||
$html .= '<a href="'.WebGUI::URL::page('func=post&replyTo='.$session{form}{mid}.'&wid='
|
||||
.$session{form}{wid}.'&sid='.$session{form}{sid})
|
||||
|
|
|
|||
|
|
@ -63,11 +63,8 @@ sub _calendarLayout {
|
|||
.editIcon('func=editEvent&wid='.$_[0]->get("wobjectId").'&eid='.$event{eventId})
|
||||
.' ';
|
||||
}
|
||||
if ($event{description}) {
|
||||
$message .= '<a href=\'javascript:popUp("'.$event{description}.'");\'>'.$event{name}.'</a>';
|
||||
} else {
|
||||
$message .= $event{name};
|
||||
}
|
||||
$message .= '<a href="'.WebGUI::URL::page('wid='.$_[0]->get("wobjectId")
|
||||
.'&func=viewEvent&eid='.$event{eventId}).'">'.$event{name}.'</a>';
|
||||
$message .= '<br>';
|
||||
if ($event{startDate} == $event{endDate}) {
|
||||
$calendar->addcontent(epochToHuman($event{startDate},"%D"),$message);
|
||||
|
|
@ -405,8 +402,24 @@ sub www_viewEvent {
|
|||
my ($output, %event);
|
||||
tie %event, 'Tie::CPHash';
|
||||
%event = WebGUI::SQL->quickHash("select * from EventsCalendar_event where eventId=$session{form}{eid}");
|
||||
|
||||
return $output;
|
||||
$output = '<h1>'.$event{name}.'</h1>';
|
||||
$output .= '<table width="100%" cellspacing="0" cellpadding="5" border="0">';
|
||||
$output .= '<tr>';
|
||||
$output .= '<td valign="top" class="tableHeader" width="100%">';
|
||||
$output .= '<b>'.WebGUI::International::get(14,$namespace).':</b> '.epochToHuman($event{startDate},"%z").'<br>';
|
||||
$output .= '<b>'.WebGUI::International::get(15,$namespace).':</b> '.epochToHuman($event{endDate},"%z").'<br>';
|
||||
$output .= '</td><td valign="top" class="tableMenu" nowrap="1">';
|
||||
if (WebGUI::Privilege::canEditPage()) {
|
||||
$output .= '<a href="'.WebGUI::URL::page('func=editEvent&eid='.$session{form}{eid}.'&wid='
|
||||
.$session{form}{wid}).'">'.WebGUI::International::get(575).'</a><br>';
|
||||
$output .= '<a href="'.WebGUI::URL::page('func=deleteEvent&eid='.$session{form}{eid}.
|
||||
'&wid='.$session{form}{wid}.'&rid='.$event{recurringEventId}).'">'
|
||||
.WebGUI::International::get(576).'</a><br>';
|
||||
}
|
||||
$output .= '</td></tr>';
|
||||
$output .= '</table>';
|
||||
$output .= $event{description};
|
||||
return WebGUI::Macro::process($output);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
|
|
@ -654,14 +654,14 @@ sub www_viewSubmission {
|
|||
$submission{content} =~ s/\^\-\;//g;
|
||||
$output = "<h1>".$submission{title}."</h1>";
|
||||
$output .= '<table width="100%" cellpadding=2 cellspacing=1 border=0>';
|
||||
$output .= '<tr><td class="tableHeader">';
|
||||
$output .= '<tr><td valign="top" class="tableHeader" width="100%">';
|
||||
#---header
|
||||
$output .= '<b>'.WebGUI::International::get(22,$namespace).'</b> <a href="'.
|
||||
WebGUI::URL::page('op=viewProfile&uid='.$submission{userId}).'">'.$submission{username}.'</a><br>';
|
||||
$output .= '<b>'.WebGUI::International::get(23,$namespace).'</b> '.epochToHuman($submission{dateSubmitted},"%z %Z")."<br>";
|
||||
$output .= '<b>'.WebGUI::International::get(14,$namespace).':</b> '.$submissionStatus{$submission{status}}.'<br>';
|
||||
$output .= '<b>'.WebGUI::International::get(514).':</b> '.$submission{views}.'<br>';
|
||||
$output .= '</td><td rowspan="2" class="tableMenu" nowrap valign="top">';
|
||||
$output .= '</td><td rowspan="2" class="tableMenu" nowrap="1" valign="top">';
|
||||
#---menu
|
||||
@data = WebGUI::SQL->quickArray("select max(submissionId) from UserSubmission_submission
|
||||
where wobjectId=$submission{wobjectId} and submissionId<$submission{submissionId}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue