Skip to content

Commit

Permalink
Merge pull request #1745 from hotosm/develop
Browse files Browse the repository at this point in the history
Release candidate version 3.4.0
  • Loading branch information
pantierra authored Jul 15, 2019
2 parents 0143626 + cbecf94 commit 9afc27f
Show file tree
Hide file tree
Showing 126 changed files with 4,286 additions and 853 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ workflows:
- deployment/hot-tasking-manager
requires:
- build
stack_name: "production"
stack_name: "prod-restored"
environment_name: "production"
postgres_db: POSTGRES_DB_PRODUCTION
postgres_password: POSTGRES_PASSWORD_PRODUCTION
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ server/web/static/dist/
logs/
*.log

# Ignore some translation stuff
.tx/tasking-manager.master/

#python
venv/
*pyc
Expand Down
7 changes: 4 additions & 3 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com

[tasking-manager-3.master]
[tasking-manager.master]
source_file = client/locale/en.json
source_lang = en
trans.ar = client/locale/ar.json
Expand All @@ -10,11 +10,11 @@ trans.cs = client/locale/cs.json
trans.da = client/locale/da.json
trans.de = client/locale/de.json
trans.es = client/locale/es.json
trans.fi = client/locale/fi.json
trans.fa_IR = client/locale/fa_IR.json
trans.fi = client/locale/fi.json
trans.fr = client/locale/fr.json
trans.hu = client/locale/hu.json
trans.gl = client/locale/gl.json
trans.hu = client/locale/hu.json
trans.id = client/locale/id.json
trans.it = client/locale/it.json
trans.ja = client/locale/ja.json
Expand All @@ -34,3 +34,4 @@ trans.uk = client/locale/uk.json
trans.vi = client/locale/vi.json
trans.zh_TW = client/locale/zh_TW.json
type = KEYVALUEJSON

8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ifndef DOCKER_COMPOSE_VERSION
endif

build:
docker-compose build app
docker-compose build --no-cache app

up:
docker-compose up -d
Expand All @@ -21,6 +21,12 @@ down:
list:
docker-compose ps

refresh-translatables:
docker-compose exec app sh -c "python manage.py refresh_translatables"

refresh-translations:
docker-compose exec app sh -c "tx pull -af"

tests:test-client test-server

test-client:
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The Tasking Manager is the tool for any organised OpenStreetMap editing and coordination.

