Kawai Wiki

Rev

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

Rev Author Line No. Line
12 soliveira 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/"%>
26 soliveira 3
<%@ taglib uri="/WEB-INF/tld/taglib.tld" prefix="k" %>
12 soliveira 4
 
5
<html>
6
<head>
7
 
8
<title>Mentawai Web Framework</title>
9
 
10
<style type="text/css" media="all">
31 soliveira 11
@import url("<mtw:contextPath/>/GenerateCSS.getCSS.css");
12 soliveira 12
</style>
13
 
14
<meta http-equiv="imagetoolbar" content="no" />
15
<meta http-equiv="imagetoolbar" content="false" />
16
 
17
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
18
<link rel="icon" type="image/gif" href="/favicon.gif" />
31 soliveira 19
<link rel="stylesheet" href="<mtw:contextPath/>/GenerateCSS.getPrintCSS.css" type="text/css" media="print" />
12 soliveira 20
 
21
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
22
<meta name="author" content="Sergio Oliveira Junior" />
23
<meta name="email" content="sergio.oliveira.jr@gmail.com" />
24
 
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>
27
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
28
 
29
<script language="JavaScript">
30
 
31
        $(document).ready(function() {
33 soliveira 32
 
33
        	<mtw:if test="showForm" value="login">
39 soliveira 34
				showLoginDialog();
35
			</mtw:if>
36
 
37
			<mtw:if test="showForm" value="add">
38
				showCreateNewPageDialog();
33 soliveira 39
			</mtw:if>
35 soliveira 40
 
41
			$('#loginDialog').keyup(function(e) {
42
    			if (e.keyCode == 13) {
43
        			$('#loginForm').submit();
44
    			}
45
			});
46
 
33 soliveira 47
 
12 soliveira 48
        });
49
 
28 soliveira 50
        function prepareEditPageDialog(myDialog, theTitle) {
12 soliveira 51
 
52
            options = {
53
                autoOpen: false,
54
                width: 800,
55
                modal: true,
56
                title: theTitle,
57
                buttons: [
58
                          {
59
                                text: "Save",
28 soliveira 60
                                click: function() { $('#editPageForm').submit(); }
12 soliveira 61
                          },
62
                          {
65 soliveira 63
                                text: "Preview",
64
                                click: function() { $('#editPagePreview').val('true'); $('#editPageForm').submit(); }
65
                          },
66
                          {
12 soliveira 67
                                text: "Cancel",
68
                                click: function() { $(this).dialog("close"); }
69
                          }
70
                      ]
71
           };
72
 
73
          myDialog.dialog(options);
74
 
75
          return myDialog;
76
        }
49 soliveira 77
 
78
        function prepareListAllPagesDialog(myDialog) {
79
 
80
            options = {
81
                autoOpen: false,
82
                width: 800,
53 soliveira 83
                height: 450,
49 soliveira 84
                modal: true,
85
                title: 'Pages:',
86
                buttons: [
87
                          {
55 soliveira 88
                                text: "FrontPage",
56 soliveira 89
                                click: function() { $('#listAllPagesForm').attr('action', '<mtw:contextPath/>/Page.setFrontPage.mtw'); $('#listAllPagesForm').submit(); }
49 soliveira 90
                          },
91
                          {
55 soliveira 92
                                text: "Delete",
57 soliveira 93
                                click: function() { $('#listAllPagesForm').attr('action', '<mtw:contextPath/>/Page.delete.mtw'); $('#listAllPagesForm').submit(); }
55 soliveira 94
                          },
95
                          {
49 soliveira 96
                                text: "Close",
97
                                click: function() { $(this).dialog("close"); }
98
                          }
99
                      ]
100
           };
101
 
102
          myDialog.dialog(options);
103
 
104
          return myDialog;
105
        }
106
 
33 soliveira 107
 
41 soliveira 108
        function showEditPageDialog(pageName, lang) {
12 soliveira 109
 
41 soliveira 110
            $.getJSON('<mtw:contextPath />/Page.get.mtw?name=' + pageName + '&lang=' + lang, function(data) {
18 soliveira 111
 
72 soliveira 112
                if (data.page.systemPage) {
113
                	$('.editPageTitleCell').hide();
114
                } else {
115
                	$('.editPageTitleCell').show();
116
                	$('#editPageTitle').val(data.page.title);
117
                }
28 soliveira 118
                $('#editPageTextArea').val(data.page.body);
119
                $('#editPageName').val(data.page.name);
41 soliveira 120
                $('#editPageLang').val(data.page.lang);
12 soliveira 121
 
28 soliveira 122
                myDialog = $('#editPageDialog');
123
                myDialog = prepareEditPageDialog(myDialog, 'Editing <i><font color="darkblue">' + pageName + "</font></i> in <i>" + data.page.language + "<i>...");
12 soliveira 124
                myDialog.dialog('open');
125
            });
126
 
127
            return false;
128
        }
63 soliveira 129
 
65 soliveira 130
        function showEditPreviewDialog(pageName, lang) {
49 soliveira 131
 
63 soliveira 132
            $.getJSON('<mtw:contextPath />/Page.getPreview.mtw?name=' + pageName + '&lang=' + lang, function(data) {
65 soliveira 133
 
72 soliveira 134
            	if (data.page.systemPage) {
135
                	$('.editPageTitleCell').hide();
136
                } else {
137
                	$('.editPageTitleCell').show();
138
                	$('#editPageTitle').val(data.page.title);
139
                }
65 soliveira 140
                $('#editPageTextArea').val(data.page.body);
141
                $('#editPageName').val(data.page.name);
142
                $('#editPageLang').val(data.page.lang);
143
 
144
                myDialog = $('#editPageDialog');
145
                myDialog = prepareEditPageDialog(myDialog, 'Editing <i><font color="darkblue">' + pageName + "</font></i> in <i>" + data.page.language + "<i>...");
146
                myDialog.dialog('open');
147
            });
63 soliveira 148
 
65 soliveira 149
            return false;
150
        }
151
 
152
 
153
       	function showEditPreviewNewPageDialog(pageName, lang) {
154
 
155
            $.getJSON('<mtw:contextPath />/Page.getPreview.mtw?name=' + pageName + '&lang=' + lang, function(data) {
156
 
63 soliveira 157
           		$('#createNewPageName').val(data.page.name);
158
        		$('#createNewPageTitle').val(data.page.title);
159
        		$('#createNewPageLanguage').val(data.page.languageId);
160
        		$('#createNewPageTextArea').val(data.page.body);
161
        		$('#createNewPageNameError').text('');
162
        		$('#createNewPageTitleError').text('');
163
        		$('#createNewPageLanguageError').text('');
164
        		$('#createNewPageBodyError').text('');
165
 
166
				showCreateNewPageDialog();
72 soliveira 167
 
168
				$('#createPageLanguageCell').hide();
63 soliveira 169
            });
170
 
171
            return false;
172
        }
173
 
