Exemplo n.º 1
0
 public EpisodeView(string show, Season season, Episode episode) :
     base("Episode",
          A(ResolveUri.ForHome(), "Home")
          , H1(Text("TV Shows"))
          , H2(Text(show))
          , Ul(
              Li(Text("Season: "), Text(season.Name))
              , Li(Text("Title: "), Text(episode.Title))
              , Li(Text("Duration: "), Text("" + episode.Duration))
              , Li(Text("Synopsis: "), Text(episode.Synopsis))
              , Li(Text("Score: "), Text("" + episode.Score)))
          )
 {
 }
Exemplo n.º 2
0
 public SearchView(List <ViewArtist> artists, SearchInfo info)
     : base("Search Results",
            H1(Text("Results")),
            H2(Text("Artists")),
            artists.Count > 0
         ? Ul(artists.Select(art => Li(Text(art.Name), A(ResolveUri.For(art), "View"))).ToArray())
         : Text("No results found"),
            //SearchFrame(info),
            Ul(
                Li(A(ResolveUri.ForHome(), "Home")),
                Li(A(ResolveUri.ForPlaylist(), "Playlists"))
                )
            )
 {
 }
Exemplo n.º 3
0
 public SearchView(List <ViewTrack> tracks, SearchInfo info)
     : base("Search Results",
            H1(Text("Results")),
            H2(Text("Tracks")),
            tracks.Count > 0
         ? Ul(
                tracks.Select(trc => Li(Text(trc.Name), A(ResolveUri.For(trc), trc.Name))).ToArray()
                )
         : Text("No results found"),
            //SearchFrame(info),
            Ul(
                Li(A(ResolveUri.ForHome(), "Home")),
                Li(A(ResolveUri.ForPlaylist(), "Playlists"))
                )
            )
 {
 }
Exemplo n.º 4
0
 public SearchView()
     : base("Search Form",
            H1(Text("Search")),
            Form("POST", "/search",
                 InputText("search", "Search Query"),
                 InputBox("type",
                          Option("artists", "Artists"),
                          Option("albuns", "Albuns"),
                          Option("tracks", "Tracks")
                          ),
                 InputSubmit("Search")
                 ),
            Ul(
                Li(A(ResolveUri.ForHome(), "Home")),
                Li(A(ResolveUri.ForPlaylist(), "Playlists"))
                )
            )
 {
 }
Exemplo n.º 5
0
 public PlaylistDetailView(ViewPlaylist p)
     : base("Playlist Detail",
            H1(Text("Playlist Detail - " + p.Name)),
            H3(Text("Name: " + p.Name)),
            H3(Text("Description: " + p.Description)),
            H3(Text("Track List")),
            Ul(
                p.Tracks.Select(track => Li(
                                    A(ResolveUri.ForTrack(track.Key), track.Value),
                                    Form("POST", ResolveUri.ForRemoveTrack(p, track.Key), P(InputSubmit("Remove")))
                                    )).ToArray()
                ),
            Form("POST", ResolveUri.ForPlaylistRemove(p), P(InputSubmit("Delete"))),
            Form("GET", ResolveUri.ForPlaylistEdit(p), P(InputSubmit("Edit"))),
            P(A(ResolveUri.ForHome(), "Home")),
            P(A(ResolveUri.ForSearch(), "Search"))
            )
 {
 }
Exemplo n.º 6
0
 public SeasonView(string show, Season season) :
     base("Season",
          A(ResolveUri.ForHome(), "Home")
          , H1(Text("TV Shows"))
          , H2(Text(show))
          , H3(Text(string.Format("Starts: {0}", season.Debut.ToString("d"))))
          , H3(Text(string.Format("Ends: {0}", season.Finale.ToString("d"))))
          , Ul(season.Episodes.Select(episode => Li(A(
                                                        ResolveUri.ForEpisode(ShowService.GetShowByName(show)
                                                                              , ShowService.GetSeason(show, season.Number)
                                                                              , ShowService.GetEpisodeByNumberShowAndSeason(show, season.Number, episode.Number)
                                                                              )
                                                        , episode.Title)
                                                    )
                                      ).ToArray()
               )
          )
 {
 }