Merge branch 'pagination' into 'master'

Add polochon shows

See merge request !37
This commit is contained in:
Lucas 2017-01-26 12:25:07 +00:00
commit 7231097d53
3 changed files with 22 additions and 0 deletions

View File

@ -90,6 +90,9 @@ const MovieListSearch = (props) => (
const ShowListPopular = (props) => (
<ShowList {...props} showsUrl='/shows/explore'/>
)
const ShowListPolochon = (props) => (
<ShowList {...props} showsUrl='/shows/polochon'/>
)
const ShowDetailsView = (props) => (
<ShowDetails {...props} />
)
@ -110,6 +113,7 @@ ReactDOM.render((
<Route path="/movies/polochon(/:page)" component={UserIsAuthenticated(MovieListPolochon)} />
<Route path="/shows/search/:search" component={UserIsAuthenticated(ShowListSearch)} />
<Route path="/shows/popular" component={UserIsAuthenticated(ShowListPopular)} />
<Route path="/shows/polochon" component={UserIsAuthenticated(ShowListPolochon)} />
<Route path="/shows/details/:imdbId" component={UserIsAuthenticated(ShowDetailsView)} />
</Route>
</Router>

View File

@ -99,6 +99,9 @@ function ShowsDropdown(props) {
<LinkContainer to="/shows/popular">
<NavItem>Popular</NavItem>
</LinkContainer>
<LinkContainer to="/shows/polochon">
<NavItem>Polochon</NavItem>
</LinkContainer>
</NavDropdown>
</Nav>
);

View File

@ -148,6 +148,7 @@ function Episode(props) {
/>
)
})}
<DownloadButton data={props.data}/>
</span>
</td>
</tr>
@ -176,3 +177,17 @@ class Torrent extends React.Component {
)
}
}
function DownloadButton(props) {
if (props.data.polochon_url === "") {
return null
}
return (
<span>
<a type="button" className="btn btn-xs btn-warning" href={props.data.polochon_url}>
<i className="fa fa-download"></i> Download
</a>
</span>
);
}