The Tasking Manager is Free and Open Source Software, feel free to use the code and set up your own instance. It has been initially designed and built by and for the [Humanitarian OpenStreetMap Team](https://www.hotosm.org/), and is nowadays used by many other communities and organizations. The purpose of the tool is to divide up a mapping job into smaller tasks that can be completed rapidly. It shows which areas need to be mapped and which areas need the mapping validated. You can see the tool in action: log into the widely used [HOT Tasking Manager](https://tasks.hotosm.org/) and start mapping.
The Tasking Manager is Free and Open Source Software, feel free to use the code and set up your own instance. It has been initially designed and built by and for the [Humanitarian OpenStreetMap Team](https://www.hotosm.org/), and is nowadays used by many other communities and organizations. The purpose of the tool is to divide up a mapping job into smaller tasks that can be completed rapidly. It shows which areas need to be mapped and which areas need the mapping validated. You can see the tool in action: log into the widely used [HOT Tasking Manager](https://tasks.hotosm.org/) and start mapping. For information on how to use the Tasking Manager please have a look on the Tasking Manager [user manuals on LearnOSM](https://learnosm.org/en/coordination/tasking-manager3/).

[<img src="screenshot.jpg" />](./docs/files/screenshot.jpg)

Expand All @@ -23,7 +23,7 @@ The Tasking Manager uses OpenStreetMap accounts for users to login.

In order to configure this connection you have to go to `https://www.openstreetmap.org/user/<Your_OSM_UserName>/oauth_clients/new` and fill in the form:

<img width="300" alt="screen shot 2019-01-08 at 10 58 26 pm" src="https://user-images.githubusercontent.com/3166852/50847977-f81b3480-1398-11e9-9cfd-771f58efefb0.png">
<img width="300" alt="Required OSM OAuth settings" src="docs/assets/osm-oauth-settings.jpg">

Afterwards copy the consumer key and secret from OpenStreetMap into your configuration file `tasking-manager.env`, and set the two variables: `TM_CONSUMER_KEY` and `TM_CONSUMER_SECRET`.

Expand All @@ -46,9 +46,10 @@ And you can check the logs with `docker-compose logs -f`
* Come, attend the [working group meetings](./docs/working-group.md)
* Make sure you are aware of our [Code of Conduct](./docs/code_of_conduct.md)

## Developers, developers, developers
## Developers

* See how you can [customize your instance of the TM](./docs/customize.md)
* Learn how to [setup the TM for development](./docs/setup-development.md)
* Setup a [live TM](./docs/setup-live.md)
* Feel free to submit [pull requests](https://github.com/hotosm/tasking-manager/pulls)!
* Need an upgrade? Check out the [Migration from TM2 to TM3](./docs/migration-tm2-to-tm3.md)
* Need an upgrade? Check out the [Migration coming from TM2](./docs/migration-from-tm2.md)
59 changes: 0 additions & 59 deletions client/app/about/what-is-new.html

This file was deleted.

12 changes: 6 additions & 6 deletions client/app/admin/dashboard/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ <h3 class="pointer" ng-click="dashboardCtrl.toggleActive()">
<td>{{ project.percentMapped }}</td>
<td>{{ project.percentValidated }}</td>
<td>
<span am-time-ago="project.created | amUtc | amLocal"></span>
<span tm-timestamp="project.created"></span>
</td>
<td>
<span am-time-ago="project.lastUpdated | amUtc | amLocal"></span>
<span tm-timestamp="project.lastUpdated"></span>
</td>
<td>
<a class="button button--small"
Expand Down Expand Up @@ -143,10 +143,10 @@ <h3 class="pointer" ng-click="dashboardCtrl.toggleDraft()">
<td>{{ project.percentMapped }}</td>
<td>{{ project.percentValidated }}</td>
<td>
<span am-time-ago="project.created | amUtc | amLocal"></span>
<span tm-timestamp="project.created"></span>
</td>
<td>
<span am-time-ago="project.lastUpdated | amUtc | amLocal"></span>
<span tm-timestamp="project.lastUpdated"></span>
</td>
<td>
<a class="button button--primary button--small"
Expand Down Expand Up @@ -209,10 +209,10 @@ <h3 class="pointer" ng-click="dashboardCtrl.toggleArchived()">
<td>{{ project.percentMapped }}</td>
<td>{{ project.percentValidated }}</td>
<td>
<span am-time-ago="project.created | amUtc | amLocal"></span>
<span tm-timestamp="project.created"></span>
</td>
<td>
<span am-time-ago="project.lastUpdated | amUtc | amLocal"></span>
<span tm-timestamp="project.lastUpdated"></span>
</td>
<td>
<a class="button button--primary button--small"
Expand Down
57 changes: 55 additions & 2 deletions client/app/admin/edit-project/edit-project.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@
// Delete
vm.showDeleteConfirmationModal = false;

// Transfer
vm.showTransferConfirmationModal = false;
vm.transferProjectTo= []; //it's a list because it uses the tag input

// Reset
vm.showResetConfirmationModal = false;

Expand All @@ -84,6 +88,9 @@
// Error messages
vm.deleteProjectFail = false;
vm.deleteProjectSuccess = false;
vm.transferProjectFail = false;
vm.transferProjectSuccess = false;
vm.showTransferEmptyUserError = false;
vm.resetProjectFail = false;
vm.resetProjectSuccess = false;
vm.invalidateTasksFail = false;
Expand Down Expand Up @@ -336,6 +343,13 @@
$location.path('/');
};

/**
* Navigate to the project detail
*/
vm.goToProjectDetail = function(){
$location.path('/project/' + vm.project.projectId);
};

/**
* Set the delete confirmation modal to visible/invisible
* @param showModal
Expand Down Expand Up @@ -367,6 +381,42 @@
});
};

/**
* Set the transfer confirmation modal to visible/invisible
* @param showModal
*/
vm.showTransferConfirmation = function(showModal){
if (vm.transferProjectTo.length && vm.editForm.$valid){
vm.showTransferConfirmationModal = showModal;
vm.showTransferEmptyUserError = false;
if (!showModal && vm.transferProjectSuccess){
$location.path('/project/' + vm.project.projectId);
}
} else {
vm.showTransferEmptyUserError = true;
}
};

/**
* Transfer a project
*/
vm.transferProject = function(){
vm.transferProjectFail = false;
vm.transferProjectSuccess = false;
var resultsPromise = projectService.transferProject(vm.project.projectId, vm.transferProjectTo[0].text);
resultsPromise.then(function () {
// Project deleted successfully
vm.transferProjectFail = false;
vm.transferProjectSuccess = true;
// Reset the page elements
getProjectMetadata(vm.project.projectId);
}, function(){
// Project not deleted successfully
vm.transferProjectFail = true;
vm.transferProjectSuccess = false;
});
};

/**
* Set the map confirmation modal to visible/invisible
* @param showModal
Expand Down Expand Up @@ -588,8 +638,11 @@
* Get the user for a search value
* @param searchValue
*/
vm.getUser = function(searchValue){
var resultsPromise = userService.searchUser(searchValue, vm.project.id);
vm.getUser = function(searchValue, isProjectManager){
if (typeof isProjectManager === undefined){
isProjectManager = false;
}
var resultsPromise = userService.searchUser(searchValue, vm.project.id, isProjectManager);
return resultsPromise.then(function (data) {
// On success
return data.usernames;
Expand Down
Loading

0 comments on commit 9afc27f

Please sign in to comment.