Kawai Wiki

Rev

Rev 53 | Rev 55 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 53 Rev 54
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<%@taglib prefix="mtw" uri="http://www.mentaframework.org/tags-mtw/"%>
2
<%@taglib prefix="mtw" uri="http://www.mentaframework.org/tags-mtw/"%>
3
<%@ taglib uri="/WEB-INF/tld/taglib.tld" prefix="k" %>
3
<%@ taglib uri="/WEB-INF/tld/taglib.tld" prefix="k" %>
4
4
5
<html>
5
<html>
6
<head>
6
<head>
7
7
8
<title>Mentawai Web Framework</title>
8
<title>Mentawai Web Framework</title>
9
9
10
<style type="text/css" media="all">
10
<style type="text/css" media="all">
11
@import url("<mtw:contextPath/>/GenerateCSS.getCSS.css");
11
@import url("<mtw:contextPath/>/GenerateCSS.getCSS.css");
12
</style>
12
</style>
13
13
14
<meta http-equiv="imagetoolbar" content="no" />
14
<meta http-equiv="imagetoolbar" content="no" />
15
<meta http-equiv="imagetoolbar" content="false" />
15
<meta http-equiv="imagetoolbar" content="false" />
16
16
17
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
17
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
18
<link rel="icon" type="image/gif" href="/favicon.gif" />
18
<link rel="icon" type="image/gif" href="/favicon.gif" />
19
<link rel="stylesheet" href="<mtw:contextPath/>/GenerateCSS.getPrintCSS.css" type="text/css" media="print" />
19
<link rel="stylesheet" href="<mtw:contextPath/>/GenerateCSS.getPrintCSS.css" type="text/css" media="print" />
20
20
21
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
21
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
22
<meta name="author" content="Sergio Oliveira Junior" />
22
<meta name="author" content="Sergio Oliveira Junior" />
23
<meta name="email" content="sergio.oliveira.jr@gmail.com" />
23
<meta name="email" content="sergio.oliveira.jr@gmail.com" />
24
24
25
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
25
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
26
<script type="text/javascript" src="jquery/jquery-1.6.4.min.js"></script>
26
<script type="text/javascript" src="jquery/jquery-1.6.4.min.js"></script>
27
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
27
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
28
28
29
<script language="JavaScript">
29
<script language="JavaScript">
30
    
30
    
31
        $(document).ready(function() {
31
        $(document).ready(function() {
32
        
32
        
33
        	<mtw:if test="showForm" value="login">
33
        	<mtw:if test="showForm" value="login">
34
				showLoginDialog();
34
				showLoginDialog();
35
			</mtw:if>
35
			</mtw:if>
36
			
36
			
37
			<mtw:if test="showForm" value="add">
37
			<mtw:if test="showForm" value="add">
38
				showCreateNewPageDialog();
38
				showCreateNewPageDialog();
39
			</mtw:if>	
39
			</mtw:if>	
40
			
40
			
41
			$('#loginDialog').keyup(function(e) {
41
			$('#loginDialog').keyup(function(e) {
42
    			if (e.keyCode == 13) {
42
    			if (e.keyCode == 13) {
43
        			$('#loginForm').submit();
43
        			$('#loginForm').submit();
44
    			}
44
    			}
45
			});
45
			});
46
			
46
			
47
47
48
        });
48
        });
49
        
49
        
50
        function prepareEditPageDialog(myDialog, theTitle) {
50
        function prepareEditPageDialog(myDialog, theTitle) {
51
51
52
            options = {
52
            options = {
53
                autoOpen: false,
53
                autoOpen: false,
54
                width: 800,
54
                width: 800,
55
                modal: true,
55
                modal: true,
56
                title: theTitle,
56
                title: theTitle,
57
                buttons: [
57
                buttons: [
58
                          {
58
                          {
59
                                text: "Save",
59
                                text: "Save",
60
                                click: function() { $('#editPageForm').submit(); }
60
                                click: function() { $('#editPageForm').submit(); }
61
                          },
61
                          },
62
                          {
62
                          {
63
                                text: "Cancel",
63
                                text: "Cancel",
64
                                click: function() { $(this).dialog("close"); }
64
                                click: function() { $(this).dialog("close"); }
65
                          }
65
                          }
66
                      ]
66
                      ]
67
           };
67
           };
68
68
69
          myDialog.dialog(options);
69
          myDialog.dialog(options);
70
70
71
          return myDialog;
71
          return myDialog;
72
        }
72
        }
73
73
74
        function prepareListAllPagesDialog(myDialog) {
74
        function prepareListAllPagesDialog(myDialog) {
75
75
76
            options = {
76
            options = {
77
                autoOpen: false,
77
                autoOpen: false,
78
                width: 800,
78
                width: 800,
79
                height: 450,
79
                height: 450,
80
                modal: true,
80
                modal: true,
81
                title: 'Pages:',
81
                title: 'Pages:',
82
                buttons: [
82
                buttons: [
83
                          {
83
                          {
84
                                text: "Update",
84
                                text: "Update",
85
                                click: function() { $('#editPageForm').submit(); }
85
                                click: function() { $('#editPageForm').submit(); }
86
                          },
86
                          },
87
                          {
87
                          {
88
                                text: "Close",
88
                                text: "Close",
89
                                click: function() { $(this).dialog("close"); }
89
                                click: function() { $(this).dialog("close"); }
90
                          }
90
                          }
91
                      ]
91
                      ]
92
           };
92
           };
93
93
94
          myDialog.dialog(options);
94
          myDialog.dialog(options);
95
95
96
          return myDialog;
96
          return myDialog;
97
        }
97
        }
98
98
99
        
99
        
100
        function showEditPageDialog(pageName, lang) {
100
        function showEditPageDialog(pageName, lang) {
101
101
102
            $.getJSON('<mtw:contextPath />/Page.get.mtw?name=' + pageName + '&lang=' + lang, function(data) {
102
            $.getJSON('<mtw:contextPath />/Page.get.mtw?name=' + pageName + '&lang=' + lang, function(data) {
103
103
104
                $('#editPageTextArea').val(data.page.body);
104
                $('#editPageTextArea').val(data.page.body);
105
                $('#editPageName').val(data.page.name);
105
                $('#editPageName').val(data.page.name);
106
                $('#editPageLang').val(data.page.lang);
106
                $('#editPageLang').val(data.page.lang);
107
107
108
                myDialog = $('#editPageDialog');
108
                myDialog = $('#editPageDialog');
109
                myDialog = prepareEditPageDialog(myDialog, 'Editing <i><font color="darkblue">' + pageName + "</font></i> in <i>" + data.page.language + "<i>...");
109
                myDialog = prepareEditPageDialog(myDialog, 'Editing <i><font color="darkblue">' + pageName + "</font></i> in <i>" + data.page.language + "<i>...");
110
                myDialog.dialog('open');
110
                myDialog.dialog('open');
111
            });
111
            });
112
            
112
            
113
            return false;
113
            return false;
114
        }
114
        }
115
115
116
        function showListAllPagesDialog() {
116
        function showListAllPagesDialog() {
117
117
118
            $.getJSON('<mtw:contextPath />/Page.list.mtw', function(data) {
118
            $.getJSON('<mtw:contextPath />/Page.list.mtw', function(data) {
119
119
120
                tableData = '';
120
                tableData = '';
121
                tableData += '<tr>';
121
                tableData += '<tr>';
122
                tableData += '<th>Name</th>';
122
                tableData += '<th>Name</th>';
123
                tableData += '<th>Language</th>';
123
                tableData += '<th>Language</th>';
124
                tableData += '<th>Front Page</th>';
124
                tableData += '<th>Front Page</th>';
125
                tableData += '<th>System Page</th>';
125
                tableData += '<th>System Page</th>';
126
                tableData += '<th>Created By</th>';
126
                tableData += '<th>Created By</th>';
127
                tableData += '<th>Modified By</th>';
127
                tableData += '<th>Modified By</th>';
128
                tableData += '<th>&nbsp;</th>';
128
                tableData += '<th>&nbsp;</th>';
129
                tableData += '</tr>';
129
                tableData += '</tr>';
130
130
131
                $.each(data.pages, function(i,page) {
131
                $.each(data.pages, function(i,page) {
132
132
133
                    modifiedBy = '';
133
                    modifiedBy = '';
134
                    if (page.modifiedById > 0) {
134
                    if (page.modifiedById > 0) {
135
                        modifiedBy = page.modifiedBy.username;
135
                        modifiedBy = page.modifiedBy.username;
136
                    }
136
                    }
137
137
138
                    systemPage = '';
138
                    systemPage = '';
139
                    if (page.systemPage == true) {
139
                    if (page.systemPage == true) {
140
                        systemPage = 'X';
140
                        systemPage = 'X';
141
                    }
141
                    }
142
142
143
                    frontPage = '';
143
                    frontPage = '';
144
                    if (page.frontPage == true) {
144
                    if (page.frontPage == true) {
145
                        frontPage = 'X';
145
                        frontPage = 'X';
146
                    }
146
                    }
147
                    
147
                    
148
                    modifiedOnTitle = '';
148
                    modifiedOnTitle = '';
149
                    if (page.formattedModifiedOn != null) {
149
                    if (page.formattedModifiedOn != null) {
150
                    	modifiedOnTitle = ' title="' + page.formattedModifiedOn + '"';
150
                    	modifiedOnTitle = ' title="' + page.formattedModifiedOn + '"';
151
                    }
151
                    }
152
                    
152
                    
153
                    createdOnTitle = '';
153
                    createdOnTitle = '';
154
                    if (page.formattedCreatedOn != null) {
154
                    if (page.formattedCreatedOn != null) {
155
                    	createdOnTitle = ' title="' + page.formattedCreatedOn + '"';
155
                    	createdOnTitle = ' title="' + page.formattedCreatedOn + '"';
156
                    }
156
                    }
157
                    
157
                    
158
                    viewCell = '&nbsp;';
158
                    viewCell = '&nbsp;';
159
                    if (page.CSS == false) {
159
                    if (page.CSS == false) {
160
                    	viewCell = '<a href="<mtw:contextPath/>/Page.mtw?name=' + page.name + '&lang=' + page.lang + '">View</a>';
160
                    	viewCell = '<a href="<mtw:contextPath/>/Page.mtw?name=' + page.name + '&lang=' + page.lang + '">View</a>';
-
 
161
                    }
-
 
162
                    
-
 
163
                    nameTitle = '';
-
 
164
                    if (page.title != null && page.title != '') {
-
 
165
                    	nameTitle = ' title="' + page.title + '"';
161
                    }
166
                    }
162
167
163
                    tableData += '<tr>';
168
                    tableData += '<tr>';
164
                    tableData += '<td>' + page.name + '</td>';
-
 
-
 
169
                    tableData += '<td' + nameTitle + '>' + page.name + '</td>';
165
                    tableData += '<td align="center">' + page.language + '</td>';
170
                    tableData += '<td align="center">' + page.language + '</td>';
166
                    tableData += '<td align="center">' + frontPage + '</td>';
171
                    tableData += '<td align="center">' + frontPage + '</td>';
167
                    tableData += '<td align="center">' + systemPage + '</td>';
172
                    tableData += '<td align="center">' + systemPage + '</td>';
168
                    tableData += '<td align="center"' + createdOnTitle + '>' + page.createdBy.username + '</td>';
173
                    tableData += '<td align="center"' + createdOnTitle + '>' + page.createdBy.username + '</td>';
169
                    tableData += '<td align="center"' + modifiedOnTitle + '>' + modifiedBy + '</td>';
174
                    tableData += '<td align="center"' + modifiedOnTitle + '>' + modifiedBy + '</td>';
170
                    tableData += '<td align="center">' + viewCell + '</td>';
175
                    tableData += '<td align="center">' + viewCell + '</td>';
171
                    tableData += '</tr>';
176
                    tableData += '</tr>';
172
                });
177
                });
173
178
174
                $('#listAllPagesTable').html(tableData);
179
                $('#listAllPagesTable').html(tableData);
175
180
176
                myDialog = $('#listAllPagesDialog');
181
                myDialog = $('#listAllPagesDialog');
177
                myDialog = prepareListAllPagesDialog(myDialog);
182
                myDialog = prepareListAllPagesDialog(myDialog);
178
                myDialog.dialog('open');
183
                myDialog.dialog('open');
179
             });
184
             });
180
            
185
            
181
            return false;
186
            return false;
182
        }
187
        }
183
        
188
        
184
       	function showCreateNewPageDialog() {
189
       	function showCreateNewPageDialog() {
185
190
186
            $('#createNewPageFormName').val('<mtw:out value="bodyColumn.name" />');
191
            $('#createNewPageFormName').val('<mtw:out value="bodyColumn.name" />');
187
            $('#createNewPageFormLang').val('<mtw:out value="bodyColumn.lang" />');
192
            $('#createNewPageFormLang').val('<mtw:out value="bodyColumn.lang" />');
188
193
189
            myDialog = $('#createNewPageDialog');
194
            myDialog = $('#createNewPageDialog');
190
            myDialog = prepareCreateNewPageDialog(myDialog);
195
            myDialog = prepareCreateNewPageDialog(myDialog);
191
            myDialog.dialog('open');
196
            myDialog.dialog('open');
192
            
197
            
193
            return false;
198
            return false;
194
        }
199
        }
195
        
200
        
