Subversion Repositories SmartDukaan

Rev

Rev 210 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<!DOCTYPE html PUBLIC 
    "-//W3C//DTD XHTML 1.1 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>$action.getEntityID() - All Media</title>
<link type="text/css" href="jquery/jqueryui/themes/ui-lightness/jquery.ui.all.css" rel="stylesheet" />
<style type="text/css">
table {
    border-width: 1px 1px 1px 1px;
    border-spacing: 2px;
    border-style: outset outset outset outset;
    border-color: gray gray gray gray;
    border-collapse: separate;
    background-color: white;
}
th {
    border-width: 1px 1px 1px 1px;
    padding: 1px 1px 1px 1px;
    border-style: inset inset inset inset;
    border-color: gray gray gray gray;
    background-color: white;
    -moz-border-radius: 0px 0px 0px 0px;
}
td {
    border-width: 1px 1px 1px 1px;
    padding: 1px 1px 1px 1px;
    border-style: inset inset inset inset;
    border-color: gray gray gray gray;
    background-color: white;
    -moz-border-radius: 0px 0px 0px 0px;
}
</style>
</head>
<body>
<div>
    <h1>$action.getEntityID() - All Media</h1>
    <form name="f" action="/content/media" method="post" enctype="multipart/form-data">
        <label>Label:</label>
        <input type="text" name="label" value=""/><p/>
        <label>Image file:</label>
        <input type="file" name="pic" value=""/><p/><em>OR</em><p/>
        <label>Youtube URL:</label>
        <input type="text" name="youtubeURL" value=""/><p/>
        <input type="hidden" name="entityID" value="$action.getEntityID()">
        <input type="submit" name="imageupload" value="Save">
    </form>
    <p></p>
    <table>
        <thead>
            <tr style="border: 1px">
                <th>#</th>
                <th>Label</th>
                <th>Type</th>
                <th>Content Type</th>
                <th>File Name</th>
            </tr>
        </thead>
        <tbody>
    #set ( $allmedia = $action.getMedia() )
    #foreach ( $media in $allmedia )
            <tr style="border: 1px">
                <td>$velocityCount</td>
                <td>$media.getLabel()</td>
                <td>$media.getType()</td>
                #if($media.getType() == "image")
                <td>$media.getContentType()</td>
                <td><a href="/db/media/$action.getEntityID()/$media.getFileName()" target="_blank">$media.getFileName()</a></td>
                #else
                <td>&nbsp;</td>
                <td><a href="$media.getLocation()" target="_blank">$media.getLocation()</a></td>
                #end
            </tr>
    #end
        </tbody>
    </table>
</div>
</body>
</html>