ajout de la page divers + lien de retour

This commit is contained in:
Antoine WEBER 2015-10-07 18:03:22 +02:00
parent e782a359c4
commit e603610448
8 changed files with 21 additions and 12 deletions

1
app.js
View File

@ -52,6 +52,7 @@ app.use('/channel', require('./routes/channel'));
app.use('/movie', require('./routes/movie'));
app.use('/show_list', require('./routes/show_list'));
app.use('/show', require('./routes/show'));
app.use('/divers', require('./routes/divers'));
// catch 404 and forward to error handler
app.use(function(req, res, next) {

View File

@ -18,7 +18,7 @@ function humanFileSize(bytes, si) {
}
/* GET home page. */
router.get('/:id', function(req, res, next) {
router.get('/:id/:incoming_chan', function(req, res, next) {
var config = res.locals.config;
var db = config.init_db();
@ -41,7 +41,7 @@ router.get('/:id', function(req, res, next) {
row.file.push(ligne);
},function(){
res.render('movie', { title: 'Détail vidéo',movie: row });
res.render('movie', { title: 'Détail vidéo',movie: row,channel_id: req.params.incoming_chan });
});
});

View File

@ -16,7 +16,7 @@ function addZero(v) {
};
/* GET home page. */
router.get('/:id', function(req, res, next) {
router.get('/:id/:incoming_chan', function(req, res, next) {
var config = res.locals.config;
var db = config.init_db();
var data = [];
@ -58,7 +58,8 @@ router.get('/:id', function(req, res, next) {
}
res.render('show',{
title: titre,
videos: data
videos: data,
channel_id: req.params.incoming_chan
});
});

View File

@ -20,7 +20,7 @@ router.get('/:id', function(req, res, next) {
//aprés toute les opération de la base
function(){
console.log(shows);
res.render('show_list', { title: 'Liste des séries',shows: shows });
res.render('show_list', { title: 'Liste des séries',shows: shows, channel: req.params.id });
});
});

View File

@ -13,7 +13,7 @@ block content
each video, i in videos
tr
td
a(href="/movie/#{video.id}")= video.title
a(href="/movie/#{video.id}/#{channel.id}")= video.title
td= video.duree
td= video.year
script.

View File

@ -3,6 +3,10 @@ extends layout
block content
h1= movie.title
a(href="/channel/#{channel_id}") Retour à la liste
br
br
label Note
p= movie.rating
@ -11,18 +15,18 @@ block content
each file, i in movie.file
a(href="/file/#{file.id}/#{file.filename}") #{file.size} #{file.filename}
br
br
label Résumé
p= movie.summary
br
br
label Genre
each tag, i in movie.tags_genre
if(tag!='')
span= tag
|  
br
br
label Acteurs
each tag, i in movie.tags_star
if(tag!='')

View File

@ -3,6 +3,9 @@ extends layout
block content
h1= title
a(href="/channel/#{channel_id}") Retour à la liste des séries
br
table(id="example", class="table table-striped table-bordered", cellspacing="0", width="100%")
thead
tr
@ -13,7 +16,7 @@ block content
each video, i in videos
tr
td
a(href="/movie/#{video.id}")= video.titre
a(href="/movie/#{video.id}/#{channel_id}")= video.titre
td= video.season_episode
td= video.duree
script.

View File

@ -12,7 +12,7 @@ block content
each show, i in shows
tr
td
a(href="/show/#{show.id}")= show.title
a(href="/show/#{show.id}/#{channel}")= show.title
td= show.year
script.
$(document).ready(function() {