49 soliveira 174
        function showListAllPagesDialog() {
175
 
176
            $.getJSON('<mtw:contextPath />/Page.list.mtw', function(data) {
177
 
178
                tableData = '';
179
                tableData += '<tr>';
55 soliveira 180
                tableData += '<th>&nbsp;</th>';
49 soliveira 181
                tableData += '<th>Name</th>';
182
                tableData += '<th>Language</th>';
183
                tableData += '<th>Created By</th>';
184
                tableData += '<th>Modified By</th>';
185
                tableData += '<th>&nbsp;</th>';
186
                tableData += '</tr>';
187
 
188
                $.each(data.pages, function(i,page) {
55 soliveira 189
 
190
                	pageName = page.name;
49 soliveira 191
 
192
                    modifiedBy = '';
193
                    if (page.modifiedById > 0) {
194
                        modifiedBy = page.modifiedBy.username;
195
                    }
196
 
197
                    if (page.systemPage == true) {
55 soliveira 198
                        pageName = '*' + pageName;
49 soliveira 199
                    }
200
 
201
                    if (page.frontPage == true) {
55 soliveira 202
                        pageName = '[' + pageName + ']';
49 soliveira 203
                    }
52 soliveira 204
 
205
                    modifiedOnTitle = '';
206
                    if (page.formattedModifiedOn != null) {
207
                    	modifiedOnTitle = ' title="' + page.formattedModifiedOn + '"';
208
                    }
209
 
210
                    createdOnTitle = '';
211
                    if (page.formattedCreatedOn != null) {
212
                    	createdOnTitle = ' title="' + page.formattedCreatedOn + '"';
213
                    }
53 soliveira 214
 
55 soliveira 215
                    radioCell = '&nbsp;';
53 soliveira 216
                    viewCell = '&nbsp;';
55 soliveira 217
                    if (page.CSS == false && page.systemPage == false) {
58 soliveira 218
                    	viewCell = '<a tabindex="-1" href="<mtw:contextPath/>/Page.mtw?name=' + page.name + '&lang=' + page.lang + '"><img src="<mtw:contextPath/>/images/view.png" /></a>';
55 soliveira 219
                    	if (page.frontPage == false) {
58 soliveira 220
                    		radioCell = '<input tabindex="-1" type="radio" name="pageId" id="pageId" value="' + page.id + '" />';
55 soliveira 221
                    	}
53 soliveira 222
                    }
54 soliveira 223
 
224
                    nameTitle = '';
225
                    if (page.title != null && page.title != '') {
226
                    	nameTitle = ' title="' + page.title + '"';
227
                    }
49 soliveira 228
 
229
                    tableData += '<tr>';
55 soliveira 230
                    tableData += '<td>' + radioCell + '</td>';
231
                    tableData += '<td' + nameTitle + '>' + pageName + '</td>';
49 soliveira 232
                    tableData += '<td align="center">' + page.language + '</td>';
52 soliveira 233
                    tableData += '<td align="center"' + createdOnTitle + '>' + page.createdBy.username + '</td>';
234
                    tableData += '<td align="center"' + modifiedOnTitle + '>' + modifiedBy + '</td>';
53 soliveira 235
                    tableData += '<td align="center">' + viewCell + '</td>';
49 soliveira 236
                    tableData += '</tr>';
237
                });
238
 
239
                $('#listAllPagesTable').html(tableData);
240
 
241
                myDialog = $('#listAllPagesDialog');
242
                myDialog = prepareListAllPagesDialog(myDialog);
243
                myDialog.dialog('open');
58 soliveira 244
                $('.ui-dialog :button').blur();
49 soliveira 245
             });
246
 
247
            return false;
248
        }
33 soliveira 249
 
36 soliveira 250
       	function showCreateNewPageDialog() {
251
 
42 soliveira 252
            $('#createNewPageFormName').val('<mtw:out value="bodyColumn.name" />');
253
            $('#createNewPageFormLang').val('<mtw:out value="bodyColumn.lang" />');
72 soliveira 254
            $('#createPageLanguageCell').show();
42 soliveira 255
 
36 soliveira 256
            myDialog = $('#createNewPageDialog');
257
            myDialog = prepareCreateNewPageDialog(myDialog);
258
            myDialog.dialog('open');
259
 
260
            return false;
261
        }
262
 
263
        function prepareCreateNewPageDialog(myDialog) {
264
 
265
            options = {
38 soliveira 266
            	close: function() { clearCreateNewPageForm(); },
36 soliveira 267
                autoOpen: false,
268
                width: 800,
269
                modal: true,
270
                title: "Create New Page:",
271
                buttons: [
272
                          {
38 soliveira 273
                                text: "Create",
274
                                click: function() { $('#createNewPageForm').submit(); }
36 soliveira 275
                          },
276
                          {
60 soliveira 277
                              text: "Preview",
278
                              click: function() { $('#createNewPageFormPreview').val('true'); $('#createNewPageForm').submit(); }
279
                          },
280
                          {
36 soliveira 281
                                text: "Cancel",
37 soliveira 282
                                click: function() {  $(this).dialog("close"); }
36 soliveira 283
                          }
284
                      ]
285
           };
286
 
287
          myDialog.dialog(options);
288
 
289
          return myDialog;
290
        }
291
 
33 soliveira 292
 
293
        function showLoginDialog() {
12 soliveira 294
 
42 soliveira 295
            $('#loginFormName').val('<mtw:out value="bodyColumn.name" />');
296
            $('#loginFormLang').val('<mtw:out value="bodyColumn.lang" />');
297
 
33 soliveira 298
            myDialog = $('#loginDialog');
299
            myDialog = prepareLoginDialog(myDialog);
300
            myDialog.dialog('open');
301
 
302
            return false;
303
        }
304
 
35 soliveira 305
        function clearLoginForm() {
306
        	$('#loginUsername').val('');
307
        	$('#loginPassword').val('');
308
        	$('#loginUsernameError').text('');
309
        	$('#loginPasswordError').text('');
36 soliveira 310
        }
33 soliveira 311
 
