Skip to content

Commit 8c89ba2

Browse files
committed
Merge pull request #1 from OpenInnovationNetwork/gh-pages
Update from upstream
2 parents ecd291d + 2be7c30 commit 8c89ba2

4 files changed

Lines changed: 79 additions & 15 deletions

File tree

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# README
22
The Projects repository for Open Innovation Network
33

4-
Available at
4+
Available at:
55

66
http://openinnovationnetwork.github.io/Projects/
77

@@ -11,16 +11,28 @@ http://openinnovationnetwork.github.io/Projects/
1111

1212
### Project Template
1313

14-
A project template is available in https://docs.google.com/presentation/d/1Smi79L9L78V07MNZ6BkURArLeUubN4U0WKo8WmVGB8g/edit#slide=id.p
14+
If you are creating or consolidating your project, you might want to look at the project template created by MIT Media Lab's Dazza Greenwood: https://docs.google.com/presentation/d/1Smi79L9L78V07MNZ6BkURArLeUubN4U0WKo8WmVGB8g/edit#slide=id.p
1515

16-
You should:
16+
To use this template you can:
1717

1818
* Request authorization to the Google Drive folder
19-
* Make a copy of the current template in the same Google Drive folder
19+
* Make a copy of the template in the same Google Drive folder
2020
* Fill out the template
2121

2222
---
2323

24+
## Documentation files
25+
26+
>
27+
> //TODO: Add support to [readthedocs](https://readthedocs.org/)
28+
>
29+
30+
* [Project registration](https://github.com/OpenInnovationNetwork/Projects/blob/gh-pages/docs/Project-registration-documentation.md)
31+
32+
33+
---
34+
35+
2436
## Instructions for this repository
2537

2638
### Fork the repo
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Project registration documentation
2+
3+
## How to register a project
4+
5+
You can register a project in two ways:
6+
7+
1. Follow the instructions on the [README page](https://github.com/OpenInnovationNetwork/Projects/blob/gh-pages/README.md) to open the [project_registration.html](https://github.com/OpenInnovationNetwork/Projects/blob/gh-pages/project_registration.html) file locally, fill in a simple form, and have your project registered in your repository.
8+
9+
2. Manually create a JSON file inside the /projects folder of your repository.
10+
11+
12+
## Structure of the JSON content
13+
14+
| Field name | Description | Required |
15+
| ---------- | ----------- | -------- |
16+
| project_name | Name of the project | Required |
17+
| project_blurb | Brief description of the project (2 or 3 sentences) | Required |
18+
| project_people | People involved in the project | Required |
19+
| project_url | URL to the main online page for the project | Required |
20+
| project_demo_url | URL to an example of this project implemented | Optional |
21+
| project_thumbnail | URL to an image describing the project | Optional |
22+
23+
## Future JSON fields
24+
25+
To be implemented soon.
26+
27+
| Field name | Description |
28+
| ---------- | ----------- |
29+
| project_label | URL to an example of this project implemented |
30+
| project_source_files_url | URL to the project source files (for example, source code) |
31+
| project_license_type | Type of license |
32+
| project_license_url | URL to the project license information |

js/projects_retrieval.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ $(function(){
99
projects_content = new Array();
1010

1111
/* PERSONALIZE THIS CONTENT FOR YOUR FORKED COPY */
12-
// repository_user = "OpenInnovationNetwork"; //eg. in github.com/OpenInnovationNetwork/Projects/, it is "OpenInnovationNetwork"
13-
// repository_name = "Projects"; //eg. in github.com/OpenInnovationNetwork/Projects/, it is "Projects"
12+
// List of repositories in the format ["repository_user", "repository_name"]
13+
// Example: in github.com/OpenInnovationNetwork/Projects/, it is "OpenInnovationNetwork"
14+
// repository_user = "OpenInnovationNetwork"
15+
// repository_name = "Projects"
1416
repository_list = [
1517
["OpenInnovationNetwork", "Projects"],
1618
["StandardLaw", "Projects"],
@@ -23,21 +25,21 @@ $(function(){
2325
repository_user = repository_list[i][0];
2426
repository_name = repository_list[i][1];
2527

26-
2728
// FIND ALL THE FILES INSIDE THE FOLDER
2829
$.ajax({
2930
url: "https://api.github.com/repos/"+repository_user+"/"+repository_name+"/contents/"+path,
3031
method: "get"
3132
})
3233
.success(function(allFiles){
34+
3335
$.each(allFiles, function (index, value) {
3436
// GET CONTENT OF EACH JSON FILE
3537
if ((value.type == "file") && (value.name.split('.').pop() == "json")) {
3638

3739
projects_count++;
3840

3941
$.ajax({
40-
url: "https://api.github.com/repos/"+repository_user+"/"+repository_name+"/contents/"+value.path,
42+
url: value.url,
4143
method: "get"
4244
})
4345
.success(function( fileResponse ) {
@@ -54,6 +56,10 @@ $(function(){
5456
} catch (e) {
5557
// invalid json
5658
}
59+
})
60+
.fail(function($xhr) {
61+
var data = $xhr.responseJSON;
62+
console.log(data);
5763
});
5864
}
5965
});
@@ -69,18 +75,13 @@ $(function(){
6975

7076
// SHOW CONTENT AS CARDS
7177
$.each(projects_content, function (index, json_content) {
72-
7378
template = new Array();
7479
if (index % 3 == 0) {
7580
$('#projects-list').append('<div class="row">');
7681
}
7782

78-
project_team_name = project_people = project_thumbnail = project_url = project_demo_url = "";
83+
project_people = project_thumbnail = project_url = project_demo_url = "";
7984

80-
if ((json_content.project_team_name != undefined) && (json_content.project_team_name != "")) {
81-
project_team_name = '<br /><p><strong>Team:</strong> '+json_content.project_team_name+'</p>';
82-
}
83-
8485
if ((json_content.project_people != undefined) && (json_content.project_people != "")) {
8586
project_people = '<br /><p><strong>People:</strong> '+json_content.project_people+'</p>';
8687
}
@@ -105,7 +106,6 @@ $(function(){
105106
'<h4>'+json_content.project_name+'</h4> '+
106107
'<p>'+json_content.project_blurb+'</p>'+
107108
'<br /><div class="left-align">' +
108-
project_team_name +
109109
project_people +
110110
project_url +
111111
project_demo_url +
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Open Innovation Network Project Sources
2+
3+
Paths to the repositories that will be displayed in this project gallery.
4+
5+
All repositories listed must contain a folder named *projects*, containing JSON files with project content.
6+
7+
>
8+
> Example:
9+
>
10+
> URL: github.com/OpenInnovationNetwork/Projects/
11+
>
12+
> * Repository user: "OpenInnovationNetwork"
13+
> * Repository name: "Projects"
14+
>
15+
16+
| Repository user | Repository name |
17+
| ------ | ----------- |
18+
| OpenInnovationNetwork | Projects |
19+
| gscardine | Projects |
20+
| StandardLaw | Projects |

0 commit comments

Comments
 (0)