Kawai Wiki

Rev

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