36 soliveira 312
        function clearCreateNewPageForm() {
313
        	$('#createNewPageName').val('');
314
        	$('#createNewPageTitle').val('');
315
        	$('#createNewPageLanguage').val('');
316
        	$('#createNewPageTextArea').val('');
39 soliveira 317
        	$('#createNewPageNameError').text('');
318
        	$('#createNewPageTitleError').text('');
319
        	$('#createNewPageLanguageError').text('');
320
        	$('#createNewPageBodyError').text('');
36 soliveira 321
        }
322
 
33 soliveira 323
      	function prepareLoginDialog(myDialog) {
324
 
325
            options = {
35 soliveira 326
            	close: function() { clearLoginForm(); },
33 soliveira 327
                autoOpen: false,
328
                width: 290,
329
                modal: true,
330
                title: "Login:",
331
                buttons: [
332
                          {
333
                                text: "Login",
334
                                click: function() { $('#loginForm').submit(); }
335
                          },
336
                          {
337
                                text: "Cancel",
37 soliveira 338
                                click: function() {  $(this).dialog("close"); }
33 soliveira 339
                          }
340
                      ]
341
           };
342
 
343
          myDialog.dialog(options);
344
 
345
          return myDialog;
346
        }
37 soliveira 347
 
348
      	function prepareConfirmDialog(myDialog) {
33 soliveira 349
 
37 soliveira 350
            options = {
351
                autoOpen: false,
352
                width: 300,
353
                modal: true,
354
                title: "Confirmation:",
355
                buttons: [
356
                          {
357
                                text: "Yes",
358
                                click: function() { $(this).dialog("close"); }
359
                          },
360
                          {
361
                                text: "No",
362
                                click: function() {  $(this).dialog("close"); }
363
                          }
364
                      ]
365
           };
366
 
367
          myDialog.dialog(options);
368
 
369
          return myDialog;
370
        }
371
 
372
         function showConfirmDialog() {
373
 
374
            myDialog = $('#confirmDialog');
375
            myDialog = prepareConfirmDialog(myDialog);
376
            myDialog.dialog('open');
377
 
378
            return false;
379
        }
380
 
12 soliveira 381
    </script>
382
 
383
</head>
384
 
385
<body class="composite">
386
 
387
<!-- For Testing -->
388
<div id="dialog" title="Dialog Title" style="display: none;">I'm in a dialog</div>
389
 
37 soliveira 390
<!-- Close Confirm -->
391
<div id="confirmDialog" style="display: none;">
392
	<span id="confirmMessage">The confirmation message goes here.</span>
393
</div>
394
 
33 soliveira 395
<!-- For Editing Pages -->
28 soliveira 396
<div id="editPageDialog" style="display: none;">
41 soliveira 397
<form id="editPageForm" action="<mtw:contextPath />/Page.edit.mtw" method="post">
28 soliveira 398
<input type="hidden" name="name" id ="editPageName" value="" />
41 soliveira 399
<input type="hidden" name="lang" id="editPageLang" value="" />
65 soliveira 400
<input type="hidden" name="isPreview" id="editPagePreview" value="false" />
12 soliveira 401
<table>
402
    <tr>
403
        <td>&nbsp;</td>
404
    </tr>
72 soliveira 405
                <tr class="editPageTitleCell">
406
                    <td>
407
                        Title:
408
                    </td>
409
                    <td>
410
                        <mtw:input id="editPageTitle" name="title" size="40" maxlength="60" />
411
                        <span id="editPageTitleError">
412
                        <mtw:outError field="title">
413
                            <font color="red">
414
                                <b><mtw:out /></b>
415
                            </font>
416
                        </mtw:outError>
417
                        </span>
418
                    </td>
419
                </tr>
420
                <tr class="editPageTitleCell"><td>&nbsp;</td></tr>
12 soliveira 421
    <tr>
72 soliveira 422
        <td colspan="2"><mtw:textarea id="editPageTextArea" name="body" style="width: 100%; height: 465px;" />
423
        <span id="editPageTextAreaError">
424
                        <mtw:outError field="body">
425
                            <font color="red">
426
                                <b><mtw:out /></b>
427
                            </font>
428
                        </mtw:outError>
429
                        </span>
430
 
431
        </td>
12 soliveira 432
    </tr>
433
</table>
434
</form>
435
</div>
436
 
33 soliveira 437
<!-- For Login -->
438
<div id="loginDialog" style="display: none;">
439
		<form action="<mtw:contextPath />/Login.mtw" method="post" id="loginForm">
42 soliveira 440
            <input type="hidden" name="name" value="" id="loginFormName" />
441
            <input type="hidden" name="lang" value="" id="loginFormLang" />
33 soliveira 442
			<table>
443
				<tr>
444
					<td>
445
						Username:
446
					</td>
447
					<td>
35 soliveira 448
						<mtw:input id="loginUsername" name="username" size="20" maxlength="20" />
449
						<span id="loginUsernameError">
33 soliveira 450
						<mtw:outError field="username">
451
							<font color="red">
452
								<b><mtw:out /></b>
453
							</font>
454
						</mtw:outError>
35 soliveira 455
						</span>
33 soliveira 456
					</td>
457
				</tr>
458
				<tr>
459
					<td>
460
						Password:
461
					</td>
462
					<td>
35 soliveira 463
						<mtw:input id="loginPassword" name="password" type="password" size="20" maxlength="20" />
464
						<span id="loginPasswordError">
33 soliveira 465
						<mtw:outError field="password">
466
							<font color="red">
467
								<b><mtw:out /></b>
468
							</font>
469
						</mtw:outError>
35 soliveira 470
						</span>
33 soliveira 471
					</td>
472
				</tr>
473
			</table>
474
		</form>
475
</div>
476
 
49 soliveira 477
<!-- For displaying all pages -->
478
<div id="listAllPagesDialog" style="display: none;">
56 soliveira 479
    <form action="#" method="post" id="listAllPagesForm">
53 soliveira 480
    <table id="listAllPagesTable">
49 soliveira 481
    </table>
56 soliveira 482
    </form>
49 soliveira 483
</div>
484
 
36 soliveira 485
<!-- Create New Page -->
486
<div id="createNewPageDialog" style="display: none;">
487
		<form action="<mtw:contextPath />/Page.add.mtw" method="post" id="createNewPageForm">
42 soliveira 488
            <input type="hidden" name="name" value="" id="createNewPageFormName" />
489
            <input type="hidden" name="lang" value="" id="createNewPageFormLang" />
60 soliveira 490
            <input type="hidden" name="isPreview" value="false" id="createNewPageFormPreview" />
36 soliveira 491
			<table>
492
				<tr>
493
					<td>
494
						Name:
495
					</td>
496
					<td>
39 soliveira 497
						<mtw:input id="createNewPageName" name="newPage.name" size="40" maxlength="30" />
36 soliveira 498
						<span id="createNewPageNameError">
39 soliveira 499
						<mtw:outError field="newPage.name">
36 soliveira 500
							<font color="red">
501
								<b><mtw:out /></b>
502
							</font>
503
						</mtw:outError>
504
						</span>
505
					</td>
506
				</tr>
507
				<tr>
508
					<td>
509
						Title:
510
					</td>
511
					<td>
39 soliveira 512
						<mtw:input id="createNewPageTitle" name="newPage.title" size="40" maxlength="60" />
36 soliveira 513
						<span id="createNewPageTitleError">
39 soliveira 514
						<mtw:outError field="newPage.title">
36 soliveira 515
							<font color="red">
516
								<b><mtw:out /></b>
517
							</font>
518
						</mtw:outError>
519
						</span>
520
					</td>
521
				</tr>
67 soliveira 522
				<tr id="createPageLanguageCell">
36 soliveira 523
					<td>
524
						Language:
525
					</td>
526
					<td>
39 soliveira 527
						<mtw:select name="newPage.languageId" list="languages" id="createNewPageLanguage" emptyField="true" />
36 soliveira 528
						<span id="createNewPageLanguageError">
39 soliveira 529
						<mtw:outError field="newPage.languageId">
36 soliveira 530
							<font color="red">
531
								<b><mtw:out /></b>
532
							</font>
533
						</mtw:outError>
534
						</span>
535
					</td>
536
				</tr>
537
				<tr>
39 soliveira 538
        			<td colspan="2">
539
        				<mtw:textarea id="createNewPageTextArea" name="newPage.body" style="width: 100%; height: 465px;" />
540
        				<span id="createNewPageBodyError">
541
						<mtw:outError field="newPage.body">
542
							<font color="red">
543
								<b><mtw:out /></b>
544
							</font>
545
						</mtw:outError>
546
						</span>
547
        			</td>
