You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by hu...@apache.org on 2016/02/12 12:08:43 UTC
svn commit: r1729988 - in /comdev/helpwanted.apache.org/site:
admin/index.html listitems.lua wtest.html
Author: humbedooh
Date: Fri Feb 12 11:08:43 2016
New Revision: 1729988
URL: http://svn.apache.org/viewvc?rev=1729988&view=rev
Log:
add HackIllinois tag, allow for searching for tags, prime widget..primer
Modified:
comdev/helpwanted.apache.org/site/admin/index.html
comdev/helpwanted.apache.org/site/listitems.lua
comdev/helpwanted.apache.org/site/wtest.html
Modified: comdev/helpwanted.apache.org/site/admin/index.html
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/admin/index.html?rev=1729988&r1=1729987&r2=1729988&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/admin/index.html (original)
+++ comdev/helpwanted.apache.org/site/admin/index.html Fri Feb 12 11:08:43 2016
@@ -50,6 +50,7 @@
<b>Additional info URL: </b> <input type="text" name="url"/> (optional URL with more details)<br/>
<b>Contributors guide URL: </b> <input type="text" name="curl"/> (optional guide on how to contribute)<br/>
<b>Collaborative?: </b> <input type="checkbox" name="collaboration" value="yes"/><br/>
+ <b style='color: #37B;'>HackIllinois?: </b> <input type="checkbox" name="tag" value="hackillinois"/>Check this box for HackIllinois tasks<br/><br/><br/>
<input type="submit" value="Save task"/>
</form>
</div>
Modified: comdev/helpwanted.apache.org/site/listitems.lua
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/listitems.lua?rev=1729988&r1=1729987&r2=1729988&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/listitems.lua (original)
+++ comdev/helpwanted.apache.org/site/listitems.lua Fri Feb 12 11:08:43 2016
@@ -70,11 +70,21 @@ function handle(r)
table.insert(projects, project)
end
+ -- Tags
+ local tags = {}
+ for tag in (get.tags or ""):gmatch("([+#A-Za-z0-9+]+)") do
+ table.insert(tags, tag)
+ end
+
local pl = #projects > 0 and table.concat(projects, " OR ") or "*"
local tl = #types > 0 and table.concat(types, " OR ") or "*"
local ll = #lingos > 0 and table.concat(lingos, " OR ") or "*"
+ local ta = #tags > 0 and table.concat(tags, " OR ") or "*"
local dsl = ("languages:(%s) AND type:(%s) AND project:(%s)"):format(ll, tl,pl)
+ if #ta > 1 then
+ dsl = ("%s AND tag:(%s)"):format(dsl, ta)
+ end
local doc = elastic.find(dsl, 200, 'item', 'created')
if doc and #doc > 0 then
Modified: comdev/helpwanted.apache.org/site/wtest.html
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/wtest.html?rev=1729988&r1=1729987&r2=1729988&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/wtest.html (original)
+++ comdev/helpwanted.apache.org/site/wtest.html Fri Feb 12 11:08:43 2016
@@ -10,13 +10,21 @@
<h2>Sample widget page</h2>
This is a sample widget page. Just an ordinary HTML page with a widget attached by inserting the following code:
<pre style='background: #FFE; border: 1px solid #666;'>
-<div style="width: 700px;" type="helpwanted" project="<span id='pr'>httpd</span>" description="<span id='pru'>the Apache HTTP Server</span>"></div>
+<div style="width: 700px;" type="helpwanted" project="<span id='pr'>httpd</span>" <span id='tags'></span> description="<span id='pru'>the Apache HTTP Server</span>"></div>
<script src="https://helpwanted.apache.org/widget.js" type="text/javascript"></script>
</pre>
<div id="foo" style="width: 700px;" type="helpwanted" project="httpd" description="the Apache HTTP Server"></div>
<script type="text/javascript">
var pr = document.location.search.substr(1)
- if (pr && pr.length > 1) {
+ if (pr && pr.length > 0) {
+ var tags = ""
+ var m = pr.match(/(.+)\|([a-zA-Z0-9, ]+)/)
+ if (m) {
+ pr = m[1]
+ tags = m[2]
+ document.getElementById('tags').innerHTML = "tags=\"" + tags + "\""
+ document.getElementById('foo').setAttribute("tags", tags)
+ }
pru = pr.replace(/^([a-z])/, function(a) { return a.toUpperCase()})
document.getElementById('pr').innerHTML = pr
document.getElementById('pru').innerHTML = "the Apache " + pru + " project"