示例#1
0
 public function returnDateLabels($start, $end, $add_time = true, $add_end_time = true, $add_year = false)
 {
     $ret_str = '';
     if (date('d.m.Y', $start) == date('d.m.Y', $end) && ($add_time == false || $add_end_time == false)) {
         $ret_str .= '<abbr class="dtstart" title="' . gmdate('Y-m-d\\TH:i:s\\Z', $start) . '">' . fi_kilonkipinat_website::returnDateLabel('start', $start, $end, $add_time, $add_year) . '</abbr>';
         $ret_str .= '<abbr class="dtend" title="' . gmdate('Y-m-d\\TH:i:s\\Z', $end) . '"></abbr>';
     } elseif ($start > $end) {
         $ret_str .= '<abbr class="dtstart" title="' . gmdate('Y-m-d\\TH:i:s\\Z', $start) . '">' . fi_kilonkipinat_website::returnDateLabel('start', $start, $end, $add_time, $add_year) . '</abbr>';
     } else {
         $ret_str .= '<abbr class="dtstart" title="' . gmdate('Y-m-d\\TH:i:s\\Z', $start) . '">' . fi_kilonkipinat_website::returnDateLabel('start', $start, $end, $add_time, $add_year) . '</abbr>';
         $ret_str .= ' - ';
         $ret_str .= '<abbr class="dtend" title="' . gmdate('Y-m-d\\TH:i:s\\Z', $end) . '">' . fi_kilonkipinat_website::returnDateLabel('end', $start, $end, $add_end_time, $add_year) . '</abbr>';
     }
     return $ret_str;
 }
<?php

$_MIDCOM->enable_jquery();
$_MIDCOM->i18n->set_language('fi', false);
$_MIDCOM->componentloader->load('fi.kilonkipinat.website');
// check if we have just logged in and do things related to login
fi_kilonkipinat_website::check_login();
示例#3
0
	<tbody>
<?php 
    foreach ($results as $result) {
        $persons = fi_kilonkipinat_emailmappings_viewer::loadPersons($result->persons);
        $persons_str = '';
        foreach ($persons as $person) {
            if ($persons_str != '') {
                $persons_str .= ', ';
            }
            $persons_str .= $person->firstname . ' ' . $person->lastname;
        }
        echo "\t<tr>\n";
        echo "\t\t<td>" . $result->name . "</td>\n";
        echo "\t\t<td>" . $persons_str . "</td>\n";
        echo "\t\t<td>";
        echo fi_kilonkipinat_website::returnDate($result->metadata->revised, 'medium');
        echo "</td>\n";
        echo "\t\t<td>";
        echo "&nbsp;&nbsp;&nbsp;";
        if ($result->can_do('midgard:update')) {
            echo "<a title=\"Muokkaa\" href=\"" . $prefix . 'emailmapping/edit/' . $result->guid . "/\"><img src=\"/midcom-static/fi.kilonkipinat.emailmappings/email_edit.png\" /></a>";
        }
        echo "&nbsp;&nbsp;&nbsp;";
        if ($result->can_do('midgard:delete')) {
            echo "<a title=\"Poista\" href=\"" . $prefix . 'emailmapping/delete/' . $result->guid . "/\"><img src=\"/midcom-static/fi.kilonkipinat.emailmappings/email_delete.png\" /></a>";
        }
        echo "&nbsp;&nbsp;&nbsp;";
        echo "</td>\n";
        echo "\t</tr>\n";
    }
    ?>
示例#4
0
<?php

