added series route as a mutator to series model.

This commit is contained in:
kay.one 2013-06-04 22:22:07 -07:00
parent 9b5d22455b
commit 44696a15e7
6 changed files with 14 additions and 9 deletions

View File

@ -3,6 +3,8 @@
<h1>{{day}}</h1>
<h4>{{month}}</h4>
</div>
<h4>{{series.title}}</h4>
<a href="series/details/{{series.titleSlug}}">
<h4>{{series.title}}</h4>
</a>
<p>{{startTime}} {{bestDateString}}<span class="pull-right">{{seasonNumber}}x{{paddedEpisodeNumber}}</span><br>{{episodeTitle}}</p>
</div>
</div>

View File

@ -1 +1 @@
<a href="series/details/{{series.titleSlug}}">{{series.title}}</a>
<a href="{{route}}">{{series.title}}</a>

View File

@ -1,14 +1,14 @@
<div class="series-item">
<div class="row">
<div class="span2">
<a href="/series/details/{{titleSlug}}" target="_blank">
<a href="{{route}}">
<img class="series-poster img-polaroid" src="{{poster}}">
</a>
</div>
<div class="span10">
<div class="row">
<div class="span9">
<a href="/series/details/{{id}}" target="_blank">
<a href="{{route}}" target="_blank">
<h2>{{title}}</h2>
</a>
</div>
@ -20,7 +20,7 @@
</div>
</div>
<div class="row">
<a href="/series/details/{{id}}">
<a href="{{route}}">
<div class="span10">
{{overview}}
</div>

View File

@ -10,7 +10,7 @@
{{#unless isContinuing}}
<div class="ended-banner">Ended</div>
{{/unless}}
<a href="/series/details/{{titleSlug}}">
<a href="{{route}}">
<img class="series-poster img-polaroid" src="{{poster}}">
</a>
</div>
@ -34,4 +34,4 @@
</div>
</div>
</div>
</div>
</div>

View File

@ -1 +1 @@
<a href="series/details/{{titleSlug}}">{{title}}</a>
<a href="{{route}}">{{title}}</a>

View File

@ -44,6 +44,9 @@ define(['app', 'Quality/QualityProfileCollection', 'AddSeries/RootFolders/RootFo
}
return Date.create(date).short();
},
route : function(){
return '/series/details/' + this.get('titleSlug');
}
},