Skip to content

Commit

Permalink
refine mail handling refs #15
Browse files Browse the repository at this point in the history
  • Loading branch information
aklassen committed Jun 5, 2013
1 parent d8c3d87 commit 21b4e7b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion models/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ static function get_month($month)
$ausgabe = "April";
break;
case 5:
$ausgabe = "Mail";
$ausgabe = "Mai";
break;
case 6:
$ausgabe = "Juni";
Expand Down
2 changes: 1 addition & 1 deletion models/mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ static function get_mails($user_id, $intervall, $inbox = true)
$stmt = $db->prepare("SELECT $user_fields, $msg_fields, $msg_user_fields
FROM message
JOIN message_user ON message.message_id = message_user.message_id
JOIN auth_user_md5 ON message_user.user_id = auth_user_md5.user_id
LEFT JOIN auth_user_md5 ON message.autor_id = auth_user_md5.user_id
".$where."
ORDER BY message.mkdate DESC
LIMIT 0,30");
Expand Down
8 changes: 4 additions & 4 deletions views/mails/_list_in.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
{
$wochentag = \Studip\Mobile\Helper::get_weekday(date("N", $mail['mkdate']));
$monat = \Studip\Mobile\Helper::get_month(date("m", $mail['mkdate']));
$day = $wochentag.date(", j. ",$mail['mkdate']).$monat.date(", Y",$mail['mkdate']);
$day = $wochentag.date(", j. ",$mail['mkdate']).$monat.date(", Y",$mail['mkdate']);

$dayCount = date("j.m.Y",$mail['mkdate']);
?>
<li data-role="list-divider"><?= Studip\Mobile\Helper::out($day) ?></li>
<li data-role="list-divider"><?= $wochentag.date(", j. ",$mail['mkdate']).$monat.date(", Y",$mail['mkdate']); ?></li>
<?php
}

Expand All @@ -56,10 +56,10 @@
\Studip\Mobile\Helper::getColorball("#000000",10,true);
}
?>
<h3><?= Studip\Mobile\Helper::out($mail['author']) ?></h3>
<h3><?= $mail['author_id'] != '____%system%____' ? Studip\Mobile\Helper::out($mail['author']) : 'Stud.IP-System' ?></h3>
<p><strong><?= Studip\Mobile\Helper::out($mail['title']) ?></strong></p>

<p><?= Studip\Mobile\Helper::fout($mail['message']) ?>
<p><?= Studip\Mobile\Helper::fout(mila($mail['message'])) ?>
<p class="ui-li-aside"><strong><?= Studip\Mobile\Helper::out($time) ?></strong></p>
</a></li>

Expand Down
4 changes: 2 additions & 2 deletions views/mails/show_msg.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<li data-role="fieldcontain">
<p style="padding-top:12px;">
<strong>An:</strong> <?= Studip\Mobile\Helper::out($mail[0]['receiver']) ?><br>
<strong>Von:</strong> <?= ($mail[0]['author'] != ' ') ? Studip\Mobile\Helper::out($mail[0]['author']) : ' Stud.IP System' ?>
<strong>Von:</strong> <?= $mail[0]['author_id'] != '____%system%____' ? Studip\Mobile\Helper::out($mail[0]['author']) : 'Stud.IP-System' ?>
</p>
<span class="ui-li-count"> <?=$time ?> Uhr</span>
</li>
Expand All @@ -57,7 +57,7 @@
<div data-role="navbar" data-iconspos="top">
<ul class="ui-grid-a">
<li class="ui-block-a"><a id="marikieren" href="<?= $controller->url_for("mails/show_msg",$mail[0]['id'], true) ?>" data-theme="c" data-icon="star" data-transition="flip">Markieren</a></li>
<? if (empty($mail[0]['author_id'])) : ?>
<? if ($mail[0]['author_id'] == '____%system%____') : ?>
<li class="ui-block-b"><a id="antworten" data-theme="c" data-icon="check" data-transition="slideup" class='ui-disabled'>Antworten</a></li>
<? else: ?>
<li class="ui-block-b"><a id="antworten" href="<?= $controller->url_for("mails/write",$mail[0]['author_id']) ?>" data-theme="c" data-icon="check" data-transition="slideup">Antworten</a></li>
Expand Down

0 comments on commit 21b4e7b

Please sign in to comment.