This repository has been archived by the owner on Sep 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
88 changed files
with
4,065 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 Centre for the Acceleration of Social Technology (CAST) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: bundle exec puma -C config/puma.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,60 @@ | ||
# README | ||
# Cardinal Hume Centre Referral System | ||
|
||
This README would normally document whatever steps are necessary to get the | ||
application up and running. | ||
## About | ||
|
||
Things you may want to cover: | ||
### Problem | ||
|
||
* Ruby version | ||
>How can we better show capacity to our partners and provide tools for referrals in order to ensure a diversity of clients so that we can reach the most vulnerable with our services. | ||
* System dependencies | ||
### Solution | ||
|
||
* Configuration | ||
>A referral system for charities working together providing immigration advice and legal aid in London. | ||
* Database creation | ||
The tool provides an interface for accepting and reviewing form submissions via Typeform's [Embed](https://developer.typeform.com/embed/) and [Webhooks](https://developer.typeform.com/webhooks/) API. | ||
|
||
* Database initialization | ||
## Development | ||
|
||
* How to run the test suite | ||
### Local setup | ||
|
||
* Services (job queues, cache servers, search engines, etc.) | ||
Prerequisites: [Ruby v2.5.1](https://www.ruby-lang.org), [Bundler](https://bundler.io/), [PostgreSQL](https://www.postgresql.org/), [NodeJS](https://nodejs.org/), [Yarn](https://yarnpkg.com/) | ||
|
||
* Deployment instructions | ||
1. `git clone https://github.com/TechforgoodCAST/chc-referrals.git` | ||
2. `cd chc-referrals` | ||
3. `bundle install` | ||
4. `yarn install` | ||
5. `rails db:setup` | ||
6. `rails s` to start local development server | ||
|
||
* ... | ||
### Running tests | ||
|
||
`rails test` for unit tests, and `rails test:system` for system tests. | ||
|
||
## Deployment | ||
|
||
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/TechforgoodCAST/chc-referrals) | ||
|
||
## Contributing | ||
|
||
First of all, **thank you** for your help! | ||
|
||
Be sure to check out the projects open [issues](https://github.com/suninthesky/slice-and-dice/issues) to see where help is needed. | ||
|
||
### Bugs | ||
|
||
If you've spotted a bug please file an [issue](https://github.com/suninthesky/slice-and-dice/issues). Even better, submit a [pull request](https://github.com/suninthesky/slice-and-dice/pulls) (details below) with a patch. | ||
|
||
### Features | ||
|
||
If you want a feature added, the best way to get it done is to submit a pull request that implements it... | ||
|
||
1. Fork the repo | ||
2. Create your feature branch (`git checkout -b my-new-feature`) | ||
3. Commit your changes (`git commit -am 'Add some feature'`) | ||
4. Push to the branch (`git push origin my-new-feature`) | ||
5. Create a [pull request](https://github.com/suninthesky/slice-and-dice/pulls) | ||
|
||
Alternatively you can submit an [issue](https://github.com/suninthesky/slice-and-dice/issues) describing the feature. | ||
|
||
## License | ||
|
||
This software is released under the [MIT License](https://opensource.org/licenses/MIT). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "CHC Referral System", | ||
"description": "A referral system for charities working together providing immigration advice and legal aid in London.", | ||
"repository": "https://github.com/TechforgoodCAST/chc-referrals", | ||
"keywords": ["ruby", "rails", "tech-for-good"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
ActiveAdmin.register AdminUser do | ||
permit_params :email, :password, :password_confirmation | ||
|
||
controller do | ||
def update_resource(resource, params) | ||
resource.update_without_password(params[0]) if params[0][:password].blank? | ||
super | ||
end | ||
end | ||
|
||
index do | ||
selectable_column | ||
column :email | ||
column :created_at | ||
actions | ||
end | ||
|
||
filter :email | ||
filter :created_at | ||
filter :updated_at | ||
|
||
form do |f| | ||
f.inputs do | ||
f.input :email | ||
f.input :password | ||
f.input :password_confirmation | ||
end | ||
f.actions | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
ActiveAdmin.register_page "Dashboard" do | ||
menu priority: 1, label: proc{ I18n.t('active_admin.dashboard') } | ||
|
||
content title: proc{ I18n.t('active_admin.dashboard') } do | ||
columns do | ||
column do | ||
panel 'Admin Users' do | ||
h1 AdminUser.count | ||
end | ||
end | ||
|
||
column do | ||
panel 'Users' do | ||
h1 User.count | ||
end | ||
end | ||
end | ||
|
||
columns do | ||
column do | ||
panel 'Partners' do | ||
h1 Partner.count | ||
end | ||
end | ||
|
||
column do | ||
panel 'Referrals' do | ||
h1 Referral.count | ||
end | ||
end | ||
|
||
column do | ||
panel 'Reviews' do | ||
h1 Review.count | ||
end | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.