mirror of
https://github.com/Ekokumppanit/ystavakylaecard.git
synced 2026-02-16 20:48:06 +00:00
- Creating cards now works. We use Open Sans to make texts beautiful
- Added card counts to default controller - Load images from our basecards folder in assets - Administration now includes card counts - Other misc improvements
This commit is contained in:
@@ -1,30 +1,25 @@
|
||||
|
||||
|
||||
<footer class="row">
|
||||
<footer class="pagefooter row">
|
||||
<div class="large-12 columns">
|
||||
<div class="panel">
|
||||
<a href="<?php echo site_url("yllapito"); ?>" class="loginlink">π</a>
|
||||
© Ystäväkylä-hanke, Ekokumppanit Oy, Ismo Vuorinen 2013
|
||||
©
|
||||
<a target="_blank" href="http://www.ystavakyla.fi">Ystäväkylä-hanke</a>,
|
||||
<a target="_blank" href="http://www.ekokumppanit.fi">Ekokumppanit Oy</a>,
|
||||
<a target="_blank" href="http://ivuorinen.com">Ismo Vuorinen</a>
|
||||
2013
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
// Assets spark
|
||||
assets_js(
|
||||
array(
|
||||
'jquery.min.js',
|
||||
'custom.modernizr.min.js', // Foundation flavored Modernizr
|
||||
'foundation.min.js', // Foundation 1.4.1
|
||||
'image-picker.min.js', // Image Picker 0.1.4
|
||||
'jquery.validate.min.js', // jQuery Validation Plugin 1.11.1
|
||||
'additional-methods.min.js',// jQuery Validation Methods
|
||||
'messages_fi.js', // jQuery Validation Plugin Finnish translation
|
||||
'jquery-ui.min.js', // jQuery UI 1.10.3
|
||||
'scripts.js' // Our scripts
|
||||
)
|
||||
footerAssets() // in application/helpers/ecards_helper.php
|
||||
);
|
||||
?>
|
||||
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
|
||||
|
||||
<!-- {elapsed_time} -->
|
||||
</body>
|
||||
|
||||
@@ -49,7 +49,7 @@ if (empty($page_title)) {
|
||||
<li><?= lnk("kaikki", "Listaa kaikki"); ?></li>
|
||||
<li class="divider"></li>
|
||||
<li class="has-dropdown">
|
||||
<?= lnk("info", "Tietoa"); ?>
|
||||
<?= lnk("info", "Tietoa") . "\n"; ?>
|
||||
<ul class="dropdown">
|
||||
<li><?= lnk("info#rekisteri", "Rekisteriseloste"); ?></li>
|
||||
<li><?= lnk("info#yhteystiedot", "Yhteystiedot"); ?></li>
|
||||
@@ -59,61 +59,84 @@ if (empty($page_title)) {
|
||||
<?php
|
||||
if (isset($user) and ! empty($user)) {
|
||||
|
||||
if (empty($count)) {
|
||||
$count->all = 0;
|
||||
$count->queue = 0;
|
||||
$count->private = 0;
|
||||
$count->public = 0;
|
||||
$count->hidden = 0;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<ul class="left">
|
||||
<li class="has-dropdown adminmenu">
|
||||
<a href="<?php echo site_url("yllapito"); ?>">
|
||||
|
||||
<?php
|
||||
if ($count->queue > 0) {
|
||||
?><span class="right label round"><?= $count->queue; ?></span><?php
|
||||
} ?>
|
||||
|
||||
Ylläpito (Moi <?php echo $user->firstname; ?>!)</a>
|
||||
<ul class="dropdown">
|
||||
<li class="has-dropdown">
|
||||
<?= lnk("yllapito/ecards", "Hallitse kortteja"); ?>
|
||||
<?= lnk("yllapito/ecards", "Hallitse kortteja") . "\n"; ?>
|
||||
<ul class="dropdown">
|
||||
<li>
|
||||
<a href="<?php echo site_url("yllapito/ecards/moderate");?>">
|
||||
<span class="right label round">0</span>
|
||||
Jonossa
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo site_url("yllapito/ecards/public");?>">
|
||||
<span class="right label round">0</span>
|
||||
Julkaistut
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo site_url("yllapito/ecards/private");?>">
|
||||
<span class="right label round">0</span>
|
||||
Privaatit
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo site_url("yllapito/ecards/deleted");?>">
|
||||
<span class="right label round">0</span>
|
||||
Hylätyt
|
||||
</a>
|
||||
</li>
|
||||
<li><?php
|
||||
$text = '<span class="right label round">'
|
||||
. $count->queue
|
||||
. '</span> Jonossa';
|
||||
echo lnk("yllapito/ecards/queue", $text);
|
||||
?></li>
|
||||
<li><?php
|
||||
$text = '<span class="right label round">'
|
||||
. $count->public
|
||||
. '</span> Julkaistut';
|
||||
echo lnk("yllapito/ecards/public", $text);
|
||||
?></li>
|
||||
<li><?php
|
||||
$text = '<span class="right label round">'
|
||||
. $count->private
|
||||
. '</span> Privaatit';
|
||||
echo lnk("yllapito/ecards/private", $text);
|
||||
?></li>
|
||||
<li><?php
|
||||
$text = '<span class="right label round">'
|
||||
. $count->hidden
|
||||
. '</span> Hylätyt';
|
||||
echo lnk("yllapito/ecards/hidden", $text);
|
||||
?></li>
|
||||
</ul>
|
||||
</li>
|
||||
<?php
|
||||
// Should the user see these?
|
||||
if ($user->can_modusers == "yes" || $user->can_seeusers == "yes") {
|
||||
?>
|
||||
<li class="has-dropdown">
|
||||
<a href="<?php echo site_url("yllapito/users"); ?>">Hallitse käyttäjiä</a>
|
||||
<?= lnk("yllapito/users", "Hallitse käyttäjiä") . "\n"; ?>
|
||||
<ul class="dropdown">
|
||||
<li>
|
||||
<a href="<?php echo site_url("yllapito/users/add");?>">
|
||||
Lisää käyttäjä
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php echo site_url("yllapito/users/list");?>">
|
||||
Listaa käyttäjät
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
if ($user->can_modusers == "yes") {
|
||||
echo "<li>"
|
||||
. lnk("yllapito/users/add", "Lisää käyttäjä")
|
||||
. "</li>\n";
|
||||
}
|
||||
if ($user->can_seeusers == "yes") {
|
||||
echo "<li>"
|
||||
. lnk("yllapito/users/list", "Listaa käyttäjät")
|
||||
. "</li>\n";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a class="logout" href="<?php echo site_url("yllapito/logout"); ?>">Kirjaudu ulos</a>
|
||||
</li>
|
||||
<li><a class="logout" href="<?php
|
||||
echo site_url("yllapito/logout"); ?>">Kirjaudu ulos</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -11,20 +11,29 @@ if (empty($amount)) {
|
||||
$amount = 5;
|
||||
}
|
||||
|
||||
for ($i=0; $i < $amount; $i++) {
|
||||
$url = site_url('/ecards/' . md5($i));
|
||||
echo "\n";
|
||||
$cards = $this->ecard
|
||||
->order_by('created_at', 'DESC')
|
||||
->limit($amount)
|
||||
->get_many_by('card_status', 'public');
|
||||
|
||||
$url = '<a href="'.$url.'" title="'.$i.'">';
|
||||
foreach ($cards as $card) {
|
||||
$url = site_url('/ecards/' . $card->hash);
|
||||
$img = site_url('assets/cards/' . $card->hash . '.png');
|
||||
$time = date("d.m.Y \k\l\o H.i", strtotime($card->created_at));
|
||||
|
||||
$url = '<a href="'.$url.'" title="'.$time.'">';
|
||||
|
||||
$img = '<img src="'.$img.'" alt="'.$time.'">';
|
||||
?>
|
||||
<li class="image-panel">
|
||||
<?php echo $url; ?>
|
||||
<img src="http://placekitten.com/800/500" alt="placeholder+image">
|
||||
<em><?php echo date("d.m.Y \k\l\o H.i", rand($t_start, $t_end)); ?></em>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="image-panel">
|
||||
<?php echo $url."\n"; ?>
|
||||
<?php echo $img; ?>
|
||||
<em><?php echo $time; ?></em>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
echo "\n";
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="row">
|
||||
<div class="large-6 small-12 columns">
|
||||
<div class="panel">
|
||||
<form id="ecard_form">
|
||||
<form id="ecard_form" method="post" action="<?php echo site_url('tallenna'); ?>">
|
||||
|
||||
<h2>Tiedot</h2>
|
||||
|
||||
@@ -124,6 +124,10 @@ if (! empty($images)) {
|
||||
<input type="hidden" id="sizeOf_message_title_h"
|
||||
name="sizeOf_message_title_h" value="">
|
||||
|
||||
<input type="hidden" id="sizeOf_image_w"
|
||||
name="sizeOf_image_w" value="">
|
||||
<input type="hidden" id="sizeOf_image_h"
|
||||
name="sizeOf_image_h" value="">
|
||||
|
||||
<input type="hidden" id="placeOf_message_text_y"
|
||||
name="placeOf_message_text_y" value="">
|
||||
|
||||
@@ -1,25 +1,18 @@
|
||||
|
||||
<?php
|
||||
$cards = rand(10, 200);
|
||||
$private = rand(4,100);
|
||||
$public = $cards-$private;
|
||||
|
||||
if( $public < 4 ) {
|
||||
$public = rand(10, 200);
|
||||
$private = $private + $public;
|
||||
$cards = $public + $private;
|
||||
}
|
||||
?>
|
||||
<div class="row">
|
||||
|
||||
<div class="large-12 columns">
|
||||
<div class="panel">
|
||||
<h2>Tässä kaikki Ystäväkylän sähköpostikortit!</h2>
|
||||
<p>Postikortit ovat järjestetty luomisjärjestykseen, uusimmat ensimmäiseksi. Tällä hetkellä postikortteja on kaikkiaan <strong><?=$cards;?></strong> kappaletta joista näytetään julkisesti <strong><?=$public;?></strong> kappaletta. Yksityisiä kortteja on <strong><?=$private;?></strong> kappaletta.</p>
|
||||
<p>
|
||||
Postikortit ovat järjestetty luomisjärjestykseen, uusimmat ensimmäiseksi.
|
||||
Tällä hetkellä postikortteja on kaikkiaan <strong><?=$count->all;?></strong> kappaletta joista
|
||||
näytetään julkisesti <strong><?=$count->public;?></strong> kappaletta.
|
||||
Yksityisiä kortteja on <strong><?=$count->private;?></strong> kappaletta.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('_partial_cardlist.php', array('amount' => $public)); ?>
|
||||
<?php $this->load->view('_partial_cardlist.php', array('amount' => $count->public)); ?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user