mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-24 17:54:59 -04:00
72 lines
2.2 KiB
Plaintext
72 lines
2.2 KiB
Plaintext
- content_for :title, "Crop Wrangling"
|
|
|
|
|
|
%ul
|
|
%li= link_to "Requests for new crops", 'http://growstuff.org/posts/skud-20130319-requests-for-new-crops'
|
|
%li= link_to "Crop wrangler guidelines", "http://wiki.growstuff.org/index.php/Crop_wrangling"
|
|
%li= link_to "crop-wranglers mailing list", "http://lists.growstuff.org/listinfo/crop-wranglers"
|
|
%li= link_to "Full crop hierarchy", crops_hierarchy_path
|
|
%li= link_to "Add Crop", new_crop_path
|
|
|
|
.crop_wranglers
|
|
%h2 Crop Wranglers:
|
|
%ul
|
|
- @crop_wranglers.each do |crop_wrangler|
|
|
%li.crop_wrangler
|
|
= link_to crop_wrangler.login_name, crop_wrangler
|
|
|
|
.tabbable
|
|
%ul.nav.nav-tabs
|
|
%li{ class: @approval_status.blank? ? 'active' : '' }
|
|
= link_to "Recently added", wrangle_crops_path
|
|
%li{ class: @approval_status == "pending" ? 'active' : '' }
|
|
= link_to "Pending approval", wrangle_crops_path(approval_status: "pending")
|
|
%li{ class: @approval_status == "rejected" ? 'active' : '' }
|
|
= link_to "Rejected", wrangle_crops_path(approval_status: "rejected")
|
|
|
|
%h2
|
|
- if @approval_status == "pending"
|
|
Requested Crops
|
|
- elsif @approval_status == "rejected"
|
|
Rejected Crops
|
|
- else
|
|
Recently added crops
|
|
|
|
|
|
.pagination
|
|
= page_entries_info @crops
|
|
= will_paginate @crops
|
|
|
|
%table{ class: "table table-striped",
|
|
id: @approval_status.blank? ? 'recently-added-crops' : "#{@approval_status}-crops" }
|
|
%tr
|
|
%th System name
|
|
%th English Wikipedia URL
|
|
%th Scientific names
|
|
%th Requested by
|
|
- if @approval_status == "rejected"
|
|
%th Rejected by
|
|
- if @approval_status != "rejected" && @approval_status != "pending"
|
|
%th Added by
|
|
%th When
|
|
- @crops.each do |c|
|
|
%tr
|
|
%td= link_to c.name, edit_crop_path(c)
|
|
%td= link_to c.en_wikipedia_url, c.en_wikipedia_url
|
|
%td
|
|
- c.scientific_names.each do |s|
|
|
= link_to s.name, s
|
|
%br/
|
|
%td= c.requester.present? ? (link_to c.requester, c.requester) : "N/A"
|
|
- unless @approval_status == "pending"
|
|
%td= c.creator.present? ? (link_to c.creator, c.creator) : "N/A"
|
|
%td
|
|
= distance_of_time_in_words(c.created_at, Time.zone.now)
|
|
ago.
|
|
|
|
.pagination
|
|
= page_entries_info @crops
|
|
= will_paginate @crops
|
|
|
|
|