* Fixed skin names according to issue #16
* Fixed rendering of values stored in res.meta.values * Removed obsolete code (mostly disabled by comments already)
This commit is contained in:
parent
5044e3610a
commit
0ba8805d02
25 changed files with 279 additions and 294 deletions
|
@ -9,6 +9,14 @@
|
||||||
<td><label for="<% choice.id %>"><% choice.title %></label></td>
|
<td><label for="<% choice.id %>"><% choice.title %></label></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<% #edit %>
|
||||||
|
<tr class="choice">
|
||||||
|
<td>
|
||||||
|
<span class="small">Choice #<% param.index %>:</span><br />
|
||||||
|
<input type="text" name="title" class="formText" value="<% choice.title %>" />
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<% #result %>
|
<% #result %>
|
||||||
<p>
|
<p>
|
||||||
<div style="width: <% choice.votes 300 default="1" %>px;"
|
<div style="width: <% choice.votes 300 default="1" %>px;"
|
||||||
|
@ -19,10 +27,5 @@
|
||||||
<% choice.title %>
|
<% choice.title %>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<% #edit %>
|
<% #graph %>
|
||||||
<tr class="choice">
|
<div style="width:<% param.width %>px;" class="pollResultsBar"> </div>
|
||||||
<td>
|
|
||||||
<span class="small">Choice #<% param.index %>:</span><br />
|
|
||||||
<input type="text" name="title" class="formText" value="<% choice.title %>" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
|
@ -11,31 +11,6 @@
|
||||||
<% comment.link comment#form prefix="<br />... " %>
|
<% comment.link comment#form prefix="<br />... " %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% #content %>
|
|
||||||
<div class="storyDate">
|
|
||||||
<!-- This is: <% comment.self %><br />
|
|
||||||
Prototype: <% comment.prototype %><br />
|
|
||||||
Parent: <% comment.parent_type %> #<% comment.parent_id %><br />
|
|
||||||
Story: <% comment.story %><br /> -->
|
|
||||||
<% comment.creator link %>, <% comment.created short %>
|
|
||||||
</div>
|
|
||||||
<div class="title"><% comment.title %></div>
|
|
||||||
<div><% comment.text | comment.format %></div>
|
|
||||||
|
|
||||||
<% #comment %>
|
|
||||||
<% comment.skin Comment#content %>
|
|
||||||
|
|
||||||
<% #reply %>
|
|
||||||
<div class="reply">
|
|
||||||
<div class="listSeparator"></div>
|
|
||||||
<% comment.skin Comment#content %>
|
|
||||||
<p class="small">
|
|
||||||
<% comment.link . link prefix="... " %>
|
|
||||||
<% comment.link edit prefix="... " %>
|
|
||||||
<% comment.link delete prefix="... " %>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<% #edit %>
|
<% #edit %>
|
||||||
<% comment.skin Story#restore %>
|
<% comment.skin Story#restore %>
|
||||||
<% parent.skin <% parent.type suffix="#comment" %> %>
|
<% parent.skin <% parent.type suffix="#comment" %> %>
|
||||||
|
@ -63,3 +38,28 @@
|
||||||
<button type="button" id="restore" value="1">restore</button>
|
<button type="button" id="restore" value="1">restore</button>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<% #content %>
|
||||||
|
<div class="storyDate">
|
||||||
|
<!-- This is: <% comment.self %><br />
|
||||||
|
Prototype: <% comment.prototype %><br />
|
||||||
|
Parent: <% comment.parent_type %> #<% comment.parent_id %><br />
|
||||||
|
Story: <% comment.story %><br /> -->
|
||||||
|
<% comment.creator link %>, <% comment.created short %>
|
||||||
|
</div>
|
||||||
|
<div class="title"><% comment.title %></div>
|
||||||
|
<div><% comment.text | comment.format %></div>
|
||||||
|
|
||||||
|
<% #comment %>
|
||||||
|
<% comment.skin Comment#content %>
|
||||||
|
|
||||||
|
<% #reply %>
|
||||||
|
<div class="reply">
|
||||||
|
<div class="listSeparator"></div>
|
||||||
|
<% comment.skin Comment#content %>
|
||||||
|
<p class="small">
|
||||||
|
<% comment.link . link prefix="... " %>
|
||||||
|
<% comment.link edit prefix="... " %>
|
||||||
|
<% comment.link delete prefix="... " %>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
|
@ -4,36 +4,6 @@
|
||||||
(<% file.contentType suffix=", " %><% file.contentLength %>)
|
(<% file.contentType suffix=", " %><% file.contentLength %>)
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<% #files %>
|
|
||||||
<div class="listSeparator"> </div>
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" class="small">
|
|
||||||
<strong>Macro:</strong> <% file.macro %>
|
|
||||||
<div class="ample"><strong>Details: </strong><% file.contentLength %>
|
|
||||||
<% file.contentType prefix=" " %><% ngettext "{0} download" "{0} downloads"
|
|
||||||
<% file.requests %> prefix=", " %></div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div class="storyTitle"><% file.name %></div>
|
|
||||||
<div class="storyDate"><% file.creator as="link" %> on
|
|
||||||
<% file.created short %></div>
|
|
||||||
</td>
|
|
||||||
<td class="small" align="right" valign="top" rowspan="2">
|
|
||||||
<% file.link edit prefix=" ... " suffix="<br />" %>
|
|
||||||
<% file.link delete prefix="... " suffix="<br />" %>
|
|
||||||
<% file.link . download prefix=" ... " suffix="<br />" %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<p><% file.description suffix="<br />" %></p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<% #edit %>
|
<% #edit %>
|
||||||
<form method="post" action="<% response.action %>" enctype="multipart/form-data">
|
<form method="post" action="<% response.action %>" enctype="multipart/form-data">
|
||||||
<table border="0" width="400" cellspacing="0" cellpadding="3">
|
<table border="0" width="400" cellspacing="0" cellpadding="3">
|
||||||
|
@ -71,3 +41,33 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<% #listItem %>
|
||||||
|
<div class="listSeparator"> </div>
|
||||||
|
<table width="100%" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="small">
|
||||||
|
<strong>Macro:</strong> <% file.macro %>
|
||||||
|
<div class="ample"><strong>Details: </strong><% file.contentLength %>
|
||||||
|
<% file.contentType prefix=" " %><% ngettext "{0} download" "{0} downloads"
|
||||||
|
<% file.requests %> prefix=", " %></div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="storyTitle"><% file.name %></div>
|
||||||
|
<div class="storyDate"><% file.creator as="link" %> on
|
||||||
|
<% file.created short %></div>
|
||||||
|
</td>
|
||||||
|
<td class="small" align="right" valign="top" rowspan="2">
|
||||||
|
<% file.link edit prefix=" ... " suffix="<br />" %>
|
||||||
|
<% file.link delete prefix="... " suffix="<br />" %>
|
||||||
|
<% file.link . download prefix=" ... " suffix="<br />" %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<p><% file.description suffix="<br />" %></p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
|
@ -64,7 +64,7 @@ Files.prototype.create_action = function() {
|
||||||
|
|
||||||
Files.prototype.main_action = function() {
|
Files.prototype.main_action = function() {
|
||||||
var files = User.getMembership().files;
|
var files = User.getMembership().files;
|
||||||
res.data.list = renderList(files, "File#files", 10, req.queryParams.page);
|
res.data.list = renderList(files, "File#listItem", 10, req.queryParams.page);
|
||||||
res.data.pager = renderPager(files, this.href(),
|
res.data.pager = renderPager(files, this.href(),
|
||||||
10, req.queryParams.page);
|
10, req.queryParams.page);
|
||||||
res.data.title = gettext("Member files of {0}", this._parent.title);
|
res.data.title = gettext("Member files of {0}", this._parent.title);
|
||||||
|
@ -74,7 +74,7 @@ Files.prototype.main_action = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
Files.prototype.all_action = function() {
|
Files.prototype.all_action = function() {
|
||||||
res.data.list = renderList(this, "File#files", 10, req.queryParams.page);
|
res.data.list = renderList(this, "File#listItem", 10, req.queryParams.page);
|
||||||
res.data.pager = renderPager(this,
|
res.data.pager = renderPager(this,
|
||||||
this.href(), 10, req.queryParams.page);
|
this.href(), 10, req.queryParams.page);
|
||||||
res.data.title = gettext("Files of {0}", this._parent.title);
|
res.data.title = gettext("Files of {0}", this._parent.title);
|
||||||
|
|
|
@ -401,7 +401,7 @@ function list_macro(param /*, limit, id */) {
|
||||||
var collection, skin;
|
var collection, skin;
|
||||||
if (id === "sites") {
|
if (id === "sites") {
|
||||||
collection = root.sites.list(0, max);
|
collection = root.sites.list(0, max);
|
||||||
skin = "Site#list"; // FIXME: #preview or #list?
|
skin = "Site#preview";
|
||||||
} else if (id === "updates") {
|
} else if (id === "updates") {
|
||||||
var counter = 0;
|
var counter = 0;
|
||||||
collection = [];
|
collection = [];
|
||||||
|
@ -411,7 +411,7 @@ function list_macro(param /*, limit, id */) {
|
||||||
collection.push(this);
|
collection.push(this);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
skin = "Site#list";
|
skin = "Site#preview";
|
||||||
} else {
|
} else {
|
||||||
var site;
|
var site;
|
||||||
var parts = id.split("/");
|
var parts = id.split("/");
|
||||||
|
@ -480,8 +480,9 @@ function value_macro(param, name, value) {
|
||||||
}
|
}
|
||||||
name = name.toLowerCase();
|
name = name.toLowerCase();
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return res.meta.values[name];
|
res.write(res.meta.values[name]);
|
||||||
} else {
|
} else {
|
||||||
|
res.write("/* set " + name + " to " + value + " */");
|
||||||
res.meta.values[name] = value;
|
res.meta.values[name] = value;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -73,10 +73,12 @@ HopObject.prototype.onRequest = function() {
|
||||||
res.stop();
|
res.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
res.meta.values = {};
|
|
||||||
res.handlers.layout = res.handlers.site.layout || new Layout;
|
res.handlers.layout = res.handlers.site.layout || new Layout;
|
||||||
res.skinpath = res.handlers.layout.getSkinPath();
|
res.skinpath = res.handlers.layout.getSkinPath();
|
||||||
|
|
||||||
|
res.meta.values = {};
|
||||||
|
res.handlers.site.renderSkinAsString("Site#values");
|
||||||
|
|
||||||
// FIXME: remove after debugging
|
// FIXME: remove after debugging
|
||||||
((res.contentType === "text/html") && res.debug(res.skinpath.toSource()));
|
((res.contentType === "text/html") && res.debug(res.skinpath.toSource()));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -26,38 +26,6 @@ code: <pre><% image.macro %></pre></p>
|
||||||
<p><% image.render | link <% image.url %> %></p>
|
<p><% image.render | link <% image.url %> %></p>
|
||||||
<p><% image.description %></p>
|
<p><% image.description %></p>
|
||||||
|
|
||||||
<% #preview %>
|
|
||||||
<p><% image.render %></p>
|
|
||||||
|
|
||||||
<% #images %>
|
|
||||||
<div class="listSeparator"> </div>
|
|
||||||
<table width="100%" cellspacing="0" cellpadding="0">
|
|
||||||
<tr>
|
|
||||||
<td colspan="2" class="small">
|
|
||||||
<strong>Macro:</strong> <% image.macro %>
|
|
||||||
<div class="ample"><strong>Format: </strong><% image.contentType %>,
|
|
||||||
<% image.width %>×<% image.height %> pixels</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<div class="storyTitle"><% image.name %></div>
|
|
||||||
<div class="storyDate"><% image.creator as="link" %>
|
|
||||||
<% image.created short prefix=" on " %></div>
|
|
||||||
</td>
|
|
||||||
<td align="right" class="small" valign="top">
|
|
||||||
<% image.link edit prefix="... " suffix="<br />" %>
|
|
||||||
<% image.link delete prefix="... " suffix="<br />" %>
|
|
||||||
<% image.link replace prefix="..." suffix="<br />" %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<% image.thumbnail vspace="5" | image.link %>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<% #edit %>
|
<% #edit %>
|
||||||
<form method="post" action="<% response.action %>" enctype="multipart/form-data">
|
<form method="post" action="<% response.action %>" enctype="multipart/form-data">
|
||||||
<table border="0" width="400" cellspacing="0" cellpadding="3">
|
<table border="0" width="400" cellspacing="0" cellpadding="3">
|
||||||
|
@ -121,3 +89,35 @@ code: <pre><% image.macro %></pre></p>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<% #preview %>
|
||||||
|
<p><% image.render %></p>
|
||||||
|
|
||||||
|
<% #listItem %>
|
||||||
|
<div class="listSeparator"> </div>
|
||||||
|
<table width="100%" cellspacing="0" cellpadding="0">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2" class="small">
|
||||||
|
<strong>Macro:</strong> <% image.macro %>
|
||||||
|
<div class="ample"><strong>Format: </strong><% image.contentType %>,
|
||||||
|
<% image.width %>×<% image.height %> pixels</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<div class="storyTitle"><% image.name %></div>
|
||||||
|
<div class="storyDate"><% image.creator as="link" %>
|
||||||
|
<% image.created short prefix=" on " %></div>
|
||||||
|
</td>
|
||||||
|
<td align="right" class="small" valign="top">
|
||||||
|
<% image.link edit prefix="... " suffix="<br />" %>
|
||||||
|
<% image.link delete prefix="... " suffix="<br />" %>
|
||||||
|
<% image.link replace prefix="..." suffix="<br />" %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<% image.thumbnail vspace="5" | image.link %>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
|
@ -58,7 +58,7 @@ Images.prototype.main_action = function() {
|
||||||
res.data.title = gettext("Layout images of {0}", res.handlers.site.title);
|
res.data.title = gettext("Layout images of {0}", res.handlers.site.title);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
res.data.list = renderList(images, "Image#images",
|
res.data.list = renderList(images, "Image#listItem",
|
||||||
10, req.queryParams.page);
|
10, req.queryParams.page);
|
||||||
res.data.pager = renderPager(images,
|
res.data.pager = renderPager(images,
|
||||||
this.href(req.action), 10, req.queryParams.page);
|
this.href(req.action), 10, req.queryParams.page);
|
||||||
|
@ -95,7 +95,7 @@ Images.prototype.create_action = function() {
|
||||||
Images.prototype.all_action = function() {
|
Images.prototype.all_action = function() {
|
||||||
res.data.pager = renderPager(this, this.href(),
|
res.data.pager = renderPager(this, this.href(),
|
||||||
10, req.queryParams.page);
|
10, req.queryParams.page);
|
||||||
res.data.list = renderList(this, "Image#images",
|
res.data.list = renderList(this, "Image#listItem",
|
||||||
10, req.queryParams.page);
|
10, req.queryParams.page);
|
||||||
res.data.title = gettext("Images of {0}", this._parent.title);
|
res.data.title = gettext("Images of {0}", this._parent.title);
|
||||||
res.data.body = this.renderSkinAsString("Images#main");
|
res.data.body = this.renderSkinAsString("Images#main");
|
||||||
|
|
|
@ -249,7 +249,7 @@ Members.prototype.updated_action = function() {
|
||||||
Members.prototype.privileges_action = function() {
|
Members.prototype.privileges_action = function() {
|
||||||
res.data.title = gettext("Memberships of user {0}", session.user.name);
|
res.data.title = gettext("Memberships of user {0}", session.user.name);
|
||||||
res.data.list = renderList(session.user.memberships,
|
res.data.list = renderList(session.user.memberships,
|
||||||
"Membership#subscriptions");
|
"Membership#listItem");
|
||||||
res.data.body = session.user.renderSkinAsString("User#subscriptions");
|
res.data.body = session.user.renderSkinAsString("User#subscriptions");
|
||||||
res.handlers.site.renderSkin("Site#page");
|
res.handlers.site.renderSkin("Site#page");
|
||||||
return;
|
return;
|
||||||
|
@ -258,7 +258,7 @@ Members.prototype.privileges_action = function() {
|
||||||
Members.prototype.subscriptions_action = function() {
|
Members.prototype.subscriptions_action = function() {
|
||||||
res.data.title = gettext("Subscriptions of user {0}", session.user.name);
|
res.data.title = gettext("Subscriptions of user {0}", session.user.name);
|
||||||
res.data.list = renderList(session.user.subscriptions,
|
res.data.list = renderList(session.user.subscriptions,
|
||||||
"Membership#subscriptions");
|
"Membership#listItem");
|
||||||
res.data.body = session.user.renderSkinAsString("User#subscriptions");
|
res.data.body = session.user.renderSkinAsString("User#subscriptions");
|
||||||
res.handlers.site.renderSkin("Site#page");
|
res.handlers.site.renderSkin("Site#page");
|
||||||
return;
|
return;
|
||||||
|
@ -279,7 +279,7 @@ Members.prototype.add_action = function() {
|
||||||
"Found {0} users matching the search input.",
|
"Found {0} users matching the search input.",
|
||||||
result.length);
|
result.length);
|
||||||
}
|
}
|
||||||
res.data.result = this.renderSkinAsString("Members#result", result);
|
res.data.result = this.renderSkinAsString("Members#results", result);
|
||||||
}
|
}
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
res.message = ex;
|
res.message = ex;
|
||||||
|
@ -327,7 +327,7 @@ Members.prototype.search = function(searchString) {
|
||||||
if (this.get(name)) {
|
if (this.get(name)) {
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
this.renderSkin("Members#resultItem", {name :name});
|
this.renderSkin("Members#result", {name :name});
|
||||||
counter += 1;
|
counter += 1;
|
||||||
}
|
}
|
||||||
rows.release();
|
rows.release();
|
||||||
|
|
|
@ -162,7 +162,7 @@ tabindex="4">reset</button>
|
||||||
</form>
|
</form>
|
||||||
<% response.result %>
|
<% response.result %>
|
||||||
|
|
||||||
<% #result %>
|
<% #results %>
|
||||||
<form method="post" action="<% response.action %>">
|
<form method="post" action="<% response.action %>">
|
||||||
<% param.result prefix="<br />" %>
|
<% param.result prefix="<br />" %>
|
||||||
<br />
|
<br />
|
||||||
|
@ -170,7 +170,7 @@ tabindex="4">reset</button>
|
||||||
<button type="submit" id="cancel" name="cancel" value="1">Cancel</button>
|
<button type="submit" id="cancel" name="cancel" value="1">Cancel</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<% #resultItem %>
|
<% #result %>
|
||||||
<table border="0" cellspacing="0" cellpadding="0">
|
<table border="0" cellspacing="0" cellpadding="0">
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top">
|
<td valign="top">
|
||||||
|
|
|
@ -1,3 +1,27 @@
|
||||||
|
<% #edit %>
|
||||||
|
<p>To modify the membership, simply choose the desired role from the
|
||||||
|
drop-down menu and click the "save" button. An e-mail will be sent to the
|
||||||
|
member informing about the membership change.</p>
|
||||||
|
<form method="post" action="<% response.action %>">
|
||||||
|
<table border="0" cellspacing="0" cellpadding="3">
|
||||||
|
<tr>
|
||||||
|
<td class="small" nowrap="nowrap">User:</td>
|
||||||
|
<td nowrap="nowrap"><% membership.name %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small" nowrap="nowrap">Role:</td>
|
||||||
|
<td nowrap="nowrap"><% membership.select role %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td nowrap="nowrap"> </td>
|
||||||
|
<td nowrap="nowrap"><br />
|
||||||
|
<button type="submit" name="save" value="1"><strong>save</strong></button>
|
||||||
|
<button type="submit" name="cancel" value="1">cancel</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
<% #login %>
|
<% #login %>
|
||||||
You're not logged in <% site.members.link login prefix="... " %>
|
You're not logged in <% site.members.link login prefix="... " %>
|
||||||
|
|
||||||
|
@ -9,7 +33,7 @@ Logged in as <% membership.name | membership.link %><br />
|
||||||
<% site.members.link updated subscriptions prefix="... " suffix="<br />" %>
|
<% site.members.link updated subscriptions prefix="... " suffix="<br />" %>
|
||||||
<% site.members.link logout prefix="... " %>
|
<% site.members.link logout prefix="... " %>
|
||||||
|
|
||||||
<% #members %>
|
<% #listItem %>
|
||||||
<div class="listSeparator"> </div>
|
<div class="listSeparator"> </div>
|
||||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -33,7 +57,7 @@ Logged in as <% membership.name | membership.link %><br />
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<% #subscriptions %>
|
<% #subscription %>
|
||||||
<div class="listSeparator"> </div>
|
<div class="listSeparator"> </div>
|
||||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -71,27 +95,3 @@ Please make sure your own e-mail address in your
|
||||||
<button type="submit" name="cancel" value="1">cancel</button>
|
<button type="submit" name="cancel" value="1">cancel</button>
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<% #edit %>
|
|
||||||
<p>To modify the membership, simply choose the desired role from the
|
|
||||||
drop-down menu and click the "save" button. An e-mail will be sent to the
|
|
||||||
member informing about the membership change.</p>
|
|
||||||
<form method="post" action="<% response.action %>">
|
|
||||||
<table border="0" cellspacing="0" cellpadding="3">
|
|
||||||
<tr>
|
|
||||||
<td class="small" nowrap="nowrap">User:</td>
|
|
||||||
<td nowrap="nowrap"><% membership.name %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small" nowrap="nowrap">Role:</td>
|
|
||||||
<td nowrap="nowrap"><% membership.select role %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td nowrap="nowrap"> </td>
|
|
||||||
<td nowrap="nowrap"><br />
|
|
||||||
<button type="submit" name="save" value="1"><strong>save</strong></button>
|
|
||||||
<button type="submit" name="cancel" value="1">cancel</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ Poll.prototype.link_macro = function(param, action, text) {
|
||||||
Poll.prototype.main_action = function() {
|
Poll.prototype.main_action = function() {
|
||||||
if (this.status === "closed") {
|
if (this.status === "closed") {
|
||||||
res.message = gettext("Sorry, this poll is closed. Voting is not possible.");
|
res.message = gettext("Sorry, this poll is closed. Voting is not possible.");
|
||||||
res.redirect(this.href("results"));
|
res.redirect(this.href("result"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (req.postParams.vote) {
|
if (req.postParams.vote) {
|
||||||
|
@ -190,7 +190,7 @@ Poll.remove = function() {
|
||||||
|
|
||||||
Poll.prototype.result_action = function() {
|
Poll.prototype.result_action = function() {
|
||||||
res.data.title = gettext('Results of poll "{0}"', this.question);
|
res.data.title = gettext('Results of poll "{0}"', this.question);
|
||||||
res.data.body = this.renderSkinAsString("Poll#result");
|
res.data.body = this.renderSkinAsString("Poll#results");
|
||||||
this.site.renderSkin("Site#page");
|
this.site.renderSkin("Site#page");
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<% #result %>
|
<% #results %>
|
||||||
<% poll.question %><br />
|
<% poll.question %><br />
|
||||||
<% poll.loop skin="Choice#result" %>
|
<% poll.loop skin="Choice#result" %>
|
||||||
<p><br />
|
<p><br />
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
prefix="<br />This poll was closed by " suffix=" on " %> %>
|
prefix="<br />This poll was closed by " suffix=" on " %> %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% #polls %>
|
<% #listItem %>
|
||||||
<a name="<% poll.id %>" id="<% poll.id %>"></a>
|
<a name="<% poll.id %>" id="<% poll.id %>"></a>
|
||||||
<div class="listSeparator"> </div>
|
<div class="listSeparator"> </div>
|
||||||
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
||||||
|
|
|
@ -43,7 +43,7 @@ Polls.prototype.getPermission = function(action) {
|
||||||
|
|
||||||
Polls.prototype.main_action = function() {
|
Polls.prototype.main_action = function() {
|
||||||
var polls = User.getMembership().polls;
|
var polls = User.getMembership().polls;
|
||||||
res.data.list = renderList(polls, "Poll#polls", 10, req.queryParams.page);
|
res.data.list = renderList(polls, "Poll#listItem", 10, req.queryParams.page);
|
||||||
res.data.pager = renderPager(polls, this.href(req.action),
|
res.data.pager = renderPager(polls, this.href(req.action),
|
||||||
10, req.queryParams.page);
|
10, req.queryParams.page);
|
||||||
res.data.title = gettext("Member polls of {0}", this._parent.title);
|
res.data.title = gettext("Member polls of {0}", this._parent.title);
|
||||||
|
@ -76,7 +76,7 @@ Polls.prototype.create_action = function() {
|
||||||
|
|
||||||
Polls.prototype.open_action = function() {
|
Polls.prototype.open_action = function() {
|
||||||
res.data.list = renderList(this.open,
|
res.data.list = renderList(this.open,
|
||||||
"Poll#polls", 10, req.queryParams.page);
|
"Poll#listItem", 10, req.queryParams.page);
|
||||||
res.data.pager = renderPager(this.open,
|
res.data.pager = renderPager(this.open,
|
||||||
this.href(req.action), 10, req.queryParams.page);
|
this.href(req.action), 10, req.queryParams.page);
|
||||||
res.data.title = gettext("Open polls of {0}", this._parent.title);
|
res.data.title = gettext("Open polls of {0}", this._parent.title);
|
||||||
|
@ -86,7 +86,7 @@ Polls.prototype.open_action = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
Polls.prototype.all_action = function() {
|
Polls.prototype.all_action = function() {
|
||||||
res.data.list = renderList(this, "Poll#polls", 10, req.queryParams.page);
|
res.data.list = renderList(this, "Poll#listItem", 10, req.queryParams.page);
|
||||||
res.data.pager = renderPager(this,
|
res.data.pager = renderPager(this,
|
||||||
this.href(), 10, req.queryParams.page);
|
this.href(), 10, req.queryParams.page);
|
||||||
res.data.title = gettext("Polls of {0}", this._parent.title);
|
res.data.title = gettext("Polls of {0}", this._parent.title);
|
||||||
|
|
|
@ -146,7 +146,7 @@ Root.prototype.create_action = function() {
|
||||||
|
|
||||||
Root.prototype.sites_action = function() {
|
Root.prototype.sites_action = function() {
|
||||||
res.data.list = renderList(root.sites,
|
res.data.list = renderList(root.sites,
|
||||||
"Site#list", 10, req.queryParams.page);
|
"Site#preview", 10, req.queryParams.page);
|
||||||
res.data.pager = renderPager(root.sites,
|
res.data.pager = renderPager(root.sites,
|
||||||
this.href(req.action), 10, req.queryParams.page);
|
this.href(req.action), 10, req.queryParams.page);
|
||||||
res.data.title = gettext("Sites of {0}", root.title);
|
res.data.title = gettext("Sites of {0}", root.title);
|
||||||
|
|
|
@ -237,7 +237,6 @@ Site.prototype.main_css_action = function() {
|
||||||
res.dependsOn(Skin("Site", "stylesheet").getSource());
|
res.dependsOn(Skin("Site", "stylesheet").getSource());
|
||||||
res.digest();
|
res.digest();
|
||||||
res.contentType = "text/css";
|
res.contentType = "text/css";
|
||||||
this.renderSkin("Site#values");
|
|
||||||
this.renderSkin("Site#stylesheet");
|
this.renderSkin("Site#stylesheet");
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,88 @@
|
||||||
<% #main %>
|
<% #main %>
|
||||||
<% site.list stories %>
|
<% site.list stories %>
|
||||||
|
|
||||||
<% #list %>
|
<% #edit %>
|
||||||
|
<form id="prefs" method="post" action="<% response.action %>">
|
||||||
|
<table border="0" cellspacing="0" cellpadding="2">
|
||||||
|
<tr>
|
||||||
|
<td colspan="2">
|
||||||
|
<strong><a name="general">General</a></strong>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small">Mode:</td>
|
||||||
|
<td><% site.select mode %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small">Title:</td>
|
||||||
|
<td><% site.input title %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small">Tagline:</td>
|
||||||
|
<td><% site.input tagline %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small">Paging:</td>
|
||||||
|
<td><% site.input pageSize size="5" maxlength="2" %>
|
||||||
|
<% site.select pageMode %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small">Comments:</td>
|
||||||
|
<td><% site.checkbox commentMode %>
|
||||||
|
<label for="commentMode">enabled</label></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small">Archive:</td>
|
||||||
|
<td><% site.checkbox archiveMode %>
|
||||||
|
<label for="archiveMode">enabled</label></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small">Language:</td>
|
||||||
|
<td><% site.select locale %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small">Time zone:</td>
|
||||||
|
<td><% site.select timeZone %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small">Long date format:</td>
|
||||||
|
<td><% site.select longDateFormat %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small">Short date format:</td>
|
||||||
|
<td><% site.select shortDateFormat %></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small">Notifications:</td>
|
||||||
|
<td><% site.select notificationMode %></td>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small" valign="top">Web hook:</td>
|
||||||
|
<td><% site.input webHookUrl %><br />
|
||||||
|
<% site.checkbox webHookMode %>
|
||||||
|
<label for="webHookMode">enabled<label></td>
|
||||||
|
</tr>
|
||||||
|
<!--tr>
|
||||||
|
<td colspan="2"><div class="listSeparator"> </div>
|
||||||
|
<strong><a name="spamfilter">Referrer spam filter</a></strong></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="small" valign="top">Enter one
|
||||||
|
<a href="http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/regexp.html">filter pattern</a>
|
||||||
|
per line to be applied on every URL in the referrer and backlink lists.</td>
|
||||||
|
<td valign="top"><% site.textarea spamfilter cols="30" rows="7" %></td>
|
||||||
|
</tr-->
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td><br />
|
||||||
|
<button type="submit" name="save" value="1">save</button>
|
||||||
|
<button type="submit" name="cancel" value="1">cancel</button></td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<% #preview %>
|
||||||
<li><% site.title | site.link %>
|
<li><% site.title | site.link %>
|
||||||
<span class="small"><% site.modified | age %></span></li>
|
<span class="small"><% site.modified | age %></span></li>
|
||||||
|
|
||||||
|
@ -92,93 +173,7 @@ REGEDIT4
|
||||||
@="<% site.url %>menuext"
|
@="<% site.url %>menuext"
|
||||||
"contexts"=hex:31
|
"contexts"=hex:31
|
||||||
|
|
||||||
<% #edit %>
|
<% #referrers %>
|
||||||
<form id="prefs" method="post" action="<% response.action %>">
|
|
||||||
<table border="0" cellspacing="0" cellpadding="2">
|
|
||||||
<tr>
|
|
||||||
<td colspan="2">
|
|
||||||
<strong><a name="general">General</a></strong>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small">Mode:</td>
|
|
||||||
<td><% site.select mode %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small">Title:</td>
|
|
||||||
<td><% site.input title %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small">Tagline:</td>
|
|
||||||
<td><% site.input tagline %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small">Paging:</td>
|
|
||||||
<td><% site.input pageSize size="5" maxlength="2" %>
|
|
||||||
<% site.select pageMode %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small">Comments:</td>
|
|
||||||
<td><% site.checkbox commentMode %>
|
|
||||||
<label for="commentMode">enabled</label></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small">Archive:</td>
|
|
||||||
<td><% site.checkbox archiveMode %>
|
|
||||||
<label for="archiveMode">enabled</label></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small">Language:</td>
|
|
||||||
<td><% site.select locale %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small">Time zone:</td>
|
|
||||||
<td><% site.select timeZone %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small">Long date format:</td>
|
|
||||||
<td><% site.select longDateFormat %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small">Short date format:</td>
|
|
||||||
<td><% site.select shortDateFormat %></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small">Notifications:</td>
|
|
||||||
<td><% site.select notificationMode %></td>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small" valign="top">Web hook:</td>
|
|
||||||
<td><% site.input webHookUrl %><br />
|
|
||||||
<% site.checkbox webHookMode %>
|
|
||||||
<label for="webHookMode">enabled<label></td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
<!--tr>
|
|
||||||
<td colspan="2"><div class="listSeparator"> </div>
|
|
||||||
<strong><a name="spamfilter">Referrer spam filter</a></strong></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="small" valign="top">Enter one
|
|
||||||
<a href="http://devedge.netscape.com/library/manuals/2000/javascript/1.5/reference/regexp.html">filter pattern</a>
|
|
||||||
per line to be applied on every URL in the referrer and backlink lists.</td>
|
|
||||||
<td valign="top"><% site.textarea spamfilter cols="30" rows="7" %></td>
|
|
||||||
</tr-->
|
|
||||||
|
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
<td><br />
|
|
||||||
<button type="submit" name="save" value="1">save</button>
|
|
||||||
<button type="submit" name="cancel" value="1">cancel</button></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<% #referrerItem %>
|
|
||||||
referrers.push(new Antville.Referrer("<% param.referrer %>",
|
|
||||||
"<% param.text %>", <% param.requests %>));
|
|
||||||
|
|
||||||
<form action="<% response.action %>" method="get">
|
<form action="<% response.action %>" method="get">
|
||||||
<input type="text" name="filter" value="<% request.filter encoding="form" %>"
|
<input type="text" name="filter" value="<% request.filter encoding="form" %>"
|
||||||
size="30" />
|
size="30" />
|
||||||
|
@ -248,6 +243,10 @@ for (var i in referrers) {
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<% #referrer %>
|
||||||
|
referrers.push(new Antville.Referrer("<% param.referrer %>",
|
||||||
|
"<% param.text %>", <% param.requests %>));
|
||||||
|
|
||||||
<% #values %>
|
<% #values %>
|
||||||
<% value "background color" #ffffff %>
|
<% value "background color" #ffffff %>
|
||||||
<% value "link color" #ff4040 %>
|
<% value "link color" #ff4040 %>
|
||||||
|
|
|
@ -20,7 +20,7 @@ Name: <% skin.input name %>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<% #skins %>
|
<% #listItem %>
|
||||||
<li>
|
<li>
|
||||||
<% skin.link edit <% skin.name %> %>
|
<% skin.link edit <% skin.name %> %>
|
||||||
<% if <% skin.status %> is modified then
|
<% if <% skin.status %> is modified then
|
||||||
|
|
|
@ -55,7 +55,7 @@ Skins.prototype.main_action = function() {
|
||||||
var group = path[offset + 3];
|
var group = path[offset + 3];
|
||||||
if (!group) {
|
if (!group) {
|
||||||
res.data.list = this.getOutline();
|
res.data.list = this.getOutline();
|
||||||
res.data.title = gettext("Skins of {0}", res.handlers.layout.title);
|
res.data.title = gettext("Skins of {0}", res.handlers.site.title);
|
||||||
res.data.body = this.renderSkinAsString("main");
|
res.data.body = this.renderSkinAsString("main");
|
||||||
res.handlers.site.renderSkin("Site#page");
|
res.handlers.site.renderSkin("Site#page");
|
||||||
return;
|
return;
|
||||||
|
@ -64,19 +64,6 @@ Skins.prototype.main_action = function() {
|
||||||
skin = new Skin(group.name, skin.name);
|
skin = new Skin(group.name, skin.name);
|
||||||
skin.edit_action();
|
skin.edit_action();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
res.debug("skins: " + skins);
|
|
||||||
res.debug("group: " + group.name);
|
|
||||||
res.debug("skin: " + skin.name);
|
|
||||||
|
|
||||||
var skinFiles = app.getSkinfilesInPath(res.skinpath)[group.name];
|
|
||||||
var source = skinFiles[skin.name];
|
|
||||||
if (!source) {
|
|
||||||
skin = createSkin(skinFiles[group.name]).getSubskin(skin.name);
|
|
||||||
source = skin && skin.getSource();
|
|
||||||
}
|
|
||||||
res.encode(source);
|
|
||||||
return;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Skins.prototype.getOutline = function(type) {
|
Skins.prototype.getOutline = function(type) {
|
||||||
|
@ -129,13 +116,6 @@ Skins.prototype.getOutline = function(type) {
|
||||||
}
|
}
|
||||||
html.closeTag("ul");
|
html.closeTag("ul");
|
||||||
return this.cache[key] = res.pop();
|
return this.cache[key] = res.pop();
|
||||||
|
|
||||||
var outline = this.cache.outline || []
|
|
||||||
if (outline.length > 0) {
|
|
||||||
return outline;
|
|
||||||
}
|
|
||||||
this.cache.outline = outline;
|
|
||||||
return outline;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Skins.prototype.create_action = function() {
|
Skins.prototype.create_action = function() {
|
||||||
|
|
|
@ -44,7 +44,7 @@ Stories.prototype.getPermission = function(action) {
|
||||||
|
|
||||||
Stories.prototype.main_action = function() {
|
Stories.prototype.main_action = function() {
|
||||||
var stories = User.getMembership().stories;
|
var stories = User.getMembership().stories;
|
||||||
res.data.list = renderList(stories, "Story#stories",
|
res.data.list = renderList(stories, "Story#listItem",
|
||||||
10, req.queryParams.page);
|
10, req.queryParams.page);
|
||||||
res.data.pager = renderPager(stories,
|
res.data.pager = renderPager(stories,
|
||||||
this.href(req.action), 10, req.queryParams.page);
|
this.href(req.action), 10, req.queryParams.page);
|
||||||
|
@ -79,7 +79,7 @@ Stories.prototype.create_action = function() {
|
||||||
|
|
||||||
Stories.prototype.closed_action = function() {
|
Stories.prototype.closed_action = function() {
|
||||||
res.data.list = renderList(this.closed,
|
res.data.list = renderList(this.closed,
|
||||||
"Story#stories", 10, req.queryParams.page);
|
"Story#listItem", 10, req.queryParams.page);
|
||||||
res.data.pager = renderPager(this.offline,
|
res.data.pager = renderPager(this.offline,
|
||||||
this.href(req.action), 10, req.queryParams.page);
|
this.href(req.action), 10, req.queryParams.page);
|
||||||
res.data.title = gettext("Private stories of {0}", this._parent.title);
|
res.data.title = gettext("Private stories of {0}", this._parent.title);
|
||||||
|
@ -89,7 +89,7 @@ Stories.prototype.closed_action = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
Stories.prototype.all_action = function() {
|
Stories.prototype.all_action = function() {
|
||||||
res.data.list = renderList(this, "Story#stories", 10, req.queryParams.page);
|
res.data.list = renderList(this, "Story#listItem", 10, req.queryParams.page);
|
||||||
res.data.pager = renderPager(this,
|
res.data.pager = renderPager(this,
|
||||||
this.href(), 10, req.queryParams.page);
|
this.href(), 10, req.queryParams.page);
|
||||||
res.data.title = gettext("Stories of {0}", this._parent.title);
|
res.data.title = gettext("Stories of {0}", this._parent.title);
|
||||||
|
|
|
@ -10,7 +10,38 @@
|
||||||
<p><% story.comments %></p>
|
<p><% story.comments %></p>
|
||||||
<p><% story.backlinks %></p>
|
<p><% story.backlinks %></p>
|
||||||
|
|
||||||
<% #day %>
|
<% #edit %>
|
||||||
|
<% story.skin Story#restore %>
|
||||||
|
<form method="post" action="<% response.action %>">
|
||||||
|
<p>
|
||||||
|
<div class="small">Title:</div>
|
||||||
|
<div class="backup"><% story.input title class="formTitle" %></div>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<div class="small">Text:</div>
|
||||||
|
<div class="backup"><% story.textarea text cols="30" rows="15"
|
||||||
|
class="formText" %></div>
|
||||||
|
</p>
|
||||||
|
<p><fieldset>
|
||||||
|
<legend class="small">Options</legend>
|
||||||
|
<p>Tags: <% story.input tags %></p>
|
||||||
|
<p>The story is <% story.select status %> and <% story.select mode %></p>
|
||||||
|
<p>Comments of the story are <% story.select commentMode %></p>
|
||||||
|
</fieldset></p>
|
||||||
|
<p class="small">
|
||||||
|
<% story.creator prefix="Created by " %>
|
||||||
|
<% story.created short prefix=" on " suffix="<br />" %>
|
||||||
|
<% story.modifier prefix="Last modified by " %>
|
||||||
|
<% story.modified short prefix=" on " %>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<button type="submit" name="save" value="1">save</button>
|
||||||
|
<button type="submit" name="cancel" value="1">cancel</button>
|
||||||
|
<button type="button" id="restore" value="1">restore</button>
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<% #date %>
|
||||||
<div class="dayHeader"><% story.created format="EEEE, d. MMMM yyyy" %></div>
|
<div class="dayHeader"><% story.created format="EEEE, d. MMMM yyyy" %></div>
|
||||||
|
|
||||||
<% #content %>
|
<% #content %>
|
||||||
|
@ -66,7 +97,7 @@
|
||||||
<% story.skin Story#day %>
|
<% story.skin Story#day %>
|
||||||
<% story.skin Story#content %>
|
<% story.skin Story#content %>
|
||||||
|
|
||||||
<% #stories %>
|
<% #listItem %>
|
||||||
<div class="listSeparator"> </div>
|
<div class="listSeparator"> </div>
|
||||||
<table cellspacing="0" cellpadding="0" width="100%">
|
<table cellspacing="0" cellpadding="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -205,34 +236,3 @@ $(function() {
|
||||||
});
|
});
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<% #edit %>
|
|
||||||
<% story.skin Story#restore %>
|
|
||||||
<form method="post" action="<% response.action %>">
|
|
||||||
<p>
|
|
||||||
<div class="small">Title:</div>
|
|
||||||
<div class="backup"><% story.input title class="formTitle" %></div>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<div class="small">Text:</div>
|
|
||||||
<div class="backup"><% story.textarea text cols="30" rows="15"
|
|
||||||
class="formText" %></div>
|
|
||||||
</p>
|
|
||||||
<p><fieldset>
|
|
||||||
<legend class="small">Options</legend>
|
|
||||||
<p>Tags: <% story.input tags %></p>
|
|
||||||
<p>The story is <% story.select status %> and <% story.select mode %></p>
|
|
||||||
<p>Comments of the story are <% story.select commentMode %></p>
|
|
||||||
</fieldset></p>
|
|
||||||
<p class="small">
|
|
||||||
<% story.creator prefix="Created by " %>
|
|
||||||
<% story.created short prefix=" on " suffix="<br />" %>
|
|
||||||
<% story.modifier prefix="Last modified by " %>
|
|
||||||
<% story.modified short prefix=" on " %>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<button type="submit" name="save" value="1">save</button>
|
|
||||||
<button type="submit" name="cancel" value="1">cancel</button>
|
|
||||||
<button type="button" id="restore" value="1">restore</button>
|
|
||||||
</p>
|
|
||||||
</form>
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ Tag.prototype.constructor = function(name, site, type) {
|
||||||
|
|
||||||
Tag.prototype.main_action = function() {
|
Tag.prototype.main_action = function() {
|
||||||
res.handlers.list = new jala.ListRenderer(this.getTagged());
|
res.handlers.list = new jala.ListRenderer(this.getTagged());
|
||||||
res.data.body = this.renderSkinAsString("Tag");
|
res.data.body = this.renderSkinAsString("Tag#main");
|
||||||
res.handlers.site.renderSkin("Site#page");
|
res.handlers.site.renderSkin("Site#page");
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
<% #main %>
|
||||||
<div class="pagelink"><% breadcrumbs %>
|
<div class="pagelink"><% breadcrumbs %>
|
||||||
<% if <% tag.permission edit %> is true then <% tag.skin name="Tag#controls" %> %>
|
<% if <% tag.permission edit %> is true then <% tag.skin name="Tag#controls" %> %>
|
||||||
</div><br />
|
</div><br />
|
||||||
|
@ -6,7 +7,7 @@
|
||||||
<% list.render skin="TagHub" %>
|
<% list.render skin="TagHub" %>
|
||||||
<% list.nextLink %>
|
<% list.nextLink %>
|
||||||
|
|
||||||
<% #item %>
|
<% #listItem %>
|
||||||
<li>
|
<li>
|
||||||
<a href="<% tag.href action=<% request.action encoding="form" %> %>"><% tag.name %></a>
|
<a href="<% tag.href action=<% request.action encoding="form" %> %>"><% tag.name %></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -164,7 +164,7 @@ Tags.prototype.list_macro = function(param, skin) {
|
||||||
if (item.constructor !== Tag) {
|
if (item.constructor !== Tag) {
|
||||||
item = item.get(0);
|
item = item.get(0);
|
||||||
}
|
}
|
||||||
item.renderSkin(skin || "Tag#item", {index: index});
|
item.renderSkin(skin || "Tag#listItem", {index: index});
|
||||||
index += 1;
|
index += 1;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -112,7 +112,7 @@ User.prototype.list_macro = function(param, type) {
|
||||||
memberships.forEach(function(membership) {
|
memberships.forEach(function(membership) {
|
||||||
var site;
|
var site;
|
||||||
if (site = membership.get("site")) {
|
if (site = membership.get("site")) {
|
||||||
site.renderSkin("Site#list");
|
site.renderSkin("Site#preview");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
@ -135,7 +135,7 @@ User.register = function(data) {
|
||||||
// check if username is existing and is clean
|
// check if username is existing and is clean
|
||||||
// can't use isClean() here because we accept
|
// can't use isClean() here because we accept
|
||||||
// special characters like umlauts and spaces
|
// special characters like umlauts and spaces
|
||||||
var invalidChar = new RegExp("[^a-zA-Z0-9äöüß\\.\\-_ ]");
|
var invalidChar = new RegExp("[^a-zA-Z0-9<EFBFBD><EFBFBD><EFBFBD><EFBFBD>\\.\\-_ ]");
|
||||||
if (!data.name) {
|
if (!data.name) {
|
||||||
throw Error(gettext("Please enter a username."));
|
throw Error(gettext("Please enter a username."));
|
||||||
} else if (data.name.length > 30) {
|
} else if (data.name.length > 30) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue