source: ether_core/trunk/src/jsp/admin/media_gestion.jsp @ 5

Last change on this file since 5 was 5, checked in by cbipsl, 18 years ago

ajout rep. src

  • Property svn:executable set to *
File size: 5.1 KB
Line 
1<!-- Projet Ether - $Id: media_gestion.jsp,v 1.3 2003/10/23 14:08:07 pn Exp $ -->
2<html>
3<META HTTP-EQUIV="Cache-Control" content="no-cache"> 
4<META HTTP-EQUIV="Pragma" content="no-cache">
5<META HTTP-EQUIV="Expires" content="Mon, 01 Jan 1990 12:00:00 GMT">
6
7<%@ page import="fr.alcatel.ether.tools.*" %>
8<%@ page import="fr.alcatel.ether.app.order.media.*" %>
9<%@ page import="fr.alcatel.ether.app.common.*" %>
10<%@ page import="fr.alcatel.ether.app.user.*"%>
11<%@ page import="org.apache.ecs.html.*" %>
12<%@ page import="java.util.Locale" %>
13<%@ page import="java.util.Collection" %>
14<%@ page import="java.util.Iterator" %>
15
16
17<jsp:useBean scope="request" id="mediaBean" class = "fr.alcatel.ether.bean.HashMapBean">
18</jsp:useBean>
19
20<head> 
21
22<% MultiLanguage ml = MultiLanguage.instance((Locale) JSPUtils.getSessionParameter(request, "langue")); %>
23
24<title>Gestion des services</title>
25<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
26<link rel="stylesheet" href="/ether/ether.css"></head>
27
28<SCRIPT language="JavaScript">
29
30function help(url)
31{
32 newWindow = window.open(url,'Help',' <%=Config.winParam %> ');
33 newWindow.focus();
34}
35
36function proprietes(id)
37{
38 newWindow = window.open('/ether/servlet/MediaServlet?<%= Config.ACTION %>=<%= Constants.MEDIA_PROPERTY %>&<%= Constants.INDEX %>=' + id,'propMedia','scrollbars=yes,resizable=yes,width=550,height=400');
39 newWindow.focus();
40}
41
42function changeValue()
43{
44        document.mediaform.action="/ether/servlet/MediaServlet?<%= Config.ACTION %>=<%= Config.MEDIA_LIST%>";
45        document.mediaform.target="_self";
46        document.mediaform.submit();
47}
48
49function supprimer(id)
50{
51        newWindow = window.open('/ether/servlet/MediaServlet?<%= Config.ACTION %>=<%= Constants.MEDIA_DELETE%>&<%= Constants.INDEX %>=' + id,'supMedia','scrollbars=yes,resizable=yes,width=300,height=200');   
52  newWindow.focus();
53}
54
55</SCRIPT>
56
57<body>
58<%Config.getConfig();
59UserManager userManager = (UserManager)UserManager.instance( UserManager.class.toString() );
60int userId = -1; 
61if ( session.getAttribute(Constants.MEDIA_USER_ID) != null )
62{
63        userId = Integer.parseInt((String) session.getAttribute(Constants.MEDIA_USER_ID));     
64}
65%>
66<p class="titrePage" align="left">Gestion des m&eacute;dias </p>
67<FORM NAME="mediaform" METHOD="POST" ACTION="">
68<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
69   <tr valign="baseline"> 
70     <td width="40%"> 
71      <p class="petit"><b>Utilisateur : </b> &nbsp;
72          <select name="<%= Constants.MEDIA_USER_ID %>" size="1" onChange="javascript:changeValue()">
73                <option value="-1">Tous</option>
74<%
75Iterator iteUser = userManager.getUsers().iterator();
76User tempUser;
77while ( iteUser.hasNext())
78{
79        tempUser = (User) iteUser.next();
80        %><option value=<%=tempUser.getId()%> <%       
81        if ( tempUser.getId() == userId ){%> SELECTED   <%}
82        %> ><%=tempUser.getLogin()%></option><%
83}%>
84         </select>
85        </p>
86      </td>
87     </tr>
88</table>
89<p class="titrePage" align="left"><b><%= Config.tag_image_ligne %></b></p>
90&nbsp;<br>
91<%
92
93// Creer le tableau des medias
94EtherHTMLTable table = new EtherHTMLTable( mediaBean.size(), 8 );
95
96table.setAlign( "center" );
97table.setWidth( "100%" );
98table.setCellPadding("2");
99table.setTitles( new String[]{"Nom","R&eacute;pertoire","Contenu","Etat","Date","V&eacute;rrouill&eacute;","Propri&eacute;t&eacute;","Suppression"});
100int indexTable = 0;
101
102MediaOrder media ;
103
104Collection col = mediaBean.getElements();
105Iterator ite = col.iterator();
106while (ite.hasNext())
107{
108        media =  (MediaOrder) ite.next();
109        table.setCellContent( indexTable,0,media.getName() );
110        table.setCellContent( indexTable,1,media.getDirectory());
111        table.setCellContent( indexTable,2,media.getContent());
112        table.setCellContent( indexTable,3,media.getMediaStatus().toString(ml,media.isWaitingPreparation()));
113        table.setCellContent( indexTable,4,Config.dateFormatters[1].format(media.getChangeDate()));
114        if ( media.isLocked() )
115        {
116                table.setCellContent( indexTable,5,"Oui" );
117        }
118        else
119        {
120                table.setCellContent( indexTable,5,"Non" );
121        }
122        table.setCellContent( indexTable,6,"<a href=\"javascript:proprietes(" + media.getId() + ");\">" + Config.getIcone( Config.icone_proprietes, "icone_proprietes", ml) + "</a>" );
123        int currentStatus = media.getMediaStatus().getStatus();
124        if ( currentStatus >= MediaStatus.PREPARING )
125        {
126                table.setCellContent( indexTable,7,"<a href=\"javascript:supprimer(" + media.getId() + ");\">" + Config.getIcone( Config.icone_supprimer, "icone_supprimer", ml) + "</a>"  );
127        }
128        else
129        {
130                table.setCellContent( indexTable,7,"&nbsp;" );
131        }
132        indexTable++;
133}
134
135out.println( table.generate() );
136%>
137</form>
138
139&nbsp;<br>
140<p class="petit" align="left"> <b><%= Config.tag_image_ligne %></b></p>
141&nbsp;<br>
142
143<a href=<%= ml.get("commun.adresseHomeAdmin") %> Target="_top"> <%= Config.getIcone( Config.icone_home, "icone_home", ml) %></a>&nbsp;
144
145<a href=mailto:<%= Config.mailAdmin %>><%= Config.getIcone( Config.icone_mail, "icone_mail", ml) %></a>&nbsp;
146
147<a href="javascript:help('<%=ml.get("commun.adresseHelp_Gest_Media")%>')" >
148<%=Config.getIcone(Config.icone_help,"icone_help",ml) %></a>
149
150<br> <span class="petit"><%= ml.get("commun.CopyRight") %>
151
152</p>
153
154</body>
155</html>
Note: See TracBrowser for help on using the repository browser.