//$data =& $_MIDCOM->get_custom_context_data('request_data');
$published = "<abbr title=\"" . strftime('%Y-%m-%dT%H:%M:%S%z', $data['item']->metadata->published) . "\">" . fi_kilonkipinat_website::returnDate($data['item']->metadata->published, 'medium') . "</abbr>";
$view = $data['item'];
$title = $data['item']->title;
if (strlen($data['item']->url) > 0) {
    $url = $data['item']->url;
} else {
    $url = $data['permalinks']->create_permalink($view->guid);
}
$item_topic = new midcom_db_topic($data['item']->topic);
$topic_title = $item_topic->extra;
$topic_link = '<a href="/midcom-permalink-' . $item_topic->guid . '/">' . $topic_title . '</a>';
$target = '';
if (strstr($url, 'http') && !strstr($url, 'kilonkipinat.fi')) {
    $target = ' target="_blank"';
}
?>
<div class="hentry">
    <h4 class="entry-title"><a&(target:h); href="&(url);" rel="bookmark">&(title:h);</a></h4>
    <p class="published">
        &(published:h); [&(topic_link:h);]
    </p>
</div>
示例#5
0
if (count($todos) > 0) {
    echo "<table class=\"tablesorter\">\n";
    echo "\t<thead>";
    echo "\t\t<tr>";
    echo "\t\t\t<th class=\"header\">Otsikko</th>";
    echo "\t\t\t<th class=\"{sorter: 'fiDate'} header\">Parasta ennen</th>";
    echo "\t\t\t<th class=\"header\">Nakittaja</th>";
    echo "\t\t\t<th class=\"header\">Paino</th>";
    echo "\t\t\t<th class=\"header\">Ryhmä</th>";
    echo "\t\t</tr>";
    echo "\t</thead>";
    foreach ($todos as $todo) {
        echo "\t\t<tr>";
        //        echo "\t\t\t<td><a href=\"".$prefix.'view_todo/'.$todo->guid."\">".$todo->title."</a></td>\n";
        echo "\t\t\t<td><a class=\"fi_kilonkipinat_todos_todoitem_modal_link\" href=\"#" . $todo->guid . "\">" . $todo->title . "</a></td>\n";
        echo "\t\t\t<td>" . fi_kilonkipinat_website::returnDate(strtotime($todo->deadline), 'short') . "</td>";
        echo "\t\t\t<td>";
        if ($todo->supervisor != 0) {
            $supervisor = new fi_kilonkipinat_account_person_dba($todo->supervisor);
            if ($supervisor->id == $todo->supervisor) {
                if ($supervisor->nickname != '') {
                    $nickname = $supervisor->nickname;
                } else {
                    $nickname = $supervisor->firstname . ' ' . $supervisor->lastname;
                }
                echo '<a href="/extranet/nettisivut/kayttajat/person/view/' . $supervisor->guid . '/" title="' . $supervisor->firstname . ' ' . $supervisor->lastname . '">' . $nickname . '</a>';
            } else {
                echo "&nbsp;";
            }
        } else {
            echo "&nbsp;";
示例#6
0
        } elseif ($show_location_txt) {
            ?>
            <div id="fi_kilonkipinat_events_event_location">
                <h3>Paikka: &(event.locationtext:h);</h3>
            </div>
        <?php 
        }
    }
    ?>
    </div>
<?php 
} elseif ($show_location_txt) {
    ?>
    <div id="fi_kilonkipinat_events_event_location">
        <h3>Paikka: Paikka: &(event.locationtext:h);</h3>
    </div>
<?php 
}
$comments_node = fi_kilonkipinat_website::seek_comments($data);
if ($comments_node) {
    $comments_url = $comments_node[MIDCOM_NAV_RELATIVEURL] . "comment/{$event->guid}";
}
?>
<div id="fi_kilonkipinat_events_event_comments">
<?php 
if (isset($comments_url)) {
    $_MIDCOM->dynamic_load($comments_url);
}
?>
</div>
</div>
示例#7
0
<?php

$prefix = $data['prefix'];
$event = $data['meeting'];
$start_ts = strtotime($data['meeting']->start);
$end_ts = strtotime($data['meeting']->end);
$view_url = $prefix . 'view_event/' . $event->guid;
?>
<div class="fi_kilonkipinat_events_list_item">
    <h3><a href="&(view_url:h);">&(event.title:h);</a><?php 
