CI Reports
@@ -202,7 +195,11 @@
Get Involved
if (info.license) {
project.find(".license").removeClass("hidden")
.find("span").html(info.license.name);
- } else {
+ } else if (info.civic_json && info.civic_json.license) {
+ // Put civic.json license second since GitHub's identifier may be more reliable
+ project.find(".license").removeClass("hidden")
+ .find("span").html(info.civic_json.license);
+ } else {
project.find(".license").removeClass("hidden")
.find("span").html("None");
}
@@ -241,8 +238,6 @@
Get Involved
project.find(".github-repo").removeClass('hidden')
.find('a.repo-link').attr('href', repo_link).text("Github repository >");
- project.find('.description').text(info.description);
-
if (info.homepage){
project.find(".homepage").removeClass('hidden')
.find('a').attr('href', info.homepage).text(info.homepage);
@@ -271,6 +266,12 @@
Get Involved
// civic.json related data
if (info.civic_json) {
+ if (info.civic_json.description){
+ project.find('.description').text(info.civic_json.description);
+ } else {
+ project.find('.description').text(info.description);
+ }
+
if (info.civic_json.thumbnailUrl){
project.find(".thumbnail").removeClass("hidden")
.attr("src", info.civic_json.thumbnailUrl);
@@ -286,58 +287,24 @@
Get Involved
.attr('href', 'http://twitter.com/' + info.civic_json.contact.twitter.slice(1));
}
- if (info.civic_json.communityPartner){
- var compartner = "";
- $.each(info.civic_json.communityPartner, function(k,v){
- compartner += "
"+k+"";
- });
- if (compartner.length > 0){
- project.find(".communityPartner").removeClass('hidden').
- find("span").html(compartner);
- }
- }
-
- if (info.civic_json.governmentPartner){
- var govpartner = "";
- $.each(info.civic_json.governmentPartner, function(k,v){
- govpartner += "
"+k+"";
- });
- if (govpartner.length > 0){
- project.find(".governmentPartner").removeClass('hidden').
- find("span").html(govpartner);
- }
- }
-
- if (info.civic_json.politicalEntity){
- var polentity = "";
- $.each(info.civic_json.politicalEntity, function(k,v){
- polentity += "
"+k+"";
- });
- if (polentity.length > 0){
- project.find(".politicalEntity").removeClass('hidden').
- find("span").html(polentity);
- }
- }
-
- if (info.civic_json.needs){
- if (info.civic_json.needs.length > 0) {
- project.find('.needs').removeClass("hidden");
- $.each(info.civic_json.needs, function(k,v){
- project.find('.needs div').append(
- $("
").text(v.need)
- );
- });
- }
- }
+ if (info.civic_json.partners){
+ $.each(info.civic_json.partners, function(k,v){
+ partners += "
"+k+"";
+ })
+ if (partners.length > 0){
+ project.find(".partners").removeClass('hidden').
+ find("span").html(partners);
+ }
+ }
if (info.civic_json.status){
project.find('.status').removeClass("hidden").find("span").text(info.civic_json.status);
}
- if (info.civic_json.categories){
- $.each(info.civic_json.categories, function(k,v){
- project.find('.categories').append($("
").find('button').text(v.category));
- c = classify(v.category);
+ if (info.civic_json.tags){
+ $.each(info.civic_json.tags, function(k,v){
+ project.find('.tags').append($("
").find('button').text(v.tag));
+ c = classify(v.tag);
project.addClass("category-"+c);
if ($.inArray(c,cat)==-1){
cat.push(c);
@@ -450,7 +417,7 @@
Get Involved
$(window).trigger('resize');
// Hide CI reports that 404'd
- $("img").error(function () {
+ $("img").error(function () {
$(this).hide();
});