initial check-in

This commit is contained in:
Robert Gaggl 2003-12-08 22:59:01 +00:00
parent efc302e658
commit 666a8734ac
19 changed files with 275 additions and 0 deletions

View file

@ -0,0 +1,17 @@
<div class="listSeparator">&nbsp;</div>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" class="small"><% file.creator as="link" %> on <% file.createtime format="short" %></td>
</tr>
<tr>
<td><div class="storyTitle"><% file.alias %></div>
<div class="small">(<% file.mimetype suffix=", " %><% file.filesize %><% file.clicks prefix=", " no="0 downloads" one="1 download" more=" downloads"%>)</div>
<div class="small"><b>Code:&nbsp;</b>&lt;% file name="<% file.alias %>" %&gt;</div></td>
<td class="small" align="right" valign="top" rowspan="2" nowrap="nowrap"><% file.editlink prefix="&nbsp;&nbsp;...&nbsp;" suffix="<br />" %><% file.viewlink text="download" prefix="&nbsp;&nbsp;...&nbsp;" suffix="<br />" %><% file.deletelink prefix="...&nbsp;" %></td>
</tr>
<tr>
<td>
<p><% file.description suffix="<br />" %></p>
</td>
</tr>
</table>

View file

@ -0,0 +1,17 @@
<div class="listSeparator">&nbsp;</div>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2" class="small"><% image.creator as="link" %><% image.createtime format="short" prefix="&nbsp;on&nbsp;" %></td>
</tr>
<tr>
<td><div class="storyTitle"><% image.alias %></div>
<% image.topic prefix="Gallery: " as="link" %>
<div class="small">(<% image.fileext %>, <% image.width %>&times;<% image.height %> pixels)</div>
<span class="small"><b>Code:&nbsp;</b><% image.code %></span></td>
<td align="right" class="small" valign="top" nowrap="nowrap"><% image.editlink prefix="...&nbsp;" suffix="<br />" %><% image.deletelink prefix="...&nbsp;" %></td>
</tr>
<tr>
<td colspan="2"><% image.show what="thumbnail" vspace="5" %></td>
</tr>
</table>

View file

@ -0,0 +1,6 @@
<form method="post" action="<% response.action %>">
<p>Please choose if you want to get a full download of the layout '<% this.title %>' or just the changes made (which includes modified skins and any added images):</p>
<p><% input type="submit" name="changesonly" value="Changes only" %>&nbsp;<% input type="submit" name="full" value="Full download" %>&nbsp;<% input type="submit" name="cancel" value="Cancel" %></p>
<p class="small"><strong>Changes only</strong><br />results in a .zip file that contains only the changes made in this layout, including its preferences, any modified skins and all images added to this layout. Use this option for backup purposes or to import this layout in a site within the same system.</p>
<p class="small"><strong>Full download</strong><br />results in a .zip file that contains all of the above plus all the skins that were <i>not</i> modified and all standard images of this layout. Use this option for backup purposes or to transport this layout to another site where the basis layout used isn't available.</p>
</form>

View file

@ -0,0 +1,15 @@
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><div class="storyTitle"><% layout.title linkto="main" %></div>
<div><% layout.description limit="100" suffix="<br />" %></div>
<div><% layout.parent prefix="(based on the layout '" suffix="')<br />" %></div>
<div class="small"><% layout.creator prefix="created by " %><% layout.createtime format="long" prefix=" on " %><% layout.modifier prefix=", last modified by " %><% layout.modifytime prefix=" on " format="long" %></div></td>
<td valign="top" align="right" class="small"><% layout.link to="edit" text="preferences" prefix="...&nbsp;" suffix="<br />" %>
<% layout.link to="skins" text="skins" prefix="...&nbsp;" suffix="<br />" %>
<% layout.link to="images" text="images" prefix="...&nbsp;" suffix="<br />" %>
<% layout.testdrivelink target="_blank" prefix="...&nbsp;" suffix="<br />" %>
<% layout.activatelink prefix="...&nbsp;" suffix="<br />" %>
<% layout.link to="download" prefix="...&nbsp;" text="download" suffix="<br />" %>
<% layout.deletelink prefix="...&nbsp;" suffix="<br />" %></td>
</tr>
</table>

19
code/LayoutMgr/new.skin Normal file
View file

@ -0,0 +1,19 @@
<form action="<% response.action %>" method="post">
<p>To create a new layout please enter a title for it. Optional you can choose one of the available system layouts as a basis.</p>
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="small">Title:</td>
<td><% input type="text" name="title" %></td>
</tr>
</table>
<% response.pagenavigation %>
<% response.layoutlist %>
<% response.pagenavigation %>
<p><br /><% input type="submit" name="create" value="Create" %>&nbsp;<% input type="submit" name="cancel" value="Cancel" %></p>
</form>

View file