196
        function prepareCreateNewPageDialog(myDialog) {
201
        function prepareCreateNewPageDialog(myDialog) {
197
202
198
            options = {
203
            options = {
199
            	close: function() { clearCreateNewPageForm(); },
204
            	close: function() { clearCreateNewPageForm(); },
200
                autoOpen: false,
205
                autoOpen: false,
201
                width: 800,
206
                width: 800,
202
                modal: true,
207
                modal: true,
203
                title: "Create New Page:",
208
                title: "Create New Page:",
204
                buttons: [
209
                buttons: [
205
                          {
210
                          {
206
                                text: "Create",
211
                                text: "Create",
207
                                click: function() { $('#createNewPageForm').submit(); }
212
                                click: function() { $('#createNewPageForm').submit(); }
208
                          },
213
                          },
209
                          {
214
                          {
210
                                text: "Cancel",
215
                                text: "Cancel",
211
                                click: function() {  $(this).dialog("close"); }
216
                                click: function() {  $(this).dialog("close"); }
212
                          }
217
                          }
213
                      ]
218
                      ]
214
           };
219
           };
215
220
216
          myDialog.dialog(options);
221
          myDialog.dialog(options);
217
222
218
          return myDialog;
223
          return myDialog;
219
        }
224
        }
220
        
225
        
221
    
226
    
222
        function showLoginDialog() {
227
        function showLoginDialog() {
223
228
224
            $('#loginFormName').val('<mtw:out value="bodyColumn.name" />');
229
            $('#loginFormName').val('<mtw:out value="bodyColumn.name" />');
225
            $('#loginFormLang').val('<mtw:out value="bodyColumn.lang" />');
230
            $('#loginFormLang').val('<mtw:out value="bodyColumn.lang" />');
226
231
227
            myDialog = $('#loginDialog');
232
            myDialog = $('#loginDialog');
228
            myDialog = prepareLoginDialog(myDialog);
233
            myDialog = prepareLoginDialog(myDialog);
229
            myDialog.dialog('open');
234
            myDialog.dialog('open');
230
235
231
            return false;
236
            return false;
232
        }
237
        }
233
        
238
        
234
        function clearLoginForm() {
239
        function clearLoginForm() {
235
        	$('#loginUsername').val('');
240
        	$('#loginUsername').val('');
236
        	$('#loginPassword').val('');
241
        	$('#loginPassword').val('');
237
        	$('#loginUsernameError').text('');
242
        	$('#loginUsernameError').text('');
238
        	$('#loginPasswordError').text('');
243
        	$('#loginPasswordError').text('');
239
        }
244
        }
240
        
245
        
241
        function clearCreateNewPageForm() {
246
        function clearCreateNewPageForm() {
242
        	$('#createNewPageName').val('');
247
        	$('#createNewPageName').val('');
243
        	$('#createNewPageTitle').val('');
248
        	$('#createNewPageTitle').val('');
244
        	$('#createNewPageLanguage').val('');
249
        	$('#createNewPageLanguage').val('');
245
        	$('#createNewPageTextArea').val('');
250
        	$('#createNewPageTextArea').val('');
246
        	$('#createNewPageNameError').text('');
251
        	$('#createNewPageNameError').text('');
247
        	$('#createNewPageTitleError').text('');
252
        	$('#createNewPageTitleError').text('');
248
        	$('#createNewPageLanguageError').text('');
253
        	$('#createNewPageLanguageError').text('');
249
        	$('#createNewPageBodyError').text('');
254
        	$('#createNewPageBodyError').text('');
250
        }
255
        }
251
        
256
        
252
      	function prepareLoginDialog(myDialog) {
257
      	function prepareLoginDialog(myDialog) {
253
258
254
            options = {
259
            options = {
255
            	close: function() { clearLoginForm(); },
260
            	close: function() { clearLoginForm(); },
256
                autoOpen: false,
261
                autoOpen: false,
257
                width: 290,
262
                width: 290,
258
                modal: true,
263
                modal: true,
259
                title: "Login:",
264
                title: "Login:",
260
                buttons: [
265
                buttons: [
261
                          {
266
                          {
262
                                text: "Login",
267
                                text: "Login",
263
                                click: function() { $('#loginForm').submit(); }
268
                                click: function() { $('#loginForm').submit(); }
264
                          },
269
                          },
265
                          {
270
                          {
266
                                text: "Cancel",
271
                                text: "Cancel",
267
                                click: function() {  $(this).dialog("close"); }
272
                                click: function() {  $(this).dialog("close"); }
268
                          }
273
                          }
269
                      ]
274
                      ]
270
           };
275
           };
271
276
272
          myDialog.dialog(options);
277
          myDialog.dialog(options);
273
278
274
          return myDialog;
279
          return myDialog;
275
        }
280
        }
276
        
281
        
277
      	function prepareConfirmDialog(myDialog) {
282
      	function prepareConfirmDialog(myDialog) {
278
283
279
            options = {
284
            options = {
280
                autoOpen: false,
285
                autoOpen: false,
281
                width: 300,
286
                width: 300,
282
                modal: true,
287
                modal: true,
283
                title: "Confirmation:",
288
                title: "Confirmation:",
284
                buttons: [
289
                buttons: [
285
                          {
290
                          {
286
                                text: "Yes",
291
                                text: "Yes",
287
                                click: function() { $(this).dialog("close"); }
292
                                click: function() { $(this).dialog("close"); }
288
                          },
293
                          },
289
                          {
294
                          {
290
                                text: "No",
295
                                text: "No",
291
                                click: function() {  $(this).dialog("close"); }
296
                                click: function() {  $(this).dialog("close"); }
292
                          }
297
                          }
293
                      ]
298
                      ]
294
           };
299
           };
295
300
296
          myDialog.dialog(options);
301
          myDialog.dialog(options);
297
302
298
          return myDialog;
303
          return myDialog;
299
        }
304
        }
300
        
305
        
301
         function showConfirmDialog() {
306
         function showConfirmDialog() {
302
307
303
            myDialog = $('#confirmDialog');
308
            myDialog = $('#confirmDialog');
304
            myDialog = prepareConfirmDialog(myDialog);
309
            myDialog = prepareConfirmDialog(myDialog);
305
            myDialog.dialog('open');
310
            myDialog.dialog('open');
306
311
307
            return false;
312
            return false;
308
        }
313
        }
309
        
314
        
310
    </script>
315
    </script>
311
316
312
</head>
317
</head>
313
318
314
<body class="composite">
319
<body class="composite">
315
320
316
<!-- For Testing -->
321
<!-- For Testing -->
317
<div id="dialog" title="Dialog Title" style="display: none;">I'm in a dialog</div>
322
<div id="dialog" title="Dialog Title" style="display: none;">I'm in a dialog</div>
318
323
319
<!-- Close Confirm -->
324
<!-- Close Confirm -->
320
<div id="confirmDialog" style="display: none;">
325
<div id="confirmDialog" style="display: none;">
321
	<span id="confirmMessage">The confirmation message goes here.</span>
326
	<span id="confirmMessage">The confirmation message goes here.</span>
322
</div>
327
</div>
323
328
324
<!-- For Editing Pages -->
329
<!-- For Editing Pages -->
325
<div id="editPageDialog" style="display: none;">
330
<div id="editPageDialog" style="display: none;">
326
<form id="editPageForm" action="<mtw:contextPath />/Page.edit.mtw" method="post">
331
<form id="editPageForm" action="<mtw:contextPath />/Page.edit.mtw" method="post">
327
<input type="hidden" name="name" id ="editPageName" value="" />
332
<input type="hidden" name="name" id ="editPageName" value="" />
328
<input type="hidden" name="lang" id="editPageLang" value="" />
333
<input type="hidden" name="lang" id="editPageLang" value="" />
329
<table>
334
<table>
330
    <tr>
335
    <tr>
331
        <td>&nbsp;</td>
336
        <td>&nbsp;</td>
332
    </tr>
337
    </tr>
333
    <mtw:outError field="html">
338
    <mtw:outError field="html">
334
        <tr>
339
        <tr>
335
            <td colspan="2"><span class="Negative" style="font-weight: bold;"><mtw:out /></span></td>
340
            <td colspan="2"><span class="Negative" style="font-weight: bold;"><mtw:out /></span></td>
336
        </tr>
341
        </tr>
337
    </mtw:outError>
342
    </mtw:outError>
338
    <tr>
343
    <tr>
339
        <td colspan="2"><mtw:textarea id="editPageTextArea" name="body" style="width: 100%; height: 465px;" /></td>
344
        <td colspan="2"><mtw:textarea id="editPageTextArea" name="body" style="width: 100%; height: 465px;" /></td>
340
    </tr>
345
    </tr>
341
</table>
346
</table>
342
</form>
347
</form>
343
</div>
348
</div>
344
349
345
<!-- For Login -->
350
<!-- For Login -->
346
<div id="loginDialog" style="display: none;">
351
<div id="loginDialog" style="display: none;">
347
		<form action="<mtw:contextPath />/Login.mtw" method="post" id="loginForm">
352
		<form action="<mtw:contextPath />/Login.mtw" method="post" id="loginForm">
348
            <input type="hidden" name="name" value="" id="loginFormName" />
353
            <input type="hidden" name="name" value="" id="loginFormName" />
