Merge branch 'develop' into feature/admin-improvements
* develop: Revert "Created CSS sprites from all non-animated images using http://draeton.github.io/stitches/ for now (let’s see if necessary to implement in build process)" Reduced visible text and added little script for previewing the new site URL Created CSS sprites from all non-animated images using http://draeton.github.io/stitches/ for now (let’s see if necessary to implement in build process) Fixed license and author Removed outdated info text Fixed missing directories on build Fixed sorting and limit of Root.updates collection
This commit is contained in:
commit
0d2774d482
7 changed files with 36 additions and 23 deletions
|
@ -208,9 +208,11 @@
|
||||||
<copy todir="static/fonts">
|
<copy todir="static/fonts">
|
||||||
<fileset dir="node_modules/uikit-bower/fonts" includes="**"/>
|
<fileset dir="node_modules/uikit-bower/fonts" includes="**"/>
|
||||||
</copy>
|
</copy>
|
||||||
|
<mkdir dir="static/scripts"/>
|
||||||
<exec executable="node_modules/.bin/browserify" output="static/scripts/main.min.js">
|
<exec executable="node_modules/.bin/browserify" output="static/scripts/main.min.js">
|
||||||
<arg line="build/client/main.js"/>
|
<arg line="build/client/main.js"/>
|
||||||
</exec>
|
</exec>
|
||||||
|
<mkdir dir="static/styles"/>
|
||||||
<exec executable="node_modules/.bin/lessc" output="static/styles/main.min.css">
|
<exec executable="node_modules/.bin/lessc" output="static/styles/main.min.css">
|
||||||
<arg line="-x build/client/main.less"/>
|
<arg line="-x build/client/main.less"/>
|
||||||
</exec>
|
</exec>
|
||||||
|
|
|
@ -623,7 +623,7 @@ function list_macro(param, id, limit) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var skin, collection;
|
var skin, collection;
|
||||||
var max = Math.min(limit || 25, 50);
|
var max = Math.min(limit || 25, 100);
|
||||||
|
|
||||||
if (id === 'sites') {
|
if (id === 'sites') {
|
||||||
collection = root.sites.list(0, max);
|
collection = root.sites.list(0, max);
|
||||||
|
@ -632,7 +632,9 @@ function list_macro(param, id, limit) {
|
||||||
collection = root.updates.list().map(function (item) {
|
collection = root.updates.list().map(function (item) {
|
||||||
return item.get(0);
|
return item.get(0);
|
||||||
});
|
});
|
||||||
skin = 'Site#preview';
|
// FIXME: Sorting in code is necessary (see definition of Root.updates property).
|
||||||
|
collection.sort(new Number.Sorter('created', Number.Sorter.DESC));
|
||||||
|
skin = 'Story#preview';
|
||||||
} else {
|
} else {
|
||||||
var site, type;
|
var site, type;
|
||||||
var parts = id.split('/');
|
var parts = id.split('/');
|
||||||
|
|
|
@ -1,31 +1,29 @@
|
||||||
<% #create %>
|
<% #create %>
|
||||||
<h1><% response.title %></h1>
|
<h1><% response.title %></h1>
|
||||||
<div>
|
|
||||||
<% gettext "To create a new site you need to fill out the form below." %>
|
|
||||||
</div>
|
|
||||||
<small>
|
|
||||||
<p>
|
|
||||||
<% gettext 'The name will be part of the URL of your site. E.g. if you enter “{0}” as the name your site will be reachable via this url: {1}' <% example.name %> <% example.href prefix="<pre><code>" suffix=</code></pre> %> %>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<% gettext "Please note that you cannot change the name after the site was created." %> <% gettext "The title will appear in the header of every page of your site. You can change it anytime you want." %>
|
|
||||||
</p>
|
|
||||||
</small>
|
|
||||||
<form class='uk-form uk-form-stacked' method="post" action="<% response.action %>">
|
<form class='uk-form uk-form-stacked' method="post" action="<% response.action %>">
|
||||||
<div class='uk-form-row'>
|
<div class='uk-form-row'>
|
||||||
<label class='uk-form-label' for='name'>
|
<label class='uk-form-label' for='name'>
|
||||||
<% gettext Name %>
|
<% gettext Name %> <i class='uk-icon uk-icon-info-circle uk-text-muted' data-uk-tooltip title="<% gettext "Please note that you cannot change the name after the site was created." %>"></i>
|
||||||
</label>
|
</label>
|
||||||
<div class='uk-form-controls'>
|
<div class='uk-form-controls'>
|
||||||
<% newSite.input name class=uk-form-width-medium %>
|
<% newSite.input name class=uk-form-width-medium maxlength=25 %>
|
||||||
|
<div class='uk-form-help-inline'>
|
||||||
|
<% gettext 'The name will be part of the URL of your site.' %>
|
||||||
|
</div>
|
||||||
|
<div class='uk-form-help-block'>
|
||||||
|
<% root.skin Root#urlPreview %>
|
||||||
|
<noscript>
|
||||||
|
<% gettext 'E.g. if you enter <em>{0}</em> here your site will be reachable via {1}' <% example.name %> <% root.href <% example.name %> prefix=<code> suffix=</code> %> %>
|
||||||
|
</noscript>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='uk-form-row'>
|
<div class='uk-form-row'>
|
||||||
<label class='uk-form-label' for='title'>
|
<label class='uk-form-label' for='title'>
|
||||||
<% gettext Title %>
|
<% gettext Title %> <i class='uk-icon uk-icon-info-circle uk-text-muted' data-uk-tooltip title='<% gettext "The title will appear in the header of every page of your site. You can change it anytime you want." %>'></i>
|
||||||
</label>
|
</label>
|
||||||
<div class='uk-form-controls'>
|
<div class='uk-form-controls'>
|
||||||
<% newSite.input title class=uk-form-width-large %>
|
<% newSite.input title class=uk-width-1-1 %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class='uk-form-row'>
|
<div class='uk-form-row'>
|
||||||
|
|
|
@ -36,11 +36,13 @@ sites.filter = mode in ('open', 'public') and status <> 'blocked'
|
||||||
sites.order = name asc
|
sites.order = name asc
|
||||||
|
|
||||||
updates = collection(Story)
|
updates = collection(Story)
|
||||||
updates.group = site_id
|
|
||||||
updates.filter.additionalTables = site
|
updates.filter.additionalTables = site
|
||||||
updates.filter = site.id = content.site_id and site.name <> '${name}' and site.mode in ('open', 'public') and site.status <> 'blocked' and content.status <> 'closed'
|
updates.filter = site.id = content.site_id and site.name <> '${name}' and site.mode in ('open', 'public') and site.status <> 'blocked' and content.status <> 'closed'
|
||||||
updates.order = content.created desc
|
updates.order = content.created desc
|
||||||
updates.group = site_id
|
updates.group = site_id
|
||||||
|
# FIXME: Helma throws a Runtime Exception: Error retrieving IDs. Needs sorting in code.
|
||||||
|
#updates.group.order = content.created desc
|
||||||
|
updates.limit = 100
|
||||||
|
|
||||||
users = collection(User)
|
users = collection(User)
|
||||||
users.accessName = name
|
users.accessName = name
|
||||||
|
|
|
@ -1,2 +1,14 @@
|
||||||
<% #status %>
|
<% #status %>
|
||||||
<% gettext 'System is up and running.' %>
|
<% gettext 'System is up and running.' %>
|
||||||
|
|
||||||
|
<% #urlPreview %>
|
||||||
|
<a id='av-site-url-preview'></a>
|
||||||
|
<script>
|
||||||
|
$(function () {
|
||||||
|
$('#name').on('keyup', function (event) {
|
||||||
|
var url = '<% root.href %>' + $(this).val();
|
||||||
|
var html = '<% root.href %>' + '<b>' + $(this).val() + '</b>';
|
||||||
|
$('#av-site-url-preview').html(html).attr('href', url);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
|
@ -2,9 +2,6 @@
|
||||||
<p>
|
<p>
|
||||||
<% gettext 'Antville is an open source project aimed at the development of a simple site hosting system with many advanced <a href="http://code.google.com/p/antville/wiki/AntvilleFeatures">features</a>.' %>
|
<% gettext 'Antville is an open source project aimed at the development of a simple site hosting system with many advanced <a href="http://code.google.com/p/antville/wiki/AntvilleFeatures">features</a>.' %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
|
||||||
<% gettext 'One Antville installation can easily host up to several thousands of <a href="{0}">sites</a>.' <% site.href sites %> %>
|
|
||||||
</p>
|
|
||||||
<p>
|
<p>
|
||||||
<a style='color: #fff;' class='uk-button uk-button-success' href='<% site.href create %>'>
|
<a style='color: #fff;' class='uk-button uk-button-success' href='<% site.href create %>'>
|
||||||
<% gettext "Create a site. It only takes a few clicks." %>
|
<% gettext "Create a site. It only takes a few clicks." %>
|
||||||
|
|
|
@ -15,8 +15,8 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://code.google.com/p/antville"
|
"url": "https://code.google.com/p/antville"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "The Ant Queens",
|
||||||
"license": "Apache",
|
"license": "Apache 2",
|
||||||
"napa": {
|
"napa": {
|
||||||
"uikit-bower": "uikit/bower-uikit#2.15.0"
|
"uikit-bower": "uikit/bower-uikit#2.15.0"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue