published
updated
source uri
author

summary

content

<html> <body> <acre:script> var APP_EDITOR = 'http://localhost/acrid/'; /* TODO: how to abstract this? */ function basename(path) { return path.replace( /.*\//, "" ); } function dirname(path) { return path.match( /(.*)\// )[1]; } var query = acre.require("freebase:/user/willmoffat/test-args/testcases").query; /* query = acre.freebase.extend_query(query, {"location.id":"/en/berkeley_california", "limit":10}); */ var testcases = acre.freebase.MqlRead(query).result; </acre:script> <div acre:def="highlight_ids(test_path)" acre:strip="1"> ${test_path.replace(/&amp;/g,'<b>&amp;</b>')} </div> <h3>Output</h3> <div> <div acre:for="testcase in testcases"> <a href="${APP_EDITOR + '#app=' + dirname(testcase.file.id) + '&amp;file=' + basename(testcase.file.id) + '&amp;tab=edit' }"> ${testcase.file.name || testcase.file.id} </a> - ${highlight_ids(testcase.test_path)} </div> </div> <!-- Attribution --> <acre:script> var attribution = acre.require("freebase:/freebase/apps/attribution/templates"); </acre:script> ${attribution.blanket()} </body> </html>

Topic History

Created by willmoffat Jul 4, 2008
Last edited by willmoffat Aug 12, 2008

Comments

There is no discussion about this document.