CSS3 powarr

This commit is contained in:
Shish 2012-02-22 14:27:56 +00:00
parent 2e66ca44d7
commit a4f2c417ec
19 changed files with 38 additions and 70 deletions

View file

@ -186,10 +186,7 @@ class ArtistsTheme extends Themelet {
, 'member' => 'Member'
);
foreach ($artists as $artist)
{
$oe = ($n++ % 2 == 0) ? "even" : "odd";
foreach ($artists as $artist) {
if ($artist['type'] != 'artist')
$artist['name'] = str_replace("_", " ", $artist['name']);
@ -199,7 +196,7 @@ class ArtistsTheme extends Themelet {
$edit_link = "<a href='".make_link($editionLinkActionArray[$artist['type']].$artist['id'])."'>Edit</a>";
$del_link = "<a href='".make_link($deletionLinkActionArray[$artist['type']].$artist['id'])."'>Delete</a>";
$html .= "<tr class='$oe'>".
$html .= "<tr>".
"<td class='left'>".$elementLink;
//if ($artist['type'] == 'member')
@ -352,7 +349,7 @@ class ArtistsTheme extends Themelet {
$html .= " <tr>
</thead>
<tr class='".(($n++ % 2 == 0) ? "even" : "odd")."'>
<tr>
<td class='left'>Name:</td>
<td class='left'>".$artist_link."</td>";
if ($userIsLogged) $html .= "<td></td>";
@ -365,7 +362,7 @@ class ArtistsTheme extends Themelet {
$aliasEditLink = "<a href='".make_link("artist/alias/edit/".$aliases[0]['alias_id'])."'>Edit</a>";
$aliasDeleteLink = "<a href='".make_link("artist/alias/delete/".$aliases[0]['alias_id'])."'>Delete</a>";
$html .= "<tr class='".(($n++ % 2 == 0) ? "even" : "odd")."'>
$html .= "<tr>
<td class='left'>Aliases:</td>
<td class='left'>".$aliasViewLink."</td>";
@ -385,7 +382,7 @@ class ArtistsTheme extends Themelet {
$aliasEditLink = "<a href='".make_link("artist/alias/edit/".$aliases[$i]['alias_id'])."'>Edit</a>";
$aliasDeleteLink = "<a href='".make_link("artist/alias/delete/".$aliases[$i]['alias_id'])."'>Delete</a>";
$html .= "<tr class='".(($n++ % 2 == 0) ? "even" : "odd")."'>
$html .= "<tr>
<td class='left'>&nbsp;</td>
<td class='left'>".$aliasViewLink."</td>";
if ($userIsLogged)
@ -404,7 +401,7 @@ class ArtistsTheme extends Themelet {
$memberEditLink = "<a href='".make_link("artist/member/edit/".$members[0]['id'])."'>Edit</a>";
$memberDeleteLink = "<a href='".make_link("artist/member/delete/".$members[0]['id'])."'>Delete</a>";
$html .= "<tr class='".(($n++ % 2 == 0) ? "even" : "odd")."'>
$html .= "<tr>
<td class='left'>Members:</td>
<td class='left'>".$memberViewLink."</td>";
if ($userIsLogged)
@ -422,7 +419,7 @@ class ArtistsTheme extends Themelet {
$memberEditLink = "<a href='".make_link("artist/member/edit/".$members[$i]['id'])."'>Edit</a>";
$memberDeleteLink = "<a href='".make_link("artist/member/delete/".$members[$i]['id'])."'>Delete</a>";
$html .= "<tr class='".(($n++ % 2 == 0) ? "even" : "odd")."'>
$html .= "<tr>
<td class='left'>&nbsp;</td>
<td class='left'>".$memberViewLink."</td>";
if ($userIsLogged)
@ -441,7 +438,7 @@ class ArtistsTheme extends Themelet {
$urlEditLink = "<a href='".make_link("artist/url/edit/".$urls[0]['id'])."'>Edit</a>";
$urlDeleteLink = "<a href='".make_link("artist/url/delete/".$urls[0]['id'])."'>Delete</a>";
$html .= "<tr class='".(($n++ % 2 == 0) ? "even" : "odd")."'>
$html .= "<tr>
<td class='left'>URLs:</td>
<td class='left'>".$urlViewLink."</td>";
@ -461,7 +458,7 @@ class ArtistsTheme extends Themelet {
$urlEditLink = "<a href='".make_link("artist/url/edit/".$urls[$i]['id'])."'>Edit</a>";
$urlDeleteLink = "<a href='".make_link("artist/url/delete/".$urls[$i]['id'])."'>Delete</a>";
$html .= "<tr class='".(($n++ % 2 == 0) ? "even" : "odd")."'>
$html .= "<tr>
<td class='left'>&nbsp;</td>
<td class='left'>".$urlViewLink."</td>";
if ($userIsLogged)
@ -476,7 +473,7 @@ class ArtistsTheme extends Themelet {
}
$html .=
"<tr class='".(($n++ % 2 == 0) ? "even" : "odd")."'>
"<tr>
<td class='left'>Notes:</td>
<td class='left'>".$artist["notes"]."</td>";
if ($userIsLogged) $html .= "<td></td>";

View file

@ -23,10 +23,6 @@ class BlotterTheme extends Themelet {
$page->add_block(new Block(null, $html, $position, 20));
}
private function is_odd($number) {
return $number & 1; // 0 = even, 1 = odd
}
private function get_html_for_blotter_editor($entries) {
global $user;
@ -66,11 +62,9 @@ class BlotterTheme extends Themelet {
$entry_text = $entries[$i]['entry_text'];
if($entries[$i]['important'] == 'Y') { $important = 'Y'; } else { $important = 'N'; }
if(!$this->is_odd($i)) {$tr_class = "odd";}
if($this->is_odd($i)) {$tr_class = "even";}
// Add the new table row(s)
$table_rows .=
"<tr class='{$tr_class}'>
"<tr>
<td>$entry_date</td>
<td>$entry_text</td>
<td>$important</td>

View file

@ -113,8 +113,6 @@ class ForumTheme extends Themelet {
$poster = User::by_name($post["user_name"]);
$gravatar = $poster->get_avatar_html();
$oe = ($n++ % 2 == 0) ? "even" : "odd";
if ($post["user_admin"] == "Y") {
$rank = "<sup>admin</sup>";
} else {
@ -135,7 +133,7 @@ class ForumTheme extends Themelet {
$delete_link = "";
}
$html .= "<tr class='$oe'>".
$html .= "<tr>".
"<td class='forum_user'>".$user."<br>".$rank."<br>".$gravatar."</td>".
"<td class='forum_message'>".$message."</td>"."</tr>
<tr class='$oe'>

View file

@ -24,9 +24,8 @@ class ImageBanTheme extends Themelet {
$h_bans = "";
$n = 0;
foreach($bans as $ban) {
$oe = ($n++ % 2 == 0) ? "even" : "odd";
$h_bans .= "
<tr class='$oe'>
<tr>
<td width='30%'>{$ban['hash']}</td>
<td>{$ban['reason']}</td>
<td width='10%'>

View file

@ -19,9 +19,8 @@ class IPBanTheme extends Themelet {
$prefix2 = ($database->engine->name == "sqlite" ? "users." : "");
foreach($bans as $ban) {
$end_human = date('Y-m-d', $ban[$prefix.'end_timestamp']);
$oe = ($n++ % 2 == 0) ? "even" : "odd";
$h_bans .= "
<tr class='$oe'>
<tr>
<td width='12%'>{$ban[$prefix.'ip']}</td>
<td>{$ban[$prefix.'reason']}</td>
<td width='10%'>{$ban['banner_name']}</td>

View file

@ -44,9 +44,8 @@ class LogDatabaseTheme extends Themelet {
reset($events); // rewind to first element in array.
foreach($events as $event) {
$oe = ($n++ % 2 == 0) ? "even" : "odd";
$c = $this->pri_to_col($event['priority']);
$table .= "<tr style='color: $c' class='$oe'>";
$table .= "<tr style='color: $c'>";
$table .= "<td>".str_replace(" ", "&nbsp;", $event['date_sent'])."</td>";
$table .= "<td>".$event['section']."</td>";
if($event['username'] == "Anonymous") {

View file

@ -195,14 +195,12 @@ class NotesTheme extends Themelet {
$n = 0;
foreach($histories as $history) {
$oe = ($n++ % 2 == 0) ? "even" : "odd";
$image_link = "<a href='".make_link("post/view/".$history['image_id'])."'>".$history['image_id']."</a>";
$history_link = "<a href='".make_link("note/history/".$history['note_id'])."'>".$history['note_id'].".".$history['review_id']."</a>";
$user_link = "<a href='".make_link("user/".$history['user_name'])."'>".$history['user_name']."</a>";
$revert_link = "<a href='".make_link("note/revert/".$history['note_id']."/".$history['review_id'])."'>Revert</a>";
$html .= "<tr class='$oe'>".
$html .= "<tr>".
"<td>".$image_link."</td>".
"<td>".$history_link."</td>".
"<td style='text-align:left;'>".$history['note']."</td>".
@ -245,14 +243,12 @@ class NotesTheme extends Themelet {
$n = 0;
foreach($histories as $history) {
$oe = ($n++ % 2 == 0) ? "even" : "odd";
$image_link = "<a href='".make_link("post/view/".$history['image_id'])."'>".$history['image_id']."</a>";
$history_link = "<a href='".make_link("note/history/".$history['note_id'])."'>".$history['note_id'].".".$history['review_id']."</a>";
$user_link = "<a href='".make_link("user/".$history['user_name'])."'>".$history['user_name']."</a>";
$revert_link = "<a href='".make_link("note/revert/".$history['note_id']."/".$history['review_id'])."'>Revert</a>";
$html .= "<tr class='$oe'>".
$html .= "<tr>".
"<td>".$image_link."</td>".
"<td>".$history_link."</td>".
"<td style='text-align:left;'>".$history['note']."</td>".

View file

@ -15,7 +15,6 @@ class PrivMsgTheme extends Themelet {
<tbody>";
$n = 0;
foreach($pms as $pm) {
$oe = ($n++ % 2 == 0) ? "even" : "odd";
$h_subject = html_escape($pm->subject);
if(strlen(trim($h_subject)) == 0) $h_subject = "(No subject)";
$from_name = User::by_id($pm->from_id)->name;
@ -25,7 +24,7 @@ class PrivMsgTheme extends Themelet {
$del_url = make_link("pm/delete");
$h_date = html_escape($pm->sent_date);
if($pm->is_read) $h_subject = "<b>$h_subject</b>";
$html .= "<tr class='$oe'><td><a href='$pm_url'>$h_subject</a></td>
$html .= "<tr><td><a href='$pm_url'>$h_subject</a></td>
<td><a href='$from_url'>$h_from</a></td><td>$h_date</td>
<td><form action='$del_url' method='POST'>
<input type='hidden' name='pm_id' value='{$pm->id}'>

View file

@ -47,13 +47,11 @@ class PoolsTheme extends Themelet {
// Build up the list of pools.
foreach($pools as $pool) {
$oe = ($n++ % 2 == 0) ? "even" : "odd";
$pool_link = '<a href="'.make_link("pool/view/".$pool['id']).'">'.html_escape($pool['title'])."</a>";
$user_link = '<a href="'.make_link("user/".url_escape($pool['user_name'])).'">'.html_escape($pool['user_name'])."</a>";
$public = ($pool['public'] == "Y" ? "Yes" : "No");
$html .= "<tr class='$oe'>".
$html .= "<tr>".
"<td class='left'>".$pool_link."</td>".
"<td>".$user_link."</td>".
"<td>".$pool['posts']."</td>".
@ -125,9 +123,7 @@ class PoolsTheme extends Themelet {
$n = 0;
foreach($pools as $pool) {
$oe = ($n++ % 2 == 0) ? "even" : "odd";
$pool_info .= "<tr class='$oe'>".
$pool_info .= "<tr>".
"<td class='left'>".html_escape($pool['title'])."</td>".
"<td class='left'>".html_escape($pool['description'])."</td>".
"</tr>";
@ -357,8 +353,6 @@ class PoolsTheme extends Themelet {
$n = 0;
foreach($histories as $history) {
$oe = ($n++ % 2 == 0) ? "even" : "odd";
$pool_link = "<a href='".make_link("pool/view/".$history['pool_id'])."'>".html_escape($history['title'])."</a>";
$user_link = "<a href='".make_link("user/".url_escape($history['user_name']))."'>".html_escape($history['user_name'])."</a>";
$revert_link = "<a href='".make_link("pool/revert/".$history['id'])."'>Revert</a>";
@ -377,7 +371,7 @@ class PoolsTheme extends Themelet {
$image_link .= "<a href='".make_link("post/view/".$image)."'>".$prefix.$image." </a>";
}
$html .= "<tr class='$oe'>".
$html .= "<tr>".
"<td class='left'>".$pool_link."</td>".
"<td>".$history['count']."</td>".
"<td>".$image_link."</td>".

View file

@ -36,9 +36,8 @@ class ReportImageTheme extends Themelet {
ksort($iabbe->parts);
$actions = join("<br>", $iabbe->parts);
$oe = ($n++ % 2 == 0) ? "even" : "odd";
$h_reportedimages .= "
<tr class='$oe'>
<tr>
<td>{$image_link}</td>
<td>Report by $userlink: $h_reason</td>
<td class='formstretch'>

View file

@ -66,14 +66,11 @@ class TipsTheme extends Themelet {
$html .= "</tr></thead>";
$n = 0;
foreach ($tips as $tip)
{
$oe = ($n++ % 2 == 0) ? "even" : "odd";
foreach ($tips as $tip) {
$tip_enable = ($tip['enable'] == "Y") ? "Yes" : "No";
$set_link = "<a href='".make_link("tips/status/".$tip['id'])."'>".$tip_enable."</a>";
$html .= "<tr class='$oe'>".
$html .= "<tr>".
"<td>".$tip['id']."</td>".
"<td>".$set_link."</td>".
(

View file

@ -33,9 +33,8 @@ class AliasEditorTheme extends Themelet {
foreach($aliases as $old => $new) {
$h_old = html_escape($old);
$h_new = "<a href='".make_link("post/list/".url_escape($new)."/1")."'>".html_escape($new)."</a>";
$oe = ($n++ % 2 == 0) ? "even" : "odd";
$h_aliases .= "<tr class='$oe'><td>$h_old</td><td>$h_new</td>";
$h_aliases .= "<tr><td>$h_old</td><td>$h_new</td>";
if($can_manage) {
$h_aliases .= "
<td>

View file

@ -27,11 +27,10 @@ class ExtManagerTheme extends Themelet {
else if($extension->enabled === FALSE) $h_enabled = "";
else $h_enabled = " disabled checked='checked'";
$h_link = make_link("ext_doc/".url_escape($extension->ext_name));
$oe = ($n++ % 2 == 0) ? "even" : "odd";
$h_en = $editable ? "<td><input type='checkbox' name='ext_".html_escape($extension->ext_name)."'$h_enabled></td>" : "";
$html .= "
<tr class='$oe'>
<tr>
$h_en
<td><a href='$h_link'>$h_name</a></td>
<td style='text-align: left;'>$h_description</td>

View file

@ -50,7 +50,6 @@ class SetupTheme extends Themelet {
$h_name = html_escape($name);
$h_value = html_escape($value);
$len = strlen($h_value);
$oe = ($n++ % 2 == 0) ? "even" : "odd";
$h_box = "";
if(strpos($value, "\n") > 0) {
@ -60,7 +59,7 @@ class SetupTheme extends Themelet {
$h_box .= "<input type='text' name='_config_$h_name' value='$h_value'>";
}
$h_box .= "<input type='hidden' name='_type_$h_name' value='string'>";
$h_rows .= "<tr class='$oe'><td>$h_name</td><td>$h_box</td></tr>";
$h_rows .= "<tr><td>$h_name</td><td>$h_box</td></tr>";
}
$table = "

View file

@ -60,8 +60,8 @@ TABLE.zebra TD, TABLE.zebra TH {vertical-align: middle; padding: 4px;}
TABLE.zebra THEAD TD, TABLE.zebra THEAD TH {border-bottom: 2px solid #CCC;}
TABLE.zebra TFOOT TD, TABLE.zebra TFOOT TH {border-top: 2px solid #CCC;}
TABLE.zebra TR TD {border-bottom: 1px solid #DDD;}
TABLE.zebra TR.odd {background: #EFEFEF;}
TABLE.zebra TR.even {background: #E0E0E0;}
TABLE.zebra TR:nth-child(odd) {background: #EFEFEF;}
TABLE.zebra TR:nth-child(even) {background: #E0E0E0;}
#footer {
clear: both;

View file

@ -58,8 +58,8 @@ TABLE.zebra TD, TABLE.zebra TH {vertical-align: middle; padding: 4px;}
TABLE.zebra THEAD TD, TABLE.zebra THEAD TH {border-bottom: 2px solid #CCC;}
TABLE.zebra TFOOT TD, TABLE.zebra TFOOT TH {border-top: 2px solid #CCC;}
TABLE.zebra TR TD {border-bottom: 1px solid #DDD;}
TABLE.zebra TR.odd {background: #EFEFEF;}
TABLE.zebra TR.even {background: #E0E0E0;}
TABLE.zebra TR:nth-child(odd) {background: #EFEFEF;}
TABLE.zebra TR:nth-child(even) {background: #E0E0E0;}
#footer {
clear: both;

View file

@ -146,8 +146,8 @@ TABLE.zebra TD, TABLE.zebra TH {vertical-align: middle; padding: 4px;}
TABLE.zebra THEAD TD, TABLE.zebra THEAD TH {border-bottom: 2px solid #C3D2E0;}
TABLE.zebra TFOOT TD, TABLE.zebra TFOOT TH {border-top: 2px solid #C3D2E0;}
TABLE.zebra TR TD {border-bottom: 1px solid #C3D2E0;}
TABLE.zebra TR.odd {background: #CEDFF0;}
TABLE.zebra TR.even {background: #F0F7FF;}
TABLE.zebra TR:nth-child(odd) {background: #CEDFF0;}
TABLE.zebra TR:nth-child(even) {background: #F0F7FF;}
INPUT, TEXTAREA {
-moz-border-radius:4px;
@ -367,4 +367,4 @@ UL {
left:0;
z-index:3;
display:none;
}
}

View file

@ -56,8 +56,8 @@ TABLE.zebra TD, TABLE.zebra TH {vertical-align: middle; padding: 4px;}
TABLE.zebra THEAD TD, TABLE.zebra THEAD TH {border-bottom: 2px solid #CCC;}
TABLE.zebra TFOOT TD, TABLE.zebra TFOOT TH {border-top: 2px solid #CCC;}
TABLE.zebra TR {border-bottom: 1px solid #DDD;}
TABLE.zebra TR.odd {background: #EFEFEF;}
TABLE.zebra TR.even {background: #E0E0E0;}
TABLE.zebra TR:nth-child(odd) {background: #EFEFEF;}
TABLE.zebra TR:nth-child(even) {background: #E0E0E0;}
#footer {
clear: both;

View file

@ -61,8 +61,8 @@ TABLE.zebra TD, TABLE.zebra TH {vertical-align: middle; padding: 4px;}
TABLE.zebra THEAD TD, TABLE.zebra THEAD TH {border-bottom: 2px solid #B89F7C;}
TABLE.zebra TFOOT TD, TABLE.zebra TFOOT TH {border-top: 2px solid #B89F7C;}
TABLE.zebra TD {border-top: 1px solid #B89F7C;}
TABLE.zebra TR.odd {background: #FCD9A9;}
TABLE.zebra TR.even {background: #DABC92;}
TABLE.zebra TR:nth-child(odd) {background: #FCD9A9;}
TABLE.zebra TR:nth-child(even) {background: #DABC92;}
#footer {
clear: both;