349
            <input type="hidden" name="lang" value="" id="loginFormLang" />
354
            <input type="hidden" name="lang" value="" id="loginFormLang" />
350
			<table>
355
			<table>
351
				<tr>
356
				<tr>
352
					<td>
357
					<td>
353
						Username:
358
						Username:
354
					</td>
359
					</td>
355
					<td>
360
					<td>
356
						<mtw:input id="loginUsername" name="username" size="20" maxlength="20" />
361
						<mtw:input id="loginUsername" name="username" size="20" maxlength="20" />
357
						<span id="loginUsernameError">
362
						<span id="loginUsernameError">
358
						<mtw:outError field="username">
363
						<mtw:outError field="username">
359
							<font color="red">
364
							<font color="red">
360
								<b><mtw:out /></b>
365
								<b><mtw:out /></b>
361
							</font>
366
							</font>
362
						</mtw:outError>
367
						</mtw:outError>
363
						</span>
368
						</span>
364
					</td>
369
					</td>
365
				</tr>
370
				</tr>
366
				<tr>
371
				<tr>
367
					<td>
372
					<td>
368
						Password:
373
						Password:
369
					</td>
374
					</td>
370
					<td>
375
					<td>
371
						<mtw:input id="loginPassword" name="password" type="password" size="20" maxlength="20" />
376
						<mtw:input id="loginPassword" name="password" type="password" size="20" maxlength="20" />
372
						<span id="loginPasswordError"> 
377
						<span id="loginPasswordError"> 
373
						<mtw:outError field="password">
378
						<mtw:outError field="password">
374
							<font color="red">
379
							<font color="red">
375
								<b><mtw:out /></b>
380
								<b><mtw:out /></b>
376
							</font>
381
							</font>
377
						</mtw:outError>
382
						</mtw:outError>
378
						</span>
383
						</span>
379
					</td>
384
					</td>
380
				</tr>
385
				</tr>
381
			</table>
386
			</table>
382
		</form>
387
		</form>
383
</div>
388
</div>
384
389
385
<!-- For displaying all pages -->
390
<!-- For displaying all pages -->
386
<div id="listAllPagesDialog" style="display: none;">
391
<div id="listAllPagesDialog" style="display: none;">
387
    <table id="listAllPagesTable">
392
    <table id="listAllPagesTable">
388
    </table>
393
    </table>
389
</div>
394
</div>
390
395
391
<!-- Create New Page -->
396
<!-- Create New Page -->
392
<div id="createNewPageDialog" style="display: none;">
397
<div id="createNewPageDialog" style="display: none;">
393
		<form action="<mtw:contextPath />/Page.add.mtw" method="post" id="createNewPageForm">
398
		<form action="<mtw:contextPath />/Page.add.mtw" method="post" id="createNewPageForm">
394
            <input type="hidden" name="name" value="" id="createNewPageFormName" />
399
            <input type="hidden" name="name" value="" id="createNewPageFormName" />
395
            <input type="hidden" name="lang" value="" id="createNewPageFormLang" />
400
            <input type="hidden" name="lang" value="" id="createNewPageFormLang" />
396
			<table>
401
			<table>
397
				<tr>
402
				<tr>
398
					<td>
403
					<td>
399
						Name:
404
						Name:
400
					</td>
405
					</td>
401
					<td>
406
					<td>
402
						<mtw:input id="createNewPageName" name="newPage.name" size="40" maxlength="30" />
407
						<mtw:input id="createNewPageName" name="newPage.name" size="40" maxlength="30" />
403
						<span id="createNewPageNameError">
408
						<span id="createNewPageNameError">
404
						<mtw:outError field="newPage.name">
409
						<mtw:outError field="newPage.name">
405
							<font color="red">
410
							<font color="red">
406
								<b><mtw:out /></b>
411
								<b><mtw:out /></b>
407
							</font>
412
							</font>
408
						</mtw:outError>
413
						</mtw:outError>
409
						</span>
414
						</span>
410
					</td>
415
					</td>
411
				</tr>
416
				</tr>
412
				<tr>
417
				<tr>
413
					<td>
418
					<td>
414
						Title:
419
						Title:
415
					</td>
420
					</td>
416
					<td>
421
					<td>
417
						<mtw:input id="createNewPageTitle" name="newPage.title" size="40" maxlength="60" />
422
						<mtw:input id="createNewPageTitle" name="newPage.title" size="40" maxlength="60" />
418
						<span id="createNewPageTitleError">
423
						<span id="createNewPageTitleError">
419
						<mtw:outError field="newPage.title">
424
						<mtw:outError field="newPage.title">
