Skip to content

Commit

Permalink
Merge pull request #517 from roryaronson/master
Browse files Browse the repository at this point in the history
Lots of little things
  • Loading branch information
simonv3 committed Mar 3, 2015
2 parents 9e3989c + 562e964 commit 7f9d2fc
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Other use cases: a mobile app for home gardeners, Google providing "One Box" ans

### Core Contributor Group

We use [Slack](https://openfarm.slack.com/) for real-time discussion and mockup sharing among the core team. We strongly recommend joining this group if you want to get involved and meet the other contributors. All you have to do is [email Rory](mailto:[email protected]) with your email address and he'll send you an invitation to join!
We use [Slack](https://openfarm.slack.com/) for real-time discussion and mockup sharing among the core team. We strongly recommend joining this group if you want to get involved and meet the other contributors. All you have to do is enter your email into [this form](http://goo.gl/forms/ZqBdmN2nu2) or [email Rory](mailto:[email protected]) with your email address and he'll send you an invitation to join!

### Community Discussion Group

Expand Down
7 changes: 4 additions & 3 deletions app/assets/javascripts/guides/new.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,10 @@ openFarmApp.controller('newGuideCtrl', ['$scope', '$http', '$filter',
.success(function(response){
var stageWhere = ['Potted', 'Outside', 'Greenhouse', 'Indoors'];
var stageLight = ['Full Sun', 'Partial Sun', 'Shaded', 'Darkness'];
var stageSoil = ['Potting', 'Loam',
'Sandy Loam', 'Clay Loam',
'Sand', 'Clay'];
var stageSoil = ['Potting', 'Loam', 'Clay', 'Clay Loam', 'Loamy Sand',
'Sandy Clay', 'Sandy Loam', 'Sandy Clay Loam',
'Sand', 'Silty Clay', 'Silty Clay Loam',
'Silt Loam', 'Silt'];
$scope.stages = response.stage_options;
$scope.stages = $filter('orderBy')($scope.stages, 'order');
// Trickery to make sure the existing stages don't get
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
.guide-creation-nav {
$guide-nav-color: #5E9546;
background: $guide-nav-color;
overflow-x: auto;
overflow-y: hidden;

// the ul containing the links
ul {
list-style: none;
margin-left: 0;
padding-top: 5px;
padding-left: 0;
padding-right: 0;
text-align: center;
list-style: none;
white-space: nowrap;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
/* Step 2 */
.life-stages {
.all-stages-wrapper {
margin-left: auto;
margin-right: auto;
@media #{$small-only} {
width: 360px;
}
@media #{$medium-only} {
width: 540px;
}
@media #{$large-only} {
width: 720px;
}
@media #{$xlarge-up} {
width: 900px;
}
}

.stage-wrapper {
display: inline-block;
overflow: hidden;
height: 142px;
height: 150px;
margin-bottom: 3%;
overflow: hidden;
width: 180px;
}

input[type="checkbox"] {
Expand All @@ -13,10 +31,10 @@

.stage-option {
display: block;
border-radius: 4px;
padding: .25rem;
box-shadow: 0px 1px 1px rgba(0, 0, 0, .2);
border: solid 1px #DFDFDF;
border-radius: 150px;
width: 100%;
height: 100%;
transition: border .2s;
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/gardens_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def create
user: current_user,
description: I18n.t('registrations.generated_this_garden'),
average_sun: 'Full Sun',
type: 'Outdoors',
type: 'Outside',
soil_type: 'Loam'
)
respond_with_mutation(:created)
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/registrations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def create
name: I18n.t('registrations.your_first_garden'),
description: I18n.t('registrations.generated_this_garden'),
average_sun: 'Full Sun',
type: 'Outdoors',
type: 'Outside',
soil_type: 'Loam'
)

Expand Down
22 changes: 12 additions & 10 deletions app/views/guides/new/_new_guide_step_2.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@
</h3>
</div>
<div class="row">
<div class="columns large-3 medium-4 small-6 stage-wrapper"
ng-repeat="stage in newGuide.stages | orderBy : 'order' "
ng-class="{end: $last}">
<input name="{{ stage.name }}"
id="{{ stage.name }}"
type="checkbox"
ng-model="stage.selected"/>
<label class="stage-option {{stage.name}}" for="{{ stage.name }}">
<p>{{ stage.name }}</p>
</label>
<div class="all-stages-wrapper">
<div class="columns large-3 medium-4 small-6 stage-wrapper"
ng-repeat="stage in newGuide.stages | orderBy : 'order' "
ng-class="{end: $last}">
<input name="{{ stage.name }}"
id="{{ stage.name }}"
type="checkbox"
ng-model="stage.selected"/>
<label class="stage-option {{stage.name}}" for="{{ stage.name }}">
<p>{{ stage.name }}</p>
</label>
</div>
</div>
</div>
<div class="button-wrapper row">
Expand Down
13 changes: 11 additions & 2 deletions app/views/users/gardens.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,19 @@
backend %>
<select ng-if="garden.editing"
ng-model="garden.soil_type">
<option value="Potting"><%= t('.potting') %></option>
<option value="Loam"><%= t('.loam') %></option>
<option value="Loamy Sand"><%= t('.loamy_sand') %></option>
<option value="Sandy Clay"><%= t('.sandy_clay') %></option>
<option value="Sandy Loam"><%= t('.sandy_loam') %></option>
<option value="Clay Loam"><%= t('.clay_loam') %></option>
<option value="Sandy Clay Loam"><%= t('.sandy_clay_loam') %></option>
<option value="Sand"><%= t('.sand') %></option>
<option value="Clay"><%= t('.clay') %></option>
<option value="Sandy"><%= t('.sandy') %></option>
<option value="Silty"><%= t('.silty') %></option>
<option value="Silty Clay"><%= t('.silty_clay') %></option>
<option value="Silty Clay Loam"><%= t('.silty_clay_loam') %></option>
<option value="Silt Loam"><%= t('.silt_loam') %></option>
<option value="Silt"><%= t('.silt') %></option>
</select>
</td>
</tr>
Expand Down
13 changes: 11 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,19 @@ en:
partial_sun: "Partial Sun"
full_shade: "Full Shade"
soil_type: "Soil Type"
potting: "Potting"
loam: "Loam"
loamy_sand: "Loamy Sand"
sandy_clay: "Sandy Clay"
sandy_loam: "Sandy Loam"
clay_loam: "Clay Loam"
sandy_clay_loam: "Sandy Clay Loam"
sand: "Sand"
clay: "Clay"
sandy: "Sandy"
silty: "Silty"
silty_clay: "Silty Clay"
silty_clay_loam: "Silty Clay Loam"
silt_loam: "Silt Loam"
silt: "Silt"
ph: "pH"
edit: "Edit"
save_changes: "Save Changes"
Expand Down

0 comments on commit 7f9d2fc

Please sign in to comment.