Add Post to Set

Summary:
* adds controller and route

* adds anchor href

* adds template and sass file

* adds header mixin

* registers new pagination partial

* adds disable/enable save button
    * this does not work fully, I left the code in to get feedback. There are several ways to accomplish this, but I am trying `ng-show` based off a `.hasClass` boolean.

Test Plan:
* load add
* click "set" in post actions dropdown button
* select and deselect Sets

Reviewers: rjmackay, shadowhand

Reviewed By: shadowhand

Subscribers: sebm90, digitalafrican, eyedol, lkamau, srutto, dkobia

Differential Revision: https://phabricator.ushahidi.com/D309
Move remaining templates from app to server/www

Summary:
- Fix pagination partial
- Move add-to-set template to server/www
- Fix pagination ref in sets/add-to-set.html

Test Plan:
- Load UI
- Check pagination appears
- Check add to set loads

Reviewers: seth, shadowhand

Reviewed By: shadowhand

Differential Revision: https://phabricator.ushahidi.com/D333
Posts: add preview ngDirective and dummy data

Summary:
* Add a ng directive for single post item preview in the list view
* add dummy json post data in posts controller
* change routes correspondingly ('/' -> posts, '/posts' -> posts)
* change require style in app.js

Test Plan: Just checkout the /posts url

Reviewers: seth, shadowhand, rjmackay

Reviewed By: rjmackay

Subscribers: rjmackay

Differential Revision: https://phabricator.ushahidi.com/D321
Workspace Menu

Summary:
* adds workspace partial

* wires up accordion

Test Plan:
* load app
* test workspace menu
* test accordion

Reviewers: shadowhand, rjmackay

Reviewed By: rjmackay

Subscribers: sebm90, digitalafrican, eyedol, lkamau, srutto, dkobia

Differential Revision: https://phabricator.ushahidi.com/D320
Changes Spaces to Tabs

Summary: * Tabs = length 4

Test Plan: * double check all spaces have been converted to tabs with length of 4

Reviewers: rjmackay

Reviewed By: rjmackay

Subscribers: shadowhand

Differential Revision: https://phabricator.ushahidi.com/D344
Changing Tabs back to Spaces

Summary: * converting tabs back to spaces via .editorconfig file

Test Plan: * double check that each appropriate file is showing tabs as 4 spaces

Reviewers: shadowhand

Reviewed By: shadowhand

Subscribers: rjmackay

Differential Revision: https://phabricator.ushahidi.com/D346
Refills Search Field

Summary:
* adds refills search field markup
* adds search-bar-wrapper

Test Plan: * refills search field should load on home page search bar and users filter tabs

Reviewers: shadowhand

Reviewed By: shadowhand

Subscribers: rjmackay

Differential Revision: https://phabricator.ushahidi.com/D350
Refactors Header Title

Summary:
* changes tabs to spaces

* removes `.header` class
* changes it to `.title` class
* changes markup

Test Plan:
* confirm tab to spaces
* confirm header/list-view styles are in tact

Reviewers: shadowhand

Reviewed By: shadowhand

Subscribers: rjmackay

Differential Revision: https://phabricator.ushahidi.com/D349
First version of OAuth2 signin/signout feature

Summary:
* add simple sign in form and use OAuth2
  * used OAuth2 flow: Resource Owner Credentials
  * use a http interecptor for catching unauthorized http responses
  * add a ng service for the authentication process
* signin/signout button (as a ng directive)
* as a proof of concept: add Posts resource as a 'protected' backend resource
  * add data service for posts
    * uses angular-resource
    * replaces the dummy post data
* introduce BACKEND_URL and API_URL constants
* add protractor for e2e (integration) specs
* add e2e specs for signin/signout

Test Plan:
* run the specs: 'protractor test/protractor-conf.js' (or 'npm run protractor')
* try to open /posts without beeing signed in
* then sign in and try again

Reviewers: seth, spaudanjo, shadowhand

Reviewed By: shadowhand

Subscribers: rjmackay

Differential Revision: https://phabricator.ushahidi.com/D319
Manage Users

Summary:
* adds Tools/Manage Users in workspace menu
    * adds route
    * adds html accordion-group

* adds manage user
    * template
    * sass
    * user.js
    * user filter.js

* adds reusable list filter--alt

* adds reusable filter

### Sass Refactor/Restyle

* refactors header and header title
    * adds mixin
    * changes html, sass & js

* refactors list-view
* refactors search-bar

* Global Sass changes
    * forms
    * dropdown-button
    * `opacity` mixin
    * `%striped` @extend

Test Plan:
* click workspace/tools/manage users
* confirm page loads and "All" tab is active
* click UI elements for functionality
    * dropdown button
    * list filter
    * user filter
* adjust browser window for responsive views

Reviewers: rjmackay, shadowhand

Reviewed By: shadowhand

Subscribers: brandonrosage, sebm90, digitalafrican, eyedol, lkamau, srutto, dkobia

Differential Revision: https://phabricator.ushahidi.com/D343
SignIn Form

Summary:
* cleans up signin form

* double spaces between classes for easy viewing/scanning
  * this is a standard I have adopted and helps with large html files

* adds signin specific styles and markup

Test Plan:
* load signin view
* confirm form is wrapped with white background and centered
* test responsive views

Reviewers: rjmackay, shadowhand

Reviewed By: shadowhand

Subscribers: sebm90, digitalafrican, eyedol, lkamau, srutto, dkobia

Differential Revision: https://phabricator.ushahidi.com/D374
Add mocked backend

Summary:
* create a gulp task 'mock-backend' for running a simple node connect server
  * delivers all json files within ./mocked_backend folder to localhost:8081/
    * the json extension will be truncated
      * so 'mocked_backend/test.json' maps to 'localhost:8081/test'
  * cors enabled
* add a posts.json files with some dummy posts
* add command line flag '--mock-backend'
  * via gulp-util's env hash
  * when the flag is used when calling the default gulp task on the command line ('gulp --mock-backend')
    * the mock-backend task will be started (as a dependent task)
* set the backendUrl config variable in app.js (previously hard coded) via envify
  * currently to 'http://ushahidi-backend' or 'http://localhost:8081'
    * based on the state of the mock-backend flag
    * more advanced enviornment configuration scenarios are in general possible
* refactor gulpfile a bit
  * e.g. introduce a few helpers

Test Plan:
* run 'npm install'
  * run 'gulp mock-backend' for running the mocked backend explicitly
    * open 'http://localhost:8081/posts'
  * run 'gulp --mock-backend' for running the default task, with the mock-backend enabled
    * open the app, check that the data delivered by the mocked backend is used now instead of the 'real' backend

Reviewers: shadowhand, rjmackay

Reviewed By: rjmackay

Subscribers: seth, rjmackay

Maniphest Tasks: T824

Differential Revision: https://phabricator.ushahidi.com/D375
Add --docker-server cli option and standardize options

Summary:
- Add --docker-server option and update docs
- Add gulp-options file to allow overriding `options` in gulpfile.js

Test Plan:
Run `gulp --docker-server`
Run `gulp --node-server`

Reviewers: shadowhand, spaudanjo

Reviewed By: shadowhand, spaudanjo

Differential Revision: https://phabricator.ushahidi.com/D388
Move node-server and mock-backend into seperate js files

Summary: Move gulp server tasks to their own JS files.

Test Plan:
Run `gulp node-server`
Run `gulp mock-backend`

Reviewers: spaudanjo

Reviewed By: spaudanjo

Subscribers: shadowhand, spaudanjo

Differential Revision: https://phabricator.ushahidi.com/D389
init Pattern Library

Signed-off-by: Brandon Rosage <brandon.rosage@gmail.com>
Merge branch 'master' of https://github.com/ushahidi/platform-client
init custom UI for basic form elements

Signed-off-by: Brandon Rosage <brandon.rosage@gmail.com>
misc custom form CSS

Signed-off-by: Brandon Rosage <brandon.rosage@gmail.com>
Pattern Library: init Fragments

Signed-off-by: Brandon Rosage <brandon.rosage@gmail.com>
Get scopes for full API, not just posts

Test Plan: Use with D391.

Reviewers: spaudanjo, rjmackay

Reviewed By: rjmackay

Subscribers: seth

Differential Revision: https://phabricator.ushahidi.com/D394