增加数据首页
This commit is contained in:
parent
777b404191
commit
a31b5f8e6a
|
@ -13,9 +13,9 @@
|
||||||
<!-- Le styles -->
|
<!-- Le styles -->
|
||||||
<?php echo $this->headLink(array('rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $this->basePath() . '/img/favicon.ico'))
|
<?php echo $this->headLink(array('rel' => 'shortcut icon', 'type' => 'image/vnd.microsoft.icon', 'href' => $this->basePath() . '/img/favicon.ico'))
|
||||||
// ->prependStylesheet($this->basePath() . '/css/style.css')
|
// ->prependStylesheet($this->basePath() . '/css/style.css')
|
||||||
->prependStylesheet($this->basePath() . '/sjyportal2/css/bootstrap.min.css')
|
->prependStylesheet($this->basePath() . '/sjyportal/css/bootstrap.min.css')
|
||||||
->prependStylesheet($this->basePath() . '/sjyportal2/css/bootstrap-responsive.min.css')
|
->prependStylesheet($this->basePath() . '/sjyportal/css/bootstrap-responsive.min.css')
|
||||||
->prependStylesheet($this->basePath() . '/sjyportal2/css/style.css')
|
->prependStylesheet($this->basePath() . '/sjyportal/css/style.css')
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Scripts -->
|
<!-- Scripts -->
|
||||||
|
|
|
@ -22,50 +22,40 @@ return array(
|
||||||
|
|
||||||
'router' => array(
|
'router' => array(
|
||||||
'routes' => array(
|
'routes' => array(
|
||||||
|
|
||||||
//通配路由
|
|
||||||
'metadata' => array(
|
|
||||||
'type' => 'Segment',
|
|
||||||
'options' => array(
|
|
||||||
'route' => '/metadata[/:controller[/:action[/page/:page][/id/:id]]]',
|
|
||||||
'constraints' => array(
|
|
||||||
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
|
|
||||||
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
|
|
||||||
'page' => '[a-zA-Z][a-zA-Z0-9_-]*',
|
|
||||||
'id' => '[a-zA-Z][a-zA-Z0-9_-]*',
|
|
||||||
),
|
|
||||||
'defaults' => array(
|
|
||||||
'module' => 'Article',
|
|
||||||
'__NAMESPACE__' => 'Article\Controller',
|
|
||||||
'controller' => 'Article\Controller\Index',
|
|
||||||
'action' => 'index',
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'may_terminate' => true,
|
|
||||||
'child_routes' => array(
|
|
||||||
'wildcard' => array(
|
|
||||||
'type' => 'Wildcard'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
),
|
|
||||||
|
|
||||||
//数据
|
//数据
|
||||||
'data' => array(
|
'data' => array(
|
||||||
'type' => 'Segment',
|
'type' => 'Zend\Mvc\Router\Http\Literal',
|
||||||
'options' => array(
|
'options' => array(
|
||||||
'route' => '/data[/:uuid]',
|
'route' => '/data',
|
||||||
'constraints' => array(
|
'defaults' => array(
|
||||||
'uuid' => '[a-zA-Z][a-zA-Z0-9_-]*',
|
'module' => 'Metadata',
|
||||||
),
|
'__NAMESPACE__' => 'Metadata\Controller',
|
||||||
'defaults' => array(
|
'controller' => 'Metadata\Controller\Index',
|
||||||
'module' => 'Metadata',
|
'action' => 'index',
|
||||||
'__NAMESPACE__' => 'Metadata\Controller',
|
),
|
||||||
'controller' => 'Metadata\Controller\Index',
|
),
|
||||||
'action' => 'index',
|
'may_terminate' => true,
|
||||||
),
|
'child_routes' => array(
|
||||||
|
'view' => array(
|
||||||
|
'type' => 'Segment',
|
||||||
|
'options' => array(
|
||||||
|
'route' => '[/:uuid]',
|
||||||
|
'constraints' => array(
|
||||||
|
'uuid' => '[a-zA-Z][a-zA-Z0-9_-]*',
|
||||||
|
),
|
||||||
|
'defaults' => array(
|
||||||
|
'module' => 'Metadata',
|
||||||
|
'__NAMESPACE__' => 'Metadata\Controller',
|
||||||
|
'controller' => 'Metadata\Controller\Index',
|
||||||
|
'action' => 'view',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
'may_terminate' => true,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
'may_terminate' => true
|
),//data
|
||||||
),
|
|
||||||
|
|
||||||
),//routers
|
),//routers
|
||||||
),
|
),
|
||||||
|
|
|
@ -42,4 +42,10 @@ class IndexController extends AbstractActionController
|
||||||
|
|
||||||
return $this->ViewModel;
|
return $this->ViewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function viewAction()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->ViewModel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
<?php if(!empty($this->metadata_latest)) { ?>
|
<?php if(!empty($this->metadata_latest)) { ?>
|
||||||
<ul class="unstyled">
|
<ul class="unstyled">
|
||||||
<?php foreach($this->metadata_latest as $K=>$v) { ?>
|
<?php foreach($this->metadata_latest as $K=>$v) { ?>
|
||||||
<li><img src="<?= $this->basePath("img/westdc_20w.gif") ?>" /><a href="<?= $this->url('data',array('uuid'=>$v['uuid'])) ?>" title="<?= $v['title'] ?>"><?= $v['title'] ?></a></li>
|
<li><img src="<?= $this->basePath("img/westdc_20w.gif") ?>" /><a href="<?= $this->url('data/view',array('uuid'=>$v['uuid'])) ?>" title="<?= $v['title'] ?>"><?= $v['title'] ?></a></li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
Loading…
Reference in New Issue