<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
        <title>rMPD</title>
        <!--<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>-->
        <link rel="stylesheet" type="text/css" href="display.css"/>
    </head>
    <body>
        <h1>MPD Web</h1>
        <h2>Playlists</h2>
        <ol>
        <% $playlists.each do |pl| %>
            <li><%= pl %></li>
        <% end %>
        </ol>

        <h2>Manage Playlists</h2>
        <form action="managePlaylist.rb" method="get">
            <select name="pl">
            <% $playlists.each do |pl| %>
                <option value="<%= pl %>"><%= pl %></option>
            <% end %>
            </select>
            <ul>
                <!-- Delete -->
                <li><input type="submit" value="Delete" name="action" /></li>
                <!-- Save/play -->
                <li><input type="submit" value="Play" name="action" />
                <input type="submit" value="Save" name="action" /></li>
            </ul>
        </form>

        <h2>Save current playlist</h2>
        <form action="managePlaylist.rb" method="get">
            <input type="text" name="newname" value="Playlist name" />
            <input type="submit" name="action" value="New" />
        </form>

        <div style="margin-top: 3em;">
            <a href="index.rb">Go home</a>
        </div>
    </body>
</html>
