Subversion Repositories SmartDukaan

Rev

Rev 1082 | Rev 2720 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
208 naveen 1
<!DOCTYPE html PUBLIC 
2
    "-//W3C//DTD XHTML 1.1 Transitional//EN"
3
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
 
5
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
<head>
7
<title>$action.getEntityID() - All Media</title>
212 naveen 8
<script type="text/javascript" src="jquery/jquery-1.4.2.js"></script>
9
<script type="text/javascript" src="jquery/validation/jquery.validate.js"></script>
208 naveen 10
<style type="text/css">
212 naveen 11
 
12
* { font-family: Verdana; font-size: 96%; }
13
label { width: 10em; float: left; }
14
label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
15
p { clear: both; }
16
.submit { margin-left: 12em; }
17
em { font-weight: bold; padding-right: 1em; vertical-align: top; }
18
 
208 naveen 19
table {
20
    border-width: 1px 1px 1px 1px;
21
    border-spacing: 2px;
22
    border-style: outset outset outset outset;
23
    border-color: gray gray gray gray;
24
    border-collapse: separate;
25
    background-color: white;
26
}
27
th {
28
    border-width: 1px 1px 1px 1px;
29
    padding: 1px 1px 1px 1px;
30
    border-style: inset inset inset inset;
31
    border-color: gray gray gray gray;
32
    background-color: white;
33
    -moz-border-radius: 0px 0px 0px 0px;
34
}
35
td {
36
    border-width: 1px 1px 1px 1px;
37
    padding: 1px 1px 1px 1px;
38
    border-style: inset inset inset inset;
39
    border-color: gray gray gray gray;
40
    background-color: white;
41
    -moz-border-radius: 0px 0px 0px 0px;
42
}
43
</style>
212 naveen 44
<script>
45
$(document).ready(function() {
46
    $("#f").validate();
480 rajveer 47
 
48
		$("input[name='mediatype']").change(function()
49
        {
50
 
51
		var newradio= $("input[name='mediatype']:checked")[0];
52
 
53
 
54
		if(newradio.value == "image"){
55
 
56
			$("#youtubeURL").hide("fast");
57
			$("#youtubelabel").hide("fast");
58
 
59
			$("#pic").show("fast");
60
			$("#piclabel").show("fast");
61
 
62
			$("#videotype").hide("fast");
63
			$("#videotypelabel").hide("fast");
64
		}
65
		else
66
		{
67
 
68
			$("#youtubeURL").show("fast");
69
			$("#youtubelabel").show("fast");
70
 
71
			$("#pic").hide("fast");
72
			$("#piclabel").hide("fast");
73
 
74
			$("#videotype").show("fast");
75
			$("#videotypelabel").show("fast");
76
		}
77
 
78
 
79
        });
80
 
81
 
82
 
212 naveen 83
});
84
 
85
</script>
208 naveen 86
</head>
87
<body>
88
<div>
89
    <h1>$action.getEntityID() - All Media</h1>
212 naveen 90
    <form id="f" name="f" action="/content/media" method="post" enctype="multipart/form-data">
480 rajveer 91
		<label>Media type:</label>
92
		<input type="radio" name="mediatype" id="mediatype" value="image" checked> Image
93
		<input type="radio" name="mediatype" id="mediatype" value="video"> Video<br>
94
 
95
        <label id="">* Label:</label>
96
        <input type="text" name="label" id="label" class="required" value=""/><p/>
97
		<label id="titlelabel">* Title:</label>
98
        <input type="text" name="title" id="title" value=""/><p/>
99
		<label id="piclabel">Image file:</label>
100
        <input type="file" name="pic" id="pic" value=""/><p/>
101
 
102
		<label id="youtubelabel" style="display:none">Youtube URL:</label>
103
        <input type="text" style="display:none" name="youtubeURL" id="youtubeURL" class="url" value=""/><p/>
104
		<label id="videotypelabel" style="display:none" >Video type:</label>
105
		<div id="videotype" style="display:none" >
106
		<input type="radio" name="videoType" id="videotype" value="withskin" checked> With Skin
107
		<input type="radio" name="videoType" id="videotype" value="withoutskin" > Without Skin<br>
108
		</div>		
109
 
208 naveen 110
        <input type="hidden" name="entityID" value="$action.getEntityID()">
448 rajveer 111
		<input type="hidden" name="slideID" value="$action.getSlideID()">	
208 naveen 112
        <input type="submit" name="imageupload" value="Save">
113
    </form>
114
    <p></p>
115
    <table>
116
        <thead>
117
            <tr style="border: 1px">
118
                <th>#</th>
119
                <th>Label</th>
120
                <th>Type</th>
516 rajveer 121
				<th>Title</th>
775 rajveer 122
				<th>File Name</th>
123
                <th>Video Type</th>
124
				<th></th>
208 naveen 125
            </tr>
126
        </thead>
127
        <tbody>
1051 rajveer 128
 
129
 
130
#foreach( $label in $medias.keySet() )
131
    <li>Key: $key -> Value: $medias.get($key)</li>
132
#end
133
 
134
	#set ( $allmedia = $action.getAllMedia() )
135
    #foreach ( $label in $allmedia.keySet() )
136
		#set($media = $allmedia.get($label))
208 naveen 137
            <tr style="border: 1px">
138
                <td>$velocityCount</td>
139
                <td>$media.getLabel()</td>
140
                <td>$media.getType()</td>
516 rajveer 141
				<td>$media.getTitle()</td>
208 naveen 142
                #if($media.getType() == "image")
143
                <td><a href="/db/media/$action.getEntityID()/$media.getFileName()" target="_blank">$media.getFileName()</a></td>
144
                #else
145
                <td><a href="$media.getLocation()" target="_blank">$media.getLocation()</a></td>
775 rajveer 146
				#end
147
				<td>
148
				#if($media.getType() == "youtube")
149
					$media.getVideoType()
150
				#end
151
				</td>
1378 rajveer 152
                <td><a href="/content/media/id?_method=delete&entityID=$action.getEntityID()&slideID=$action.getSlideID()&label=$media.getEncodedLabel()">Delete</a></td>
208 naveen 153
            </tr>
154
    #end
155
        </tbody>
156
    </table>
157
</div>
158
</body>
159
</html>