Permalink
Browse files

Some html markup fixes.

Signed-off-by: Joachim Nyqvist <Joachim@JNyqvist.se>
  • Loading branch information...
1 parent c9acb97 commit 5f55d2c793026e61c8bcd2d544d658ffb5b5e0c6 @CalvinMcGee committed Nov 29, 2010
@@ -17,7 +17,6 @@ class ItemsController extends AppController {
);
function index($category = null, $name = null) {
- $this->layout = 'items';
switch ($category) {
@@ -16,10 +16,10 @@ echo $this->Html->div('paginationlinks', $paginator->numbers()."<br />\n".
foreach ($data as $post) {
echo "<div class=\"item clearfix\">\n";
- echo "<div class=\"grid_3 omega\">\n";
+ echo "<div class=\"grid_2 omega\">\n";
if (file_exists(WWW_ROOT.'/files/'.$post['Item']['image']) && $post['Item']['image'] != '')
- echo $this->Image->resize('webroot/files/'.trim($post['Item']['image']),220, 220, true, null, false);
+ echo $this->Image->resize('webroot/files/'.trim($post['Item']['image']), 140, 250, true, null, false);
else
echo $this->Image->resize('views/themed/'.Configure::read('Visual.theme').'/webroot/img/nocover.gif', 220, 220, true, null, false);
@@ -33,7 +33,7 @@ else
echo "<table>\n";
foreach (Configure::read('Visual.fields_list') as $field) {
if ($field == 'actors') {
- $g = preg_split("/[\s]*[,][\s]*/", trim($data[0]['Item'][$field]));
+ $g = preg_split("/[\s]*[,][\s]*/", trim($post['Item'][$field]));
$i = 0;
$content = '';
foreach ($g as $actor) {
@@ -75,7 +75,8 @@ else
$content .= ", \n";
$i++;
}
- echo $this->Html->tableCells(array(languageField($field).':', $content))."\n";
+ if ($content != '')
+ echo $this->Html->tableCells(array(languageField($field).':', $content))."\n";
}
elseif ($field == 'webpage') {
echo $this->Html->tableCells(array('',
@@ -1,7 +1,7 @@
<h2><?php echo $title; ?></h2>
<?php
echo "<div class=\"item clearfix\">\n";
-echo "<div class=\"grid_7 alpha\">\n";
+echo "<div class=\"grid_6 alpha\">\n";
echo $this->Html->tag('h3', trim($data[0]['Item']['title']))."\n";
echo $this->Html->para(null, trim($data[0]['Item']['synopsis']));
@@ -14,31 +14,70 @@
), array('type' => 'rss'));
echo $this->Html->css(array('reset', '960', 'style'));
- echo $this->Html->script('jquery');
+ echo $this->Html->script(array('jquery', 'javascript'));
echo $scripts_for_layout;
?>
</head>
<body>
+ <div id="overlay">
+ <div class="busy-indicator">&nbsp;</div>
+ <div>
+ <span class="busy-indicator"><?php echo $this->Html->image('ajax.gif');?><br />
+ <?php __('Loading. Please wait.'); ?>
+ </span>
+ </div>
+ </div>
+
<div class="container_12">
<div id="header" class="grid_12">
<h1><?php echo Configure::read('Visual.title') ?></h1>
</div>
<div class="clear"></div>
<div id="content" class="grid_12">
- <div class="grid_2 alpha">
- <?php
- echo $this->Html->link(__('Sort by added', true), array(
- 'controller' => 'items', 'action' => 'index',
- 'sort:Item.added', 'direction:asc'
- ))."\n";
- echo $this->Html->link(__('Sort by year of publication', true), array(
- 'controller' => 'items', 'action' => 'index',
- 'sort:Item.date', 'direction:asc'
- ))."\n";
- ?>
+ <div class="grid_3 alpha">
+ <?php echo $this->Html->link(__('Home', true), array(
+ 'controller' => 'items',
+ 'action' => 'index'
+ ))."\n";?>
+ <h2><?php __('Order by'); ?></h2>
+ <ul>
+ <li>
+ <?php __('Title');
+ echo $this->Html->link('', array(
+ 'controller' => 'items', 'action' => 'index',
+ 'sort:Item.title', 'direction:desc'
+ ))."\n";
+ echo $this->Html->link('', array(
+ 'controller' => 'items', 'action' => 'index',
+ 'sort:Item.title', 'direction:asc'
+ ))."\n";?>
+ </li>
+ <li>
+ <?php __('Date added');
+ echo $this->Html->link('', array(
+ 'controller' => 'items', 'action' => 'index',
+ 'sort:Item.added', 'direction:desc'
+ ))."\n";
+ echo $this->Html->link('', array(
+ 'controller' => 'items', 'action' => 'index',
+ 'sort:Item.added', 'direction:asc'
+ ))."\n";?>
+ </li>
+ <li>
+ <?php __('Year of publication');
+ echo $this->Html->link('', array(
+ 'controller' => 'items', 'action' => 'index',
+ 'sort:Item.date', 'direction:desc'
+ ))."\n";
+ echo $this->Html->link('', array(
+ 'controller' => 'items', 'action' => 'index',
+ 'sort:Item.date', 'direction:asc'
+ ))."\n";?>
+ </li>
+ </ul>
</div>
- <div id="ajax" class="grid_10 omega">
+ <div id="ajax" class="grid_9 omega">
<?php echo $this->Session->flash(); ?>
<?php echo $content_for_layout; ?>
@@ -1,49 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
- <?php echo $this->Html->charset(); ?>
- <title>
- <?php echo $title_for_layout; ?>
- </title>
- <?php
- echo $this->Html->meta('icon');
-
- echo $this->Html->meta(__('Most Recent Items', true), array(
- 'controller' => 'items',
- 'action' => 'feed'.'.rss'
- ), array('type' => 'rss'));
-
- echo $this->Html->css(array('reset', '960', 'style'));
- echo $this->Html->script('jquery');
-
- echo $scripts_for_layout;
- ?>
-</head>
-<body>
- <div class="container_12">
- <div id="header" class="grid_12">
- <h1><?php echo Configure::read('Visual.title') ?></h1>
- </div>
- <div class="clear"></div>
- <div id="content" class="grid_12">
- <div class="grid_2 alpha">
- <?php
- echo $paginator->sort(__('Sort by added', true), 'Item.added')."\n";
- echo $paginator->sort(__('Sort by year of publication', true), 'Item.date')."\n";
- ?>
- </div>
- <div id="ajax" class="grid_10 omega">
- <?php echo $this->Session->flash(); ?>
-
- <?php echo $content_for_layout; ?>
- </div>
-
- </div>
- <div class="clear"></div>
- <div id="footer" class="grid_12">
- </div>
- <div class="clear"></div>
- </div>
- <?php echo $this->Js->writeBuffer(); ?>
-</body>
-</html>
@@ -1,12 +1,9 @@
-<div id="busy-indicator" style="display: none;">
-<?php echo $this->Html->image('ajax.gif');?>
-</div>
<h2><?php echo $title; ?></h2>
<?php
echo $this->Js->link(__('Update database', true), array('action' => 'xml'), array(
'update' => '#ajax',
- 'before' => $this->Js->get('#busy-indicator')->effect('fadeIn', array('buffer' => false)),
- 'success' => $this->Js->get('#busy-indicator')->effect('fadeOut', array('buffer' => false)),
+ 'before' => $this->Js->get('#overlay')->effect('fadeIn', array('buffer' => false)),
+ 'success' => $this->Js->get('#overlay')->effect('fadeOut', array('buffer' => false)),
'complete' => $this->Js->redirect(array('action' => 'index'))));
foreach ($languages as $language)
$options[$language] = languageCodes($language);
@@ -0,0 +1,22 @@
+#overlay {
+ display: none;
+}
+#overlay div {
+ position: absolute;
+ top: 0%;
+ left: 0%;
+ width: 100%;
+ height: 100%;
+ text-align: center;
+ z-index: 3;
+}
+#overlay div.busy-indicator {
+ background-color: black;
+ z-index: 2;
+}
+span.busy-indicator {
+ margin-top: 10%;
+ display: inline-block;
+ background-color: #FFFFFF;
+ padding: 1%;
+}
@@ -0,0 +1,3 @@
+$(document).ready(function() {
+ $("div.busy-indicator").css({ opacity: .6 });
+})

0 comments on commit 5f55d2c

Please sign in to comment.