if ($event->visibility == FI_KILONKIPINAT_EVENTS_EVENT_VISIBILITY_SECURE) {
    echo ' *';
}
?>
</h3>
    <div class="dates">
        <?php 
if ($event->hideendtime) {
    $add_end_time = false;
} else {
    $add_end_time = true;
}
if ($event->allday) {
    echo fi_kilonkipinat_website::returnDateLabels($start_ts, $end_ts, false, false);
} else {
    echo fi_kilonkipinat_website::returnDateLabels($start_ts, $end_ts, true, $add_end_time);
}
?>
    </div>
</div>
示例#8
0
			</tr>
<?php 
    }
}
?>
		<tr>
			<th>Paino</th>
			<td><?php 
echo $_MIDCOM->i18n->get_string('weight_' . $todo->weight, 'fi.kilonkipinat.todos');
?>
</td>
		</tr>
		<tr>
			<th>Parasta ennen</th>
			<td><?php 
echo fi_kilonkipinat_website::returnDate(strtotime($todo->deadline), 'short');
?>
</td>
		</tr>
	</table>
	<div id="fi_kilonkipinat_todos_todoitem_info_content">
		<strong>Kuvaus:</strong> <?php 
echo $todo->content;
?>
	</div>
	<?php 
// No comments topic specified, autoprobe
$comments_node = midcom_helper_find_node_by_component('net.nehmer.comments');
if ($comments_node) {
    $comments_url = $comments_node[MIDCOM_NAV_RELATIVEURL] . "comment/{$todo->guid}";
}
示例#9
0
<?php

// Available request keys: datamanager, article, view_url, article_counter
$view = $data['datamanager']->get_content_html();
$view_counter = $data['article_counter'];
$article_count = $data['article_count'];
$class_str = '';
if ($view_counter == 0) {
    $class_str = ' first';
} elseif ($view_counter == $article_count - 1) {
    $class_str = ' last';
}
$published = sprintf($data['l10n']->get('posted on %s.'), "<abbr title=\"" . strftime('%Y-%m-%dT%H:%M:%S%z', $data['article']->metadata->published) . "\">" . fi_kilonkipinat_website::returnDate($data['article']->metadata->published, 'medium') . "</abbr>");
if (array_key_exists('comments_enable', $data)) {
    $published .= " <a href=\"{$data['view_url']}#net_nehmer_comments_{$data['article']->guid}\">" . sprintf($data['l10n']->get('%s comments'), net_nehmer_comments_comment::count_by_objectguid($data['article']->guid)) . "</a>.";
}
?>

<div class="hentry counter_&(view_counter); &(class_str);">
    <h2 class="entry-title"><a href="&(data['view_url']);" rel="bookmark">&(view['title']:h);</a></h2>
    <p class="published">&(published:h);</p>
</div>
示例#10
0
$view = $data['view_location'];
?>
<h1>Paikka: &(view['title']:h);</h1>
<p>Kuvaus:</p>
&(view['content']:h);
<div id="fi_kilonkipinat_events_location_location">
<?php 
$location_object = $data['object'];
if (class_exists('org_routamc_positioning_object')) {
    $object_position = new org_routamc_positioning_object($location_object);
    $coordinates = $object_position->get_coordinates();
    if ($coordinates['latitude'] && $coordinates['longitude']) {
        if (array_key_exists('location', $view) && trim(strip_tags($view['location'])) != '') {
            ?>
                <div class="loc">
                    Osoite: <span class="location">&(view['location']:h);</span>
                </div>
            <?php 
        }
        $map = new org_routamc_positioning_map('fi_kilonkipinat_events_event_map');
        $map->zoom_level = $location_object->locationzoom;
        $marker = array('path' => '/style/img/pin-kkp.png');
        $map->add_object($location_object, $marker);
        $map->show();
    }
}
if (isset($data['datamanager']->types["downloads"])) {
    echo fi_kilonkipinat_website::getDownloads($data['datamanager']->types, 'downloads', 'Tiedostot');
}
?>
</div>