Skip to content

Commit

Permalink
Basic navigation (#50)
Browse files Browse the repository at this point in the history
basic layout learn and contribute pages
  • Loading branch information
LindaAlblas authored Mar 13, 2017
1 parent e8624d6 commit d5e95d3
Show file tree
Hide file tree
Showing 15 changed files with 411 additions and 6 deletions.
18 changes: 18 additions & 0 deletions client/app/about/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<div class="inner">
<section class="section section--asided">
<header class="section__header">
<div class="inner">
<h1 class="section__title">
About
</h1>
</div>
</header>
<div class="section-container">
<div class="section__body">
<div class="inner">
TODO
</div>
</div>
</div>
</section>
</div>
2 changes: 1 addition & 1 deletion client/app/admin/edit-project/edit-project.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h1 class="section__title">
</h1>
</div>
</header>
<div class="edit-project-container">
<div class="section-container">
<div class="section__body">
<div class="inner">
<aside class="section__aside-content">
Expand Down
79 changes: 79 additions & 0 deletions client/app/contribute/contribute.controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
(function () {

'use strict';

/**
* Contribute controller which manages contributing to a project
*/
angular
.module('taskingManager')
.controller('contributeController', ['mapService', contributeController]);

function contributeController(mapService) {
var vm = this;
// Mock up the results. This could change but it is a start!
vm.results = [
{
id: 1,
name: 'Cyclone Enawo: Anjanazan, Madagascar 1',
organisation: 'IFRC',
description: 'Ipsum lorem',
level: 'beginner',
priority: 'urgent'
},
{
id: 2,
name: 'Missing Maps: Zambia Malaria Elimination 46',
organisation: 'Multiple',
description: 'Ipsum lorem ipsum lorem ipsum lorem',
level: 'beginner',
priority: 'high'
},
{
id: 3,
name: 'Missing Maps - Goma, RDC - Water and Sanitation',
organisation: 'Multiple',
description: 'Ipsum lorem ipsum lorem ipsum lorem',
level: 'beginner',
priority: 'high'
},
{
id: 4,
name: 'Osun State Road Network Mapping for Vaccine Delivery Routing, Nigeria',
organisation: 'MSF',
description: 'Ipsum lorem ipsum lorem ipsum lorem',
level: 'beginner',
priority: 'medium'
},
{
id: 5,
name: 'Missing Maps - Malawi - Thyolo - Blantyre (roads)',
organisation: 'MSF',
description: 'Ipsum lorem ipsum lorem ipsum lorem',
level: 'beginner',
priority: 'low'
},
{
id: 6,
name: 'Tanzania Development Trust: Maswa district mapping project part 2',
organisation: 'MSF',
description: 'Ipsum lorem ipsum lorem ipsum lorem',
level: 'beginner',
priority: 'low'
}
];

// Paging results
vm.itemsPerPage = 4;
vm.currentPage = 1;

// Default to grid view
vm.resultsView = 'grid';

activate();

function activate() {
mapService.createOSMMap('map');
}
}
})();
126 changes: 126 additions & 0 deletions client/app/contribute/contribute.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<div class="inner">
<section class="section section--asided">
<header class="section__header">
<div class="inner">
<h1 class="section__title">
Contribute
</h1>
</div>
</header>
<div class="section-container">
<div class="section__body">
<div class="inner">
<div class="contribute-container">
<div class="search">
<h2>Search projects</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam feugiat consequat
lectus. Donec ex orci, euismod auctor purus sit amet, lacinia faucibus elit. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam consequat
quam in orci interdum suscipit. Nulla congue ligula eget augue ultricies, in varius elit
dignissim.
</p>
<form class="form">
<fieldset class="form__fieldset">
<div class="form__group">
<label class="form__label">Organisation</label>
<select class="form__control">
<option value="all">All</option>
<option value="hot">HOT</option>
<option value="msf">MSF</option>
<option value="...">...</option>
</select>
</div>
<div class="form__group">
<label class="form__label">Mapping difficulty</label>
<div class="button-group button-group--horizontal" role="group"
aria-label="choose mapping difficulty">
<button class="button button--achromic button--active" type="button">
Beginner
</button>
<button class="button button--achromic" type="button">Intermediate</button>
<button class="button button--achromic" type="button">Advanced</button>
</div>
</div>
<div class="form__group">
<label class="form__label">Tags</label>
<input type="text" class="form__control" placeholder="e.g. earthquake, Ebola"/>
</div>
<div>
<button class="button button--primary pull-right">Search</button>
</div>
</fieldset>
</form>
</div>
<div class="search-results">
<div>
<a href="" ng-click="contributeCtrl.resultsView = 'grid'">
Grid view
</a>
<a href="" ng-click="contributeCtrl.resultsView = 'list'">
List view
</a>
</div>
<div ng-show="contributeCtrl.resultsView === 'grid'">
<div class="search-results-container">
<div class="project-result__cards">
<div class="project-result__card"
ng-repeat="project in contributeCtrl.results.slice(((contributeCtrl.currentPage-1)*contributeCtrl.itemsPerPage), ((contributeCtrl.currentPage)*contributeCtrl.itemsPerPage)) track by project.id">
<section class="panel project-result__content">
<h4>{{ project.name }}</h4>
<p>{{ project.description }}</p>
<ul>
<li>Organisation: {{ project.organisation }}</li>
<li>Priority: {{ project.priority }}</li>
<li>Level: {{ project.level }}</li>
</ul>
<a href="/project?project={{ project.id }}"
class="button button--primary">Contribute</a>
</section>
</div>
</div>
<ul uib-pagination items-per-page="contributeCtrl.itemsPerPage"
total-items="contributeCtrl.results.length"
ng-model="contributeCtrl.currentPage"></ul>
</div>
</div>
<div ng-show="contributeCtrl.resultsView === 'list'">
<table class="table">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Organisation</th>
<th>Level</th>
<th><a class="table__sort table__sort--none"
title="Sort column"><span>Priority</span></a></th>
<th>Contribute</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="project in contributeCtrl.results track by project.id">
<td>{{ project.id }}</td>
<td>{{ project.name }}</td>
<td>{{ project.organisation }}</td>
<td>{{ project.level }}</td>
<td>{{ project.priority }}</td>
<td><a href="/project?project={{ project.id }}" class="button button--primary">Contribute</a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="section-container">
<div class="section__body">
<div class="inner">
<div>
<div id="map" class="map-container"></div>
</div>
</div>
</div>
</div>
</section>
</div>
58 changes: 58 additions & 0 deletions client/app/learn/learn.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<div class="inner">
<section class="section section--asided">
<header class="section__header">
<div class="inner">
<h1 class="section__title">
Learn
</h1>
</div>
</header>
<div class="section-container">
<div class="section__body">
<div class="inner">
<div class="learn-container">
<div class="information">
<h2>Mapping</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam feugiat consequat
lectus. Donec ex orci, euismod auctor purus sit amet, lacinia faucibus elit. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam consequat
quam in orci interdum suscipit. Nulla congue ligula eget augue ultricies, in varius elit
dignissim. Sed mollis eu purus ut pretium. Suspendisse posuere enim sed est scelerisque,
feugiat commodo massa luctus. Aliquam consequat ipsum augue, eu commodo ex cursus sit
amet. Ut tempus at nulla eu feugiat. Donec accumsan justo eget enim pellentesque
efficitur.</p>
<a href="/contribute" class="button button--primary pull-right">Contribute</a>
</div>
<div class="video">
<iframe width="400" height="300"
src="https://www.youtube.com/embed/DcKewl94jR4">
</iframe>
</div>
</div>
</div>
</div>
</div>
<div class="section-container">
<div class="section__body">
<div class="inner">
<div class="learn-container">
<div class="information">
<h2>Validating</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam feugiat consequat
lectus. Donec ex orci, euismod auctor purus sit amet, lacinia faucibus elit. Cum sociis
natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam consequat
quam in orci interdum suscipit. Nulla congue ligula eget augue ultricies, in varius elit
dignissim.</p>
<a href="/contribute" class="button button--primary pull-right">Contribute</a>
</div>
<div class="video pull-right">
<iframe width="400" height="300"
src="https://www.youtube.com/embed/2h12CKnvK38">
</iframe>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
16 changes: 15 additions & 1 deletion client/app/taskingmanager.app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

(function () {

angular.module('taskingManager', ['ngRoute', 'ngFileUpload', 'ng-showdown', 'taskingmanager.config'])
angular.module('taskingManager', ['ngRoute', 'ngFileUpload', 'ng-showdown','ui.bootstrap', 'taskingmanager.config'])

/**
* Factory that returns the configuration settings for the current environment
Expand Down Expand Up @@ -32,6 +32,20 @@
controllerAs: 'editProjectCtrl'
})

.when('/about', {
templateUrl: 'app/about/about.html'
})

.when('/learn', {
templateUrl: 'app/learn/learn.html'
})

.when('/contribute', {
templateUrl: 'app/contribute/contribute.html',
controller: 'contributeController',
controllerAs: 'contributeCtrl'
})

.when('/project', {
templateUrl: 'app/project/project.html',
controller: 'projectController',
Expand Down
4 changes: 0 additions & 4 deletions client/assets/styles/sass/_admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,4 @@
&--active {
background: rgba($base-color, 0.08);
}
}

.edit-project-container {
padding-top: 3rem;
}
Loading

0 comments on commit d5e95d3

Please sign in to comment.