include crop approval status in sci and alt names

This commit is contained in:
Taylor Griffin
2015-02-27 07:39:07 +11:00
parent c76e9ccbf6
commit 3a9ec8cf6d
4 changed files with 16 additions and 11 deletions

View File

@@ -1,5 +1,7 @@
%p#notice= notice
= render :partial => 'crops/approval_status_message', :locals => { :crop => @alternate_name.crop }
%p
%b Alternate name:
= @alternate_name.name

View File

@@ -0,0 +1,11 @@
- if crop.pending?
.alert.alert-danger
%b This crop is currently pending approval.
%p This crop was requested by #{crop.requester} #{time_ago_in_words(crop.created_at)} ago.
- unless crop.request_notes.blank?
%p
Request notes: #{crop.request_notes}
- if crop.rejected?
.alert.alert-danger
%b This crop was rejected for the following reason: #{crop.reason_for_rejection == "other" ? crop.rejection_notes : crop.reason_for_rejection}.

View File

@@ -1,17 +1,7 @@
- content_for :title, @crop.name
- content_for :subtitle, @crop.default_scientific_name
- if @crop.pending?
.alert.alert-danger
%b This crop is currently pending approval.
%p This crop was requested by #{@crop.requester} #{time_ago_in_words(@crop.created_at)} ago.
- unless @crop.request_notes.blank?
%p
Request notes: #{@crop.request_notes}
- if @crop.rejected?
.alert.alert-danger
%b This crop was rejected for the following reason: #{@crop.reason_for_rejection == "other" ? @crop.rejection_notes : @crop.reason_for_rejection}.
= render :partial => 'approval_status_message', :locals => { :crop => @crop }
- if @crop.approved?
- content_for :buttonbar do

View File

@@ -1,5 +1,7 @@
%p#notice= notice
= render :partial => 'crops/approval_status_message', :locals => { :crop => @scientific_name.crop }
%p
%b Scientific name:
= @scientific_name.scientific_name