420
							<font color="red">
425
							<font color="red">
421
								<b><mtw:out /></b>
426
								<b><mtw:out /></b>
422
							</font>
427
							</font>
423
						</mtw:outError>
428
						</mtw:outError>
424
						</span>
429
						</span>
425
					</td>
430
					</td>
426
				</tr>
431
				</tr>
427
				<tr>
432
				<tr>
428
					<td>
433
					<td>
429
						Language:
434
						Language:
430
					</td>
435
					</td>
431
					<td>
436
					<td>
432
						<mtw:select name="newPage.languageId" list="languages" id="createNewPageLanguage" emptyField="true" />
437
						<mtw:select name="newPage.languageId" list="languages" id="createNewPageLanguage" emptyField="true" />
433
						<span id="createNewPageLanguageError">
438
						<span id="createNewPageLanguageError">
434
						<mtw:outError field="newPage.languageId">
439
						<mtw:outError field="newPage.languageId">
435
							<font color="red">
440
							<font color="red">
436
								<b><mtw:out /></b>
441
								<b><mtw:out /></b>
437
							</font>
442
							</font>
438
						</mtw:outError>
443
						</mtw:outError>
439
						</span>
444
						</span>
440
					</td>
445
					</td>
441
				</tr>
446
				</tr>
442
				<tr>
447
				<tr>
443
        			<td colspan="2">
448
        			<td colspan="2">
444
        				<mtw:textarea id="createNewPageTextArea" name="newPage.body" style="width: 100%; height: 465px;" />
449
        				<mtw:textarea id="createNewPageTextArea" name="newPage.body" style="width: 100%; height: 465px;" />
445
        				<span id="createNewPageBodyError">
450
        				<span id="createNewPageBodyError">
446
						<mtw:outError field="newPage.body">
451
						<mtw:outError field="newPage.body">
447
							<font color="red">
452
							<font color="red">
448
								<b><mtw:out /></b>
453
								<b><mtw:out /></b>
449
							</font>
454
							</font>
450
						</mtw:outError>
455
						</mtw:outError>
451
						</span>
456
						</span>
452
        			</td>
457
        			</td>
453
    			</tr>
458
    			</tr>
454
			</table>
459
			</table>
455
		</form>
460
		</form>
456
</div>
461
</div>
457
462
458
463
459
<div>
464
<div>
460
<table border="0">
465
<table border="0">
461
    <tr>
466
    <tr>
462
        <td><a href="<mtw:contextPath/>"><img src="images/logos/logo.png" border="0"></img></a></td>
467
        <td><a href="<mtw:contextPath/>"><img src="images/logos/logo.png" border="0"></img></a></td>
463
        <td align="right" valign="bottom">
468
        <td align="right" valign="bottom">
464
            <mtw:isLogged negate="true">
469
            <mtw:isLogged negate="true">
465
                <a href="#" onclick="return showLoginDialog();">Login</a>
470
                <a href="#" onclick="return showLoginDialog();">Login</a>
466
            </mtw:isLogged>
471
            </mtw:isLogged>
467
            <mtw:isLogged>
472
            <mtw:isLogged>
468
                <a href="#" onclick="return showCreateNewPageDialog();">Create New Page</a> |
473
                <a href="#" onclick="return showCreateNewPageDialog();">Create New Page</a> |
469
                <a href="#" onclick="return showListAllPagesDialog();">List Pages</a> |
474
                <a href="#" onclick="return showListAllPagesDialog();">List Pages</a> |
470
                <mtw:hasAuthorization groups="admin">
475
                <mtw:hasAuthorization groups="admin">
471
                <a href="#" onclick="return showEditPageDialog('CSS', 'en');" title="<k:editTooltip name="css" />">Edit CSS</a> |
476
                <a href="#" onclick="return showEditPageDialog('CSS', 'en');" title="<k:editTooltip name="css" />">Edit CSS</a> |
472
                </mtw:hasAuthorization>
477
                </mtw:hasAuthorization>
473
                <a href="<mtw:contextPath/>/Logout.mtw">Logout</a> (<mtw:out value="sessionUser.username" />)
478
                <a href="<mtw:contextPath/>/Logout.mtw">Logout</a> (<mtw:out value="sessionUser.username" />)
474
            </mtw:isLogged>
479
            </mtw:isLogged>
475
            &nbsp;
480
            &nbsp;
476
            <mtw:isLocale value="pt">
481
            <mtw:isLocale value="pt">
477
	            <a href="<mtw:urlWithLoc loc="pt" />"><img src="images/brazil.gif" border="0" width="20" height="13" style="border: 3px solid #ccc;" /></a>
