Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasKrais committed Mar 24, 2018
1 parent bf5ce38 commit 1fb7764
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 10 deletions.
5 changes: 3 additions & 2 deletions modules/60/1/output.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
// Entries
$entries = \D2U_Guestbook\Entry::getAll(TRUE);
$page_no = 0;

for($i = 0; $i < count($entries); $i++) {
$entry = $entries[$i];

Expand Down Expand Up @@ -53,8 +54,8 @@
print '<div class="col-12">'. nl2br($entry->description) .'</div>';
if($entry->rating > 0) {
print '<div class="col-12"><b>'. $tag_open .'d2u_guestbook_rating'. $tag_close .': ';
for($i = 1; $i <= 5; $i++) {
if($i <= $entry->rating) {
for($j = 1; $j <= 5; $j++) {
if($j <= $entry->rating) {
print ' <span class="icon star-full"></span>';
}
else {
Expand Down
4 changes: 2 additions & 2 deletions modules/60/1/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ guestbook-page {
padding: 1em;
text-align: center;
}
.page {
.page, .page:visited {
background-color: navi_color_bg;
border: 1px solid navi_color_bg;
color: navi_color_font;
color: navi_color_font !important;
padding: 0.25em 0.75em;
margin-right: 1em;
}
Expand Down
4 changes: 2 additions & 2 deletions modules/60/3/output.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ function click_stars(wert) {
print '<div class="col-12">'. nl2br($entry->description) .'</div>';
if($entry->rating > 0) {
print '<div class="col-12"><b>'. $tag_open .'d2u_guestbook_rating'. $tag_close .': ';
for($i = 1; $i <= 5; $i++) {
if($i <= $entry->rating) {
for($j = 1; $j <= 5; $j++) {
if($j <= $entry->rating) {
print ' <span class="icon star-full"></span>';
}
else {
Expand Down
25 changes: 25 additions & 0 deletions modules/60/3/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,29 @@ a.recommendation:hover {
.star-empty:before {
color: gold;
content: "\f006";
}

guestbook-page {
display: inline-block;
}
.guestbook-tab {
border: navi_color_bg 1px solid;
padding: 1em 1em 0 1em;
}
.page-selection {
background-color: article_color_box;
border-top: 1px solid navi_color_bg;
padding: 1em;
text-align: center;
}
.page, .page:visited {
background-color: navi_color_bg;
border: 1px solid navi_color_bg;
color: navi_color_font !important;
padding: 0.25em 0.75em;
margin-right: 1em;
}
.page:hover {
background-color: navi_color_font;
color: navi_color_bg;
}
6 changes: 3 additions & 3 deletions pages/entries.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
$form = (array) rex_post('form', 'array', []);

// Media fields and links need special treatment
$entry = new D2U_Guestbook\Entry($form['id']);
$entry = new D2U_Guestbook\Entry($form['entry_id']);
$entry->clang_id = $form['clang_id'];
$entry->name = $form['name'];
$entry->email = $form['email'];
Expand Down Expand Up @@ -41,7 +41,7 @@
else if(filter_input(INPUT_POST, "btn_delete") == 1 || $func == 'delete') {
if($entry_id == 0) {
$form = (array) rex_post('form', 'array', []);
$entry_id = $form['$entry_id'];
$entry_id = $form['entry_id'];
}
$entry = new D2U_Guestbook\Entry($entry_id);
$entry->delete();
Expand All @@ -65,7 +65,7 @@
<div class="panel panel-edit">
<header class="panel-heading"><div class="panel-title"><?php print rex_i18n::msg('d2u_guestbook_entries'); ?></div></header>
<div class="panel-body">
<input type="hidden" name="form[id]" value="<?php echo $entry_id; ?>">
<input type="hidden" name="form[entry_id]" value="<?php echo $entry_id; ?>">
<fieldset>
<legend><?php echo rex_i18n::msg('d2u_guestbook_entry'); ?></legend>
<div class="panel-body-wrapper slide">
Expand Down
3 changes: 2 additions & 1 deletion pages/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@
<h2>Support</h2>
<p>Fehlermeldungen bitte im <a href="https://github.com/TobiasKrais/d2u_guestbook" target="_blank">GitHub Repository</a> melden.</p>
<h2>Changelog</h2>
<p>1.0.2-DEV:</p>
<p>1.0.2:</p>
<ul>
<li>Bugfix: Löschen Button in Gästebuch Backend hat fatal error erzeugt.</li>
<li>Einträge können in mehrere JQuery Seiten unterteilt werden.</li>
<li>Einstellungsoption um auf Einträge antworten zu können.</li>
<li>Namespace "D2U_Guestbook" für Klasse "Entry" hinzugefügt: Achtung! Module müssen angepasst / aktualisiert werden.</li>
Expand Down

0 comments on commit 1fb7764

Please sign in to comment.