From ec450e407028e42f2557d27340225aa55bc179be Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 20:14:37 +0000 Subject: [PATCH 1/5] Add pull request notification * Add message when there are pull requests with client side javascript * Add string for OAOSIDL, for future usage * Title cased credits * Removed text transform from random quote * Shoved commit count to left * Added lines to top and bottom of ``h2`` * Removed redundant CSS * Added JQuery --- modules/project/pages.js | 1 + modules/project/strings.json | 6 ++++++ public/project.css | 30 ++++++++++++++++++++++++++++++ views/project/project.jade | 21 ++++++++++++--------- 4 files changed, 49 insertions(+), 9 deletions(-) diff --git a/modules/project/pages.js b/modules/project/pages.js index f248dcd..5578d68 100644 --- a/modules/project/pages.js +++ b/modules/project/pages.js @@ -93,6 +93,7 @@ var pages = function(dbot) { "languageprog": dbot.t("langhead-progress"), "languagetrans": dbot.t("langhead-translations"), "languagetranshead": dbot.t("translations"), + "pullreqs": dbot.t("outstanding-pullreq") }); }, }; diff --git a/modules/project/strings.json b/modules/project/strings.json index 8960da3..be11111 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -189,5 +189,11 @@ }, "langhead-native": { "en": "Native" + }, + "outstanding-pullreq": { + "en": "There are outstanding pull requests" + }, + "oaosidl": { + "en": "The Official Aberystwyth Open Source International Development League" } } diff --git a/public/project.css b/public/project.css index 736b633..95ff2d4 100644 --- a/public/project.css +++ b/public/project.css @@ -3,6 +3,10 @@ pre#gitdiff { width:80; margin:auto; text-transform:none; + clear:both; +} +ul#credits { + text-transform:capitalize; } div#main { font-size:18px; @@ -19,6 +23,7 @@ p.intro { border:1px solid #ccc; padding:20px; border-radius:4px; + text-transform:none; } div.progress.open { background-color: #f4fff4; @@ -74,3 +79,28 @@ h3 { #translations td { text-transform:none; } +p#pullreq { + float:right; + border-left:1px solid #ccc; + border-top:1px solid #ccc; + border-top-left-radius:5px; + padding:10px; + margin:5px; + display:none; +} +p#revnum { + float:left; + border-right:1px solid #ccc; + border-top:1px solid #ccc; + border-top-right-radius: 5px; + margin:5px; + padding:10px; + margin-bottom:0px; +} +h2 { + border-bottom: 1px solid #ccc; + border-top:1px solid #ccc; + margin-left:auto; + margin-right:auto; + width:40%; +} diff --git a/views/project/project.jade b/views/project/project.jade index 22d5c93..560de26 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -8,12 +8,13 @@ html(lang='#{curr839}') link(rel='stylesheet', type='text/css', href='/styles.css') link(rel="stylesheet", href="/project.css") title #{pagetitle} - - var mstone = "milestone" - style(type="text/css") - each milestone in milestones - - current = mstone+milestone.number - - wdth = ((milestone.open_issues/(milestone.open_issues + milestone.closed_issues))*100) - .current { width: wdth% } + script + $(document).ready(function() { + $.get("https://api.github.com/repos/#{repo}/pulls", function(data) { + if ($.parseJSON(data).length) { $("#pullreq").show();} + }); + }); + body div.container div#page @@ -23,7 +24,9 @@ html(lang='#{curr839}') #{dquote} section#git h2 #{development} - p.center + p#pullreq + a(href="https://github.com/"+repo+"/pulls") #{pullreqs} + p#revnum #{revnum} pre#gitdiff #{diff} @@ -36,7 +39,7 @@ html(lang='#{curr839}') th #{closedmilestone} each milestone in milestones - var wdth = ((milestone.closed_issues/(milestone.open_issues + milestone.closed_issues))*100) - tr(id=mstone+milestone.number) + tr(id="milestone"+milestone.number) td a(href="https://github.com/"+repo+"/issues?milestone="+milestone.number) #{milestone.title} @@ -79,7 +82,7 @@ html(lang='#{curr839}') td #{language.count} / #{translation.en.count} h3 #{credits} #{thanks} - ul + ul#credits each author in authors li #{author} From fe57328e3d68ddee26b54da8b988f44cf3a48b3e Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 20:28:51 +0000 Subject: [PATCH 2/5] fix missing string --- modules/project/strings.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/project/strings.json b/modules/project/strings.json index be11111..58fb470 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -195,5 +195,8 @@ }, "oaosidl": { "en": "The Official Aberystwyth Open Source International Development League" + }, + "link-autotitle": { + "en": "Automatically titling links in channels" } } From 75e03c15b76adfbcbcb16d8acbf660b47bae3422 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Sun, 21 Apr 2013 20:44:41 +0000 Subject: [PATCH 3/5] add french translations --- modules/project/strings.json | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/modules/project/strings.json b/modules/project/strings.json index 58fb470..daa07b0 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -1,7 +1,4 @@ { - "dbotintro": { - "en": "{botname} lorem ipsum dolor sit amet" - }, "dbotspeaks": { "en": "{name} speaks {lang}", "de": "{name} spricht {lang} ({langen})", @@ -10,10 +7,12 @@ "nl": "{name} spreekt {lang} ({langen})" }, "thanks": { - "en": "With thanks to:" + "en": "With thanks to:", + "fr": "Merci à:" }, "credits": { - "en": "Authors" + "en": "Authors", + "fr": "Développeurs" }, "pagetitle": { "en": "{botname} web interface", @@ -115,6 +114,7 @@ }, "milestones": { "en": "Milestones" + "fr": "étapes" }, "milestoneprog": { "en": "Progress", @@ -173,22 +173,32 @@ "en": "{branch}" }, "git": { - "en": "version control" + "en": "version control", + "de": "Versionsverwaltung", + "es": "Control de versiones", + "fr": "Festion de versions", + "it": "Controllo versione", + "nl": "Versiebeheersysteem" }, "langhead-current": { - "en": "Current" + "en": "Current", + "fr": "Courant" }, "langhead-translations": { - "en": "Completion" + "en": "Completion", + "fr": "Achèvement" }, "translations": { - "en": "Translations" + "en": "Translations", + "fr": "Traductions" }, "langhead-progress": { - "en": "Translation Progress" + "en": "Translation Progress", + "fr": "Avancement de la Traduction" }, "langhead-native": { - "en": "Native" + "en": "Native", + "fr": "Natale" }, "outstanding-pullreq": { "en": "There are outstanding pull requests" From 3f5bf0e5a553ab1b2d5bb6347b58341d9f901118 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Mon, 22 Apr 2013 23:58:48 +0000 Subject: [PATCH 4/5] Fix typographical error The strings.json for the project module was malformed. This commit rectifies the issue --- modules/project/strings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/project/strings.json b/modules/project/strings.json index daa07b0..5dc8c3e 100644 --- a/modules/project/strings.json +++ b/modules/project/strings.json @@ -113,7 +113,7 @@ "nl": "Debug uitgeschakeld" }, "milestones": { - "en": "Milestones" + "en": "Milestones", "fr": "étapes" }, "milestoneprog": { From 194135791a934c92a58cdec261d2e5306ce3b828 Mon Sep 17 00:00:00 2001 From: Douglas Gardner Date: Tue, 23 Apr 2013 00:31:36 +0000 Subject: [PATCH 5/5] Add footer to pages linking to ./project --- public/styles.css | 15 +++++++++++++++ views/layout.jade | 3 +++ views/project/project.jade | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/public/styles.css b/public/styles.css index 39703bb..8e8dfaa 100644 --- a/public/styles.css +++ b/public/styles.css @@ -223,3 +223,18 @@ div.imgwrap > img { .thumbnail:hover > div.imgwrap > span.nicks { display: inline; } + +/* footer */ +#footer { + margin-top:5px; + margin-right:10px; + margin-left:10px; +} +#footer a { + float:right; + padding-left:2px; + padding-right:2px; + background-color:#f5f5f5; + border-radius:3px; +} + diff --git a/views/layout.jade b/views/layout.jade index bb3cf2e..ad2d14e 100644 --- a/views/layout.jade +++ b/views/layout.jade @@ -14,6 +14,9 @@ html(lang='en') a(href='/') #{name} web interface div.container#main block content + div#footer + a#project(href='/project') About + script(type="text/javascript", src="/bootstrap/js/bootstrap.min.js") script(type="text/javascript", src="/d3/d3.v3.min.js") script(type="text/javascript", src="/script.js") diff --git a/views/project/project.jade b/views/project/project.jade index 560de26..d2dfb42 100644 --- a/views/project/project.jade +++ b/views/project/project.jade @@ -50,7 +50,7 @@ html(lang='#{curr839}') print #{Math.round(wdth)+"%"} td #{milestone.open_issues} td #{milestone.closed_issues} - a(#href="https://github.com/"+repo+"/") + a(href="https://github.com/"+repo+"/") #{propaganda} h3 #{languagetranshead} table#translations