36 soliveira 548
    			</tr>
549
			</table>
550
		</form>
551
</div>
33 soliveira 552
 
36 soliveira 553
 
12 soliveira 554
<div>
555
<table border="0">
556
    <tr>
75 soliveira 557
        <td>
558
 
76 soliveira 559
        <k:html name="logo" />
75 soliveira 560
        <mtw:hasAuthorization groups="admin">
561
        <mtw:if test="logo.preview" value="false">
562
        <br/>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" style="font-size: 8px;" onclick="return showEditPageDialog('logo', 'en');" title="<k:editTooltip name="logo" />">Edit Logo</a>
563
        </mtw:if>
564
        <mtw:if test="logo.preview" value="true">
565
        <br/>&nbsp;&nbsp;&nbsp;&nbsp;
566
        <span style="font-size: 10px; font-weight: bold;">Preview</span><span style="font-size: 8px;">&nbsp;&nbsp;-&nbsp;</span>
567
        <a style="font-size: 8px;" href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="logo.name" />&lang=<mtw:out value="logo.language.locale" />">Save</a>&nbsp;
568
        <a style="font-size: 8px;" href="#" onclick="return showEditPreviewDialog('<mtw:out value="logo.name" />', '<mtw:out value="logo.language.locale" />');" title="<k:editTooltip name="logo" />">Edit</a>&nbsp;
569
        <a style="font-size: 8px;" href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="logo.name" />&lang=<mtw:out value="logo.language.locale" />">Discard</a>
570
        </mtw:if>
571
        </mtw:hasAuthorization>
572
 
573
        </td>
22 soliveira 574
        <td align="right" valign="bottom">
575
            <mtw:isLogged negate="true">
33 soliveira 576
                <a href="#" onclick="return showLoginDialog();">Login</a>
22 soliveira 577
            </mtw:isLogged>
578
            <mtw:isLogged>
36 soliveira 579
                <a href="#" onclick="return showCreateNewPageDialog();">Create New Page</a> |
49 soliveira 580
                <a href="#" onclick="return showListAllPagesDialog();">List Pages</a> |
44 soliveira 581
                <mtw:hasAuthorization groups="admin">
74 soliveira 582
 
583
                <mtw:if test="css.preview" value="true">
584
                <b>CSS</b> -
585
                <a href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="css.name" />&lang=<mtw:out value="css.language.locale" />">Save</a>&nbsp;
586
                <a href="#" onclick="return showEditPreviewDialog('<mtw:out value="css.name" />', '<mtw:out value="css.language.locale" />');" title="<k:editTooltip name="css" />">Edit</a>&nbsp;
587
                <a href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="css.name" />&lang=<mtw:out value="css.language.locale" />">Discard</a> |
588
                </mtw:if>
589
 
590
                <mtw:if test="css.preview" value="false">
41 soliveira 591
                <a href="#" onclick="return showEditPageDialog('CSS', 'en');" title="<k:editTooltip name="css" />">Edit CSS</a> |
74 soliveira 592
                </mtw:if>
593
 
594
 
44 soliveira 595
                </mtw:hasAuthorization>
22 soliveira 596
                <a href="<mtw:contextPath/>/Logout.mtw">Logout</a> (<mtw:out value="sessionUser.username" />)
597
            </mtw:isLogged>
598
            &nbsp;
39 soliveira 599
            <mtw:isLocale value="pt">
600
	            <a href="<mtw:urlWithLoc loc="pt" />"><img src="images/brazil.gif" border="0" width="20" height="13" style="border: 3px solid #ccc;" /></a>
601
    	        <a href="<mtw:urlWithLoc loc="en" />"><img src="images/usa.gif" width="20" height="13" border="0" style="border: 3px solid #fff;" /></a>
602
            </mtw:isLocale>
603
            <mtw:isLocale value="en">
604
            	<a href="<mtw:urlWithLoc loc="pt" />"><img src="images/brazil.gif" border="0" width="20" height="13" style="border: 3px solid #fff;" /></a>
605
            	<a href="<mtw:urlWithLoc loc="en" />"><img src="images/usa.gif" width="20" height="13" border="0" style="border: 3px solid #ccc;" /></a>
606
            </mtw:isLocale>
22 soliveira 607
            &nbsp;&nbsp;&nbsp;
608
        </td>
12 soliveira 609
    </tr>
610
</table>
611
</div>
612
 