482
	            <a href="<mtw:urlWithLoc loc="pt" />"><img src="images/brazil.gif" border="0" width="20" height="13" style="border: 3px solid #ccc;" /></a>
478
    	        <a href="<mtw:urlWithLoc loc="en" />"><img src="images/usa.gif" width="20" height="13" border="0" style="border: 3px solid #fff;" /></a>
483
    	        <a href="<mtw:urlWithLoc loc="en" />"><img src="images/usa.gif" width="20" height="13" border="0" style="border: 3px solid #fff;" /></a>
479
            </mtw:isLocale>
484
            </mtw:isLocale>
480
            <mtw:isLocale value="en">
485
            <mtw:isLocale value="en">
481
            	<a href="<mtw:urlWithLoc loc="pt" />"><img src="images/brazil.gif" border="0" width="20" height="13" style="border: 3px solid #fff;" /></a>
486
            	<a href="<mtw:urlWithLoc loc="pt" />"><img src="images/brazil.gif" border="0" width="20" height="13" style="border: 3px solid #fff;" /></a>
482
            	<a href="<mtw:urlWithLoc loc="en" />"><img src="images/usa.gif" width="20" height="13" border="0" style="border: 3px solid #ccc;" /></a>
487
            	<a href="<mtw:urlWithLoc loc="en" />"><img src="images/usa.gif" width="20" height="13" border="0" style="border: 3px solid #ccc;" /></a>
483
            </mtw:isLocale>
488
            </mtw:isLocale>
484
            &nbsp;&nbsp;&nbsp;
489
            &nbsp;&nbsp;&nbsp;
485
        </td>
490
        </td>
486
    </tr>
491
    </tr>
487
</table>
492
</table>
488
</div>
493
</div>
489
494
490
<hr />
495
<hr />
491
496
492
<div id="leftColumn"><mtw:isLogged>
497
<div id="leftColumn"><mtw:isLogged>
493
    <mtw:hasAuthorization groups="admin">
498
    <mtw:hasAuthorization groups="admin">
494
        <div style="text-align: right; padding-right: 14px; padding-top: 6px;"><a href="#" onclick="return showEditPageDialog('LeftColumn', '<mtw:out value="leftColumn.language.locale" />');" title="<k:editTooltip name="leftColumn" />">Edit</a></div>
499
        <div style="text-align: right; padding-right: 14px; padding-top: 6px;"><a href="#" onclick="return showEditPageDialog('LeftColumn', '<mtw:out value="leftColumn.language.locale" />');" title="<k:editTooltip name="leftColumn" />">Edit</a></div>
495
    </mtw:hasAuthorization>
500
    </mtw:hasAuthorization>
496
</mtw:isLogged>
501
</mtw:isLogged>
497
<div id="navcolumn">
502
<div id="navcolumn">
498
    <div>
503
    <div>
499
    <mtw:out value="leftColumn.body" />
504
    <mtw:out value="leftColumn.body" />
500
    </div>
505
    </div>
501
<br />
506
<br />
502
</div>
507
</div>
503
508
504
</div>
509
</div>
505
510
506
<div id="bodyColumn">
511
<div id="bodyColumn">
507
    <mtw:hasAuthorization groups="admin, editor">
512
    <mtw:hasAuthorization groups="admin, editor">
508
    <div style="text-align: right; padding-right: 14px;"><a href="#" onclick="return showEditPageDialog('<mtw:out value="bodyColumn.name" />', '<mtw:out value="bodyColumn.language.locale" />');" title="<k:editTooltip name="bodyColumn" />">Edit</a></div>
513
    <div style="text-align: right; padding-right: 14px;"><a href="#" onclick="return showEditPageDialog('<mtw:out value="bodyColumn.name" />', '<mtw:out value="bodyColumn.language.locale" />');" title="<k:editTooltip name="bodyColumn" />">Edit</a></div>
509
    </mtw:hasAuthorization>
514
    </mtw:hasAuthorization>
510
    <mtw:out value="bodyColumn.body" />
515
    <mtw:out value="bodyColumn.body" />
511
</div>
516
</div>
512
517
513
<div class="clear">
518
<div class="clear">
514
<hr />
519
<hr />
515
</div>
520
</div>
516
521
517
<div id="footer">
522
<div id="footer">
518
<div class="xright">Copyright � 2011</div>
523
<div class="xright">Copyright � 2011</div>
519
<div class="clear">
524
<div class="clear">
520
<hr />
525
<hr />
521
</div>
526
</div>
522
</div>
527
</div>
523
528
524
</body>
529
</body>
525
</html>
530
</html>