Kawai Wiki

Rev

Rev 26 | Rev 29 | 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">
11
@import url("./style/maven-base.css");
12
 
13
@import url("./style/maven-theme.css");
14
</style>
15
 
16
<meta http-equiv="imagetoolbar" content="no" />
17
<meta http-equiv="imagetoolbar" content="false" />
18
 
19
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
20
<link rel="icon" type="image/gif" href="/favicon.gif" />
21
<link rel="stylesheet" href="./style/print.css" type="text/css" media="print" />
22
 
23
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
24
<meta name="author" content="Sergio Oliveira Junior" />
25
<meta name="email" content="sergio.oliveira.jr@gmail.com" />
26
 
27
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
28
<script type="text/javascript" src="jquery/jquery-1.6.4.min.js"></script>
29
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
30
 
31
<script language="JavaScript">
32
 
33
        $(document).ready(function() {
34
 
35
        });
36
 
28 soliveira 37
        function prepareEditPageDialog(myDialog, theTitle) {
12 soliveira 38
 
39
            options = {
40
                autoOpen: false,
41
                width: 800,
42
                modal: true,
43
                title: theTitle,
44
                buttons: [
45
                          {
46
                                text: "Save",
28 soliveira 47
                                click: function() { $('#editPageForm').submit(); }
12 soliveira 48
                          },
49
                          {
50
                                text: "Cancel",
51
                                click: function() { $(this).dialog("close"); }
52
                          }
53
                      ]
54
           };
55
 
56
          myDialog.dialog(options);
57
 
58
          return myDialog;
59
        }
60
 
28 soliveira 61
        function showEditPageDialog(pageName) {
12 soliveira 62
 
28 soliveira 63
            $.getJSON('<mtw:contextPath />/Page.getPage.mtw?name=' + pageName, function(data) {
18 soliveira 64
 
28 soliveira 65
                $('#editPageTextArea').val(data.page.body);
66
                $('#editPageName').val(data.page.name);
67
                $('#editPageLanguageId').val(data.page.languageId);
12 soliveira 68
 
28 soliveira 69
                myDialog = $('#editPageDialog');
70
                myDialog = prepareEditPageDialog(myDialog, 'Editing <i><font color="darkblue">' + pageName + "</font></i> in <i>" + data.page.language + "<i>...");
12 soliveira 71
                myDialog.dialog('open');
72
            });
73
 
74
            return false;
75
        }
76
 
77
    </script>
78
 
79
</head>
80
 
81
<body class="composite">
82
 
83
<!-- For Testing -->
84
<div id="dialog" title="Dialog Title" style="display: none;">I'm in a dialog</div>
85
 
28 soliveira 86
<div id="editPageDialog" style="display: none;">
87
<form id="editPageForm" action="<mtw:contextPath />/Page.editPage.mtw" method="post">
88
<input type="hidden" name="name" id ="editPageName" value="" />
89
<input type="hidden" name="languageId" id="editPageLanguageId" value="" />
12 soliveira 90
<table>
91
    <tr>
92
        <td>&nbsp;</td>
93
    </tr>
28 soliveira 94
    <mtw:outError field="html">
12 soliveira 95
        <tr>
96
            <td colspan="2"><span class="Negative" style="font-weight: bold;"><mtw:out /></span></td>
97
        </tr>
98
    </mtw:outError>
99
    <tr>
28 soliveira 100
        <td colspan="2"><mtw:textarea id="editPageTextArea" name="body" style="width: 100%; height: 465px;" /></td>
12 soliveira 101
    </tr>
102
</table>
103
</form>
104
</div>
105
 
106
<div>
107
<table border="0">
108
    <tr>
109
        <td><a href="/"><img src="images/logos/logo.png" border="0"></img></a></td>
22 soliveira 110
        <td align="right" valign="bottom">
111
            <mtw:isLogged negate="true">
112
                <a href="jsp/login.jsp">Login</a>
113
            </mtw:isLogged>
114
            <mtw:isLogged>
115
                <a href="<mtw:contextPath/>/Page.create.mtw">Create New Page</a> |
116
                <a href="<mtw:contextPath/>/Page.list.mtw">List Pages</a> |
117
                <a href="<mtw:contextPath/>/Logout.mtw">Logout</a> (<mtw:out value="sessionUser.username" />)
118
            </mtw:isLogged>
119
            &nbsp;
120
            <a href="<mtw:urlWithLoc loc="pt" />"><img src="images/brazil.gif" border="0" width="20" height="13" /></a>
121
            <a href="<mtw:urlWithLoc loc="en" />"><img src="images/usa.gif" width="20" height="13" border="0" /></a>
122
            &nbsp;&nbsp;&nbsp;
123
        </td>
12 soliveira 124
    </tr>
125
</table>
126
</div>
127
 
128
<hr />
129
 
130
<div id="leftColumn"><mtw:isLogged>
131
    <mtw:hasAuthorization groups="admin, editor">
28 soliveira 132
        <div style="text-align: right; padding-right: 14px; padding-top: 6px;"><a href="#" onclick="return showEditPageDialog('LeftColumn');" title="<k:editTooltip name="leftColumn" />">Edit</a></div>
12 soliveira 133
    </mtw:hasAuthorization>
134
</mtw:isLogged>
20 soliveira 135
<div id="navcolumn">
136
    <div>
22 soliveira 137
    <mtw:out value="leftColumn.body" />
20 soliveira 138
    </div>
139
<br />
12 soliveira 140
</div>
141
 
142
</div>
143
 
144
<div id="bodyColumn">
28 soliveira 145
    <mtw:hasAuthorization groups="admin, editor">
146
    <div style="text-align: right; padding-right: 14px;"><a href="#" onclick="return showEditPageDialog('<mtw:out value="bodyColumn.name" />');" title="<k:editTooltip name="bodyColumn" />">Edit</a></div>
147
    </mtw:hasAuthorization>
24 soliveira 148
    <mtw:out value="bodyColumn.body" />
12 soliveira 149
</div>
150
 
151
<div class="clear">
152
<hr />
153
</div>
154
 
155
<div id="footer">
156
<div class="xright">Copyright  2011</div>
157
<div class="clear">
158
<hr />
159
</div>
160
</div>
161
 
162
</body>
163
</html>