Skip to content

Commit

Permalink
Merge branch 'roryaronson-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
simonv3 committed Feb 26, 2015
2 parents 8805de0 + 200cd77 commit 19fbe34
Show file tree
Hide file tree
Showing 16 changed files with 255 additions and 94 deletions.
2 changes: 2 additions & 0 deletions .hound.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ java_script:
ruby:
enabled: true
config_file: config/.rubocup.yml
scss:
config_file: config/.scss-style.yml
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Contributing

First off, before contributing anything, sign our [Contributor License Agreement](https://www.clahub.com/agreements/openfarmcc/OpenFarm).
By no means does contributing to OpenFarm imply contributing in a programmer capacity. We love talking to farmers, user experience designers, community organizers, graphic designers, content writers, everyone! Send Rory an e-mail at [[email protected]](mailto:[email protected]).

If you're keen on contributing code, sign our [Contributor License Agreement](https://www.clahub.com/agreements/openfarmcc/OpenFarm).

## Then!

Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
.edit-guide-app {
margin: 2rem 0 4rem;

small.error{
small.error {
margin-bottom: 0;
}

h1{
h1 {
cursor: pointer;
}

h1.has-tip, h1.has-tip:hover{
h1.has-tip, h1.has-tip:hover {
border-bottom: none;
color: inherit;
}

.crop-image{
.crop-image {
cursor: pointer;
color: $secondary-color;

&.ng-invalid-uploading{
&.ng-invalid-uploading {
p.loading{
display: block;
}
p.to-upload{
p.to-upload {
display: none;
}
}

.wrapper{
.wrapper {
height: 100%;
position: relative;
overflow: hidden;
Expand All @@ -47,7 +47,7 @@
text-align: center;
width: 100%;
}
.loading{
.loading {
display: none;
}
a{
Expand All @@ -60,34 +60,34 @@



input[type=text].hidden-edit-field{
input[type=text].hidden-edit-field {
font-size: 2rem;
height: 3.5rem;
}

p.section-text{
p.section-text {
margin-top: 1rem;
}


.edit-guide-app .box, .show-guide-app .box{
.edit-guide-app .box, .show-guide-app .box {
padding: 1.5rem 0;
margin-top: 0;
}

/****
*
* $REQUIREMENTS
* $BASIC NEEDS
*
****/

.requirements{
.actual-requirements{
.basic-needs {
.actual-basic-needs {
@include columns(2);
}
}

.requirement{
.basic-need {
border-radius: 3px;
background: #EFF1F4;
border: 1px solid #E7E8EB;
Expand All @@ -98,7 +98,7 @@
opacity: .5;
/*transition: .2s;*/

&.active{
&.active {
background-color: scale-color($of-green, $lightness: 35%);
/*background-color: $of-green;*/
opacity: 1;
Expand All @@ -108,30 +108,30 @@
}
}

.title{
.title {
margin: 0;
font-size: .9rem;
margin-top: .5rem;
}

&:hover{
&:hover {
opacity: .7;
}

input[type=range]{
input[type=range] {
width: 66%;
margin: .7rem 1rem 0 0;
}

input[type=checkbox]{
input[type=checkbox] {
margin: 0 .2rem .8rem -.5rem
}

.columns{
.columns {
/*padding: .5rem inherit;*/
}

.choices select{
.choices select {
display: inline-block;
/*width: 35%;*/
background-color: inherit;
Expand All @@ -141,7 +141,7 @@
}
}

.row.requirements-results{
.row.basic-needs-results {
text-align: center;
margin-top: 1rem;
}
Expand All @@ -153,16 +153,16 @@
****/


.tabs{
dd a{
.tabs {
dd a {
/*padding: .5rem 1rem;*/
}
h3{
h3 {
font-size: .8rem;
}
}

.stage-description{
.stage-description {
padding: 0 2rem;
}

Expand All @@ -172,8 +172,8 @@
$SIZES
*/
@media only screen and (max-width: 40.063em){
.requirements .actual-requirements{
@media only screen and (max-width: 40.063em) {
.basic-needs .actual-basic-needs {
@include columns(1);
}
}
Expand Down
16 changes: 8 additions & 8 deletions app/assets/stylesheets/styles/components/guides/_guides.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
}

.new-guide-button{
.new-guide-button {
@include add-new-button();
@include box-shadow(none);
width: 100%;
Expand Down Expand Up @@ -42,11 +42,11 @@
.large-guide {
padding-top: 20px;

.canopy{
.canopy {
margin-top: 20px;
}

.guide-controls{
.guide-controls {
margin-right: 0px;
}

Expand Down Expand Up @@ -131,7 +131,7 @@
}
}

.actual-requirements {
.actual-basic-needs {
table {
border-collapse: collapse;
border-spacing: 0;
Expand Down Expand Up @@ -161,20 +161,20 @@
}
}

.edit-link{
.edit-link {
float: right;
margin-top: .9rem;
margin-left: .9rem;
}

.overview{
.overview {
margin: 1rem auto;
}
.content {
padding-bottom: 8rem;
}

dd.accordion-navigation > a{
dd.accordion-navigation > a {
background-color: transparent;
border-bottom: rgb(148, 148, 148) 3px solid;
transition: 0.2s background-color;
Expand Down Expand Up @@ -381,7 +381,7 @@
width: 50px;
}

.requirements {
.basic-needs {
padding: 0;

table {
Expand Down
4 changes: 2 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ class User

field :agree, type: Boolean
validates :agree, acceptance: { accept: true,
message: 'Please accept the terms and ' +
'conditions' },
message: 'to the Terms of Service and ' +
'Privacy Policy' },
on: :create

field :location, type: String
Expand Down
16 changes: 11 additions & 5 deletions app/views/devise/registrations/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
<div class="bar-header">
<h1 class="title">
<%= t('application.user_settings') %>
</h1>
</div>
<div class="row">
<div class="small-12 columns">
<div class="row">
<div class="large-8 medium-10 small-12 small-centered columns">
<h1>Need to make some changes?</h1>
<h3><%= t('users.account_information') %></h3>
<%= render 'devise/shared/user_form' %>
<h3>Cancel my account</h3>
<p>Unhappy?
<br/>
<br/>
<h3><%= t('users.delete_account') %></h3>
<p><%= t('users.delete_account_message') %>
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), method: :delete) do |f| %>
<%= f.label :password_confirmation, I18n.t('users.current_password') %>

<%= f.password_field :password_confirmation, autocomplete: "off" %>
<%= f.submit I18n.t('users.delete'), class: 'button submit', :data => { confirm: "Are you sure?" } %>
<%= f.submit I18n.t('users.delete'), class: 'button alert submit', :data => { confirm: "Are you sure?" } %>
<% end %>
<%# <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete, class: 'button submit' %></p>
<%= link_to "Back", :back %>
</div>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion app/views/devise/shared/_user_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,9 @@
<br/>
<% end %>

<%= f.submit class: 'button submit' %>
<% if @user.new_record? %>
<%= f.submit I18n.t('users.create_account'), class: 'button submit' %>
<% else %>
<%= f.submit I18n.t('users.update_account'), class: 'button submit' %>
<% end %>
<% end %>
6 changes: 5 additions & 1 deletion app/views/guides/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<div class="bar-header">
<h1 class="title">
<%= t('.my_guides') %>
</h1>
</div>
<div class="guides row guides-list">
<div class="small-12 columns">
<h2><%= t('.my_guides') %></h2>
<table>
<% @guides.each do |guide| %>
<tr>
Expand Down
2 changes: 1 addition & 1 deletion app/views/guides/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
<div class="small-12 columns">
<accordion close-others="false">

<%= render 'guides/show/show_guide_requirements' %>
<%= render 'guides/show/show_guide_basic_needs' %>

<%= render 'guides/show/show_guide_timeline' %>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<accordion-group
ng-init="r.isopen = true"
is-open="r.isopen"
class="accordion-navigation requirements">
class="accordion-navigation basic-needs">
<accordion-heading class="title-wrapper">
<h2 class="title" id="basic-needs">
<%= t('.title') %>
Expand All @@ -10,10 +10,10 @@
</accordion-heading>
<div class="row">
<div ng-if="guide.basic_needs.length"
class="columns small-12 actual-requirements">
class="columns small-12 actual-basic-needs">
<table>
<tbody>
<tr ng-repeat="basicNeed in guide.basic_needs" class="requirement"
<tr ng-repeat="basicNeed in guide.basic_needs" class="basic-need"
ng-class="{ 'medium' : basicNeed.percent >= .5 && basicNeed.percent < .75, 'high': basicNeed.percent >= .75, 'low' : basicNeed.percent < .5 }"
ng-if="basicNeed.total && basicNeed.overlap"
tooltip="{{ basicNeed.tooltip }}"
Expand All @@ -35,7 +35,7 @@
ng-if="guide.basic_needs.length === 0">
<i class="fa fa-thumbs-down"></i>
<br/>
<%= t('.no_requirements_yet') %>
<%= t('.no_basic_needs_yet') %>
</div>
</div>

Expand Down
8 changes: 4 additions & 4 deletions app/views/users/gardens.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,12 @@
<hr/>
<div class="columns small-6"
ng-class="{ 'small-centered' : currentUser.gardens.length === 0 }">
<p ng-if="currentUser.gardens.length === 0">
<h4 ng-if="currentUser.gardens.length === 0">
<%= t('.create_your_first_garden') %>
</p>
<p ng-if="currentUser.gardens.length > 0">
</h4>
<h4 ng-if="currentUser.gardens.length > 0">
<%= t('.create_a_new_garden') %>
</p>
</h4>
<label><%= t('.call_your_garden') %></label>
<input type="text" ng-model="newGarden.name"/>
<input type="button"
Expand Down
Loading

0 comments on commit 19fbe34

Please sign in to comment.