613
<hr />
614
 
615
<div id="leftColumn"><mtw:isLogged>
44 soliveira 616
    <mtw:hasAuthorization groups="admin">
73 soliveira 617
 
618
        <mtw:if test="leftColumn.preview" value="true">
619
        <div style="text-align: left; padding-left: 8px; padding-top: 6px;">
620
            <b>Preview</b>
621
            &nbsp;-&nbsp;
622
            <a href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="leftColumn.name" />&lang=<mtw:out value="leftColumn.language.locale" />">Save</a>&nbsp;&nbsp;
623
            <a href="#" onclick="return showEditPreviewDialog('<mtw:out value="leftColumn.name" />', '<mtw:out value="leftColumn.language.locale" />');" title="<k:editTooltip name="leftColumn" />">Edit</a>&nbsp;&nbsp;
624
            <a href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="leftColumn.name" />&lang=<mtw:out value="leftColumn.language.locale" />">Discard</a>
625
        </div>
626
        </mtw:if>
627
 
628
        <mtw:if test="leftColumn.preview" value="false">
41 soliveira 629
        <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>
73 soliveira 630
        </mtw:if>
631
 
632
 
12 soliveira 633
    </mtw:hasAuthorization>
634
</mtw:isLogged>
20 soliveira 635
<div id="navcolumn">
636
    <div>
22 soliveira 637
    <mtw:out value="leftColumn.body" />
20 soliveira 638
    </div>
639
<br />
12 soliveira 640
</div>
641
 
642
</div>
643
 
644
<div id="bodyColumn">
28 soliveira 645
    <mtw:hasAuthorization groups="admin, editor">
63 soliveira 646
 
647
    <mtw:if test="bodyColumn.preview" value="true">
65 soliveira 648
 
649
    	<mtw:if test="bodyColumn.new" value="true">
71 soliveira 650
			<div style="text-align: left; padding-left: 4px;">
651
			<b>This is a Preview</b>
652
			&nbsp;-&nbsp;
653
            <a href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="bodyColumn.name" />&lang=<mtw:out value="bodyColumn.language.locale" />">Save</a>&nbsp;&nbsp;
654
            <a href="#" onclick="return showEditPreviewNewPageDialog('<mtw:out value="bodyColumn.name" />', '<mtw:out value="bodyColumn.language.locale" />');" title="<k:editTooltip name="bodyColumn" />">Edit</a>&nbsp;&nbsp;
69 soliveira 655
			<a href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="bodyColumn.name" />&lang=<mtw:out value="bodyColumn.language.locale" />">Discard</a>
66 soliveira 656
			</div>
65 soliveira 657
    	</mtw:if>
658
    	<mtw:if test="bodyColumn.new" value="false">
71 soliveira 659
            <div style="text-align: left; padding-left: 4px;">
660
            <b>This is a Preview</b>
661
            &nbsp;-&nbsp;
662
            <a href="<mtw:contextPath/>/Page.savePreview.mtw?name=<mtw:out value="bodyColumn.name" />&lang=<mtw:out value="bodyColumn.language.locale" />">Save</a>&nbsp;&nbsp;
663
            <a href="#" onclick="return showEditPreviewDialog('<mtw:out value="bodyColumn.name" />', '<mtw:out value="bodyColumn.language.locale" />');" title="<k:editTooltip name="bodyColumn" />">Edit</a>&nbsp;&nbsp;
664
            <a href="<mtw:contextPath/>/Page.discardPreview.mtw?name=<mtw:out value="bodyColumn.name" />&lang=<mtw:out value="bodyColumn.language.locale" />">Discard</a>
66 soliveira 665
			</div>
65 soliveira 666
    	</mtw:if>
667
 
63 soliveira 668
    </mtw:if>
669
 
670
    <mtw:if test="bodyColumn.preview" value="false">
41 soliveira 671
    <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>
63 soliveira 672
    </mtw:if>
673
 
28 soliveira 674
    </mtw:hasAuthorization>
24 soliveira 675
    <mtw:out value="bodyColumn.body" />
12 soliveira 676
</div>
677
 
678
<div class="clear">
679
<hr />
680
</div>
681
 
682
<div id="footer">
63 soliveira 683
<div class="xright">Copyright (c) 2011</div>
12 soliveira 684
<div class="clear">
685
<hr />
686
</div>
687
</div>
688
 
689
</body>
690
</html>