/album -> /gallery
This commit is contained in:
1 parent
eb2aa6d4cf
commit
900f1d4e33
3 files changed
+4
-4
No files matched your search
@@ -11,7 +11,7 @@ APIGallery.prototype.year = function(year) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
APIGallery.prototype.album = function(year, course, album) {
|
APIGallery.prototype.album = function(year, course, album) {
|
||||||
var url = '/album/{year}/{course}/{album}'
|
var url = '/gallery/{year}/{course}/{album}'
|
||||||
.replace('{year}', year)
|
.replace('{year}', year)
|
||||||
.replace('{course}', course)
|
.replace('{course}', course)
|
||||||
.replace('{album}', album);
|
.replace('{album}', album);
|
||||||
|
|||||||
+1
-1
@@ -40,7 +40,7 @@ app.config(function ($locationProvider, $routeProvider) {
|
|||||||
title:"Работы учащихся"
|
title:"Работы учащихся"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "/album/:year/:course/:album",
|
name: "/gallery/:year/:course/:album",
|
||||||
templateUrl: "/views/gallery-album.html",
|
templateUrl: "/views/gallery-album.html",
|
||||||
controller: "AlbumPageController",
|
controller: "AlbumPageController",
|
||||||
title:"Работы учащихся"
|
title:"Работы учащихся"
|
||||||
|
|||||||
+2
-2
@@ -41,7 +41,7 @@ module.exports = function (app) {
|
|||||||
}
|
}
|
||||||
})));
|
})));
|
||||||
|
|
||||||
app.use(route.get("/album/:year/:course/:album", router.accepts({
|
app.use(route.get("/gallery/:year/:course/:album", router.accepts({
|
||||||
"text/html": router.index(),
|
"text/html": router.index(),
|
||||||
"text/plain": router.index(),
|
"text/plain": router.index(),
|
||||||
"application/json": function *(year, course, album) {
|
"application/json": function *(year, course, album) {
|
||||||
@@ -65,7 +65,7 @@ module.exports = function (app) {
|
|||||||
|
|
||||||
function processAlbum(album) {
|
function processAlbum(album) {
|
||||||
return co(function *() {
|
return co(function *() {
|
||||||
album.url = '/album/{year}{course}{album}'
|
album.url = '/gallery/{year}{course}{album}'
|
||||||
.replace('{year}', album.date.getFullYear())
|
.replace('{year}', album.date.getFullYear())
|
||||||
.replace('{course}', album.course_uri)
|
.replace('{course}', album.course_uri)
|
||||||
.replace('{album}', album.uri);
|
.replace('{album}', album.uri);
|
||||||
|
|||||||
Reference in new issue
Block a user