@ -0,0 +1,16 @@
/**
* render the list of members of a site
*/
function renderMemberlist() {
var currLvl = null;
res.push();
for (var i=0;i<this.size();i++) {
var m = this.get(i);
if (m.level != currLvl) {
this.renderSkin("membergroup", {group: getRole(m.level)});
currLvl = m.level;
}
m.renderSkin("mgrlistitem");
}
return res.pop();
}

View file

@ -0,0 +1,3 @@
<div class="member"><b><% membership.username linkto="edit" %></b>
<div class="small"><% membership.url suffix="<br />" %>
Signed up on <% membership.createtime format="short" %><% membership.deletelink text="remove" prefix="&nbsp;&nbsp;...&nbsp;" %></div></div>

View file

@ -0,0 +1,11 @@
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td colspan="3" class="small"><% poll.creator as="link" %>, <% poll.createtime format="short" %> (<% poll.total no="votes" one="vote" more="votes" %>)</td>
</tr>
<tr valign="top">
<td><div class="storytitle"><% poll.question %></div>
<div class="small"><b>code:</b> &lt;% poll id="<% poll.id %>" %&gt;</div></td>
<td width="10" nowrap="nowrap">&nbsp;</td>
<td align="right" class="small" nowrap="nowrap"><% poll.viewlink prefix="...&nbsp;" suffix="<br />" %><% poll.link to="results" text="results" prefix="...&nbsp;" suffix="<br />" %><% poll.editlink prefix="...&nbsp;" suffix="<br />" %><% poll.closelink prefix="...&nbsp;" suffix="<br />" %><% poll.deletelink prefix="...&nbsp;" %></td>
</tr>
</table>

View file

@ -0,0 +1,26 @@
/**
* render a dropdown containing the available shareable system layouts
* (this method also checks if any of the system layouts is already
* in the chain of the selected layout, just to prevent a loop
* between two layouts)
* @see layoutmgr/renderParentLayoutChooser
* @param Object collection to work on
* @param Object current Layout
* @param String String to display as first option
*/
function renderParentLayoutChooser(selLayout) {
var size = this.size();
var parents = null;
var selected = null;
var options = [];
for (var i=0;i<size;i++) {
var l = this.get(i);
var parents = l.getParents();
if (!selLayout || (l != selLayout && !parents.containsKey(selLayout._id)))
options.push({value: l.alias, display: l.title});
}
if (selLayout && selLayout.parent)
selected = selLayout.parent.alias;
Html.dropDown("layout", options, selected, "--- choose a basis layout ---");
return;
}

16
code/Skin/diff.skin Normal file
View file

@ -0,0 +1,16 @@
<h3>Diffs for <% this.proto %>/<% this.name %>.skin of layout '<% layout.title %>'</h3>
<table class="diff" cellspacing="0" cellpadding="0">
<tr>
<td class="removed">&nbsp;</td>
<td colspan="2">Lines removed from original skin</td>
</tr>
<tr>
<td class="added">&nbsp;</td>
<td colspan="2">Lines added to modified skin</td>
</tr>
<tr>
<td colspan="3"><% response.status prefix="<br />" default="&nbsp;" %></td>
</tr>
<% response.diff %>
</table>

5
code/Skin/diffline.skin Normal file
View file

@ -0,0 +1,5 @@
<tr>
<td class="num"><% param.num %></td>
<td class="status"><% param.status %></td>
<td class="<% param.class %>"><pre>&nbsp;<% param.line %></pre></td>
</tr>

1
code/Skin/status.skin Normal file
View file

@ -0,0 +1 @@
<span class="small">(modified by <% this.creator %>&nbsp;...&nbsp;<% this.link to="diff" %>&nbsp;...&nbsp;<% this.link to="delete" text="reset" %>)</span>

View file

@ -0,0 +1,2 @@
<span class="small">(created by <% this.creator %>&nbsp;...&nbsp;<% this.link to="delete" text="delete" %>)<br />
<strong>Code:</strong> &lt;% <% this.proto %>.skin name="<% this.name %>" %&gt;</span>

19
code/SkinMgr/new.skin Normal file
View file

@ -0,0 +1,19 @@
<form method="post" action="<% response.action %>">
<p>To create a new custom skin please choose the prototype and define a name for it.</p>
<table border="0" cellspacing="0" cellpadding="3">
<tr>
<td class="small" nowrap="nowrap">Prototype:</td>
<td nowrap="nowrap"><% skinmgr.prototypechooser %></td>
</tr>
<tr>
<td class="small" nowrap="nowrap">Name:</td>
<td nowrap="nowrap"><% input name="name" size="30" %></td>
</tr>
<tr>
<td class="small" valign="top" nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap"><br /><% input type="submit" name="save" value="Save" %>&nbsp;<% input type="submit" name="cancel" value="Cancel" %></td>
</tr>
</table>
</form>

View file

@ -0,0 +1,74 @@
/**
* render the tree view of skin manager
* @param Object req.data
* @param Object Array containg the children (if any)
*/
function renderTree(param, collection) {
res.push();
if (!collection)
var collection = SKINSETS;
for (var i in collection) {
var skinset = collection[i];
var sp = {skinset: skinset.key, anchor: skinset.key, "class": "closed"};
var desc = this.getSkinDescription("skinset", skinset.key);
sp.title = desc[0];
sp.text = desc[1];
if (skinset.context && skinset.context != res.handlers.context._prototype)
continue;
if (param.skinset && param.skinset.startsWith(skinset.key)) {
sp["class"] = "selected";
if (skinset.skins)
sp.skins = this.renderTreeLeafs(skinset);
sp.skinset = sp.skinset.substring(0, sp.skinset.indexOf("."));
if (skinset.children)
sp.children = this.renderTree(param, skinset.children);
}
this.renderSkin("treebranch", sp);
}
return res.pop();
}
/**
* render the list of skins of a branch
* @param Object array containing the skins
* @param String key of the current branch
*/
function renderTreeLeafs(skinset) {
res.push();
var text;
for (var i in skinset.skins) {
var sp = {key: skinset.skins[i], skinset: skinset.key};
var splitKey = sp.key.split(".");
var s = this.getSkin(splitKey[0], splitKey[1]);
if (s)
sp.status = s.renderSkinAsString("status");
var desc = this.getSkinDescription("skin", sp.key);
sp.title = desc[0];
sp.text = desc[1];
this.renderSkin("treeleaf", sp);
}
return res.pop();
}
/**
* render a list of skins
*/
function renderList(collection, action) {
var sp = {action: action};
res.push();
for (var i=0;i<collection.size();i++) {
var s = collection.get(i);
sp.key = s.proto + "." + s.name;
if (!s.custom) {
sp.status = s.renderSkinAsString("status");
var desc = this.getSkinDescription("skin", sp.key);
sp.title = desc[0];
sp.text = desc[1];
} else {
sp.status = s.renderSkinAsString("statuscustom");
sp.title = sp.key;
}
this.renderSkin("treeleaf", sp);
}
return res.pop();
}

View file

@ -0,0 +1 @@
<li class="skinset"><a class="<% param.class %>" href="?skinset=<% param.skinset %>#<% param.anchor %>" name="<% param.anchor %>"><% param.title %></a><% param.text prefix="<div>" suffix="</div>" %><% param.skins prefix="<ul>" suffix="</ul>" %><% param.children prefix="<ul>" suffix="</ul>" %></li>

View file

@ -0,0 +1 @@
<li><a href="<% skinmgr.href %>edit?key=<% param.key %>&skinset=<% param.skinset %>&action=<% param.action %>" name="<% param.key %>"><% param.title %></a><% param.status prefix="<div>" suffix="</div>" %><% param.text prefix="<div>" suffix="</div>" %></li>

View file

@ -0,0 +1,12 @@
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td colspan="3" class="small"><% story.creator as="link" %> on <% story.createtime format="short" %>&nbsp;(<% story.online %><% story.commentcounter prefix=",&nbsp;" anchor="comments" %>)</td>
</tr>
<tr valign="top">
<td><span class="storyTitle"><% story.content part="title" suffix="<br />" %></span>
<span class="small"><b>Code:&nbsp;</b>&lt;% story id="<% story.id %>" %&gt;</span><br />
<% story.content part="text" limit="200" suffix="&nbsp;..." %></td>
<td width="10" nowrap="nowrap">&nbsp;</td>
<td align="right" class="small" nowrap="nowrap"><% story.editlink prefix="...&nbsp;" suffix="<br />" %><% story.viewlink prefix="...&nbsp;" suffix="<br />" %><% story.onlinelink mode="toggle" prefix="...&nbsp;" suffix="<br />" %><% story.deletelink prefix="...&nbsp;" %></td>
</tr>
</table>

View file

@ -0,0 +1,14 @@
use antville;
alter table AV_SITE add column SITE_F_LAYOUT mediumint(10) null after SITE_EMAIL;
alter table AV_LAYOUT add column LAYOUT_ISIMPORT tinyint(1) null after LAYOUT_SHAREABLE;
alter table AV_SKIN add column SKIN_ISCUSTOM tinyint(1) null after SKIN_NAME;
update AV_SKIN set SKIN_ISCUSTOM = 0;
update AV_SKIN set SKIN_NAME = "mgrlistitem" where SKIN_PROTOTYPE = "file" and SKIN_NAME = "preview";
update AV_SKIN set SKIN_NAME = "mgrlistitem" where SKIN_PROTOTYPE = "image" and SKIN_NAME = "preview";
update AV_SKIN set SKIN_NAME = "mgrlistitem" where SKIN_PROTOTYPE = "poll" and SKIN_NAME = "listitem";
update AV_SKIN set SKIN_NAME = "mgrlistitem" where SKIN_PROTOTYPE = "layout" and SKIN_NAME = "listitem";
update AV_SKIN set SKIN_NAME = "mgrlistitem" where SKIN_PROTOTYPE = "story" and SKIN_NAME = "listitem";
update AV_SKIN set SKIN_NAME = "mgrlistitem" where SKIN_PROTOTYPE = "membership" and SKIN_NAME = "preview";