<commit_before>Controller = require 'zooniverse/controllers/base-controller'
Api = require 'zooniverse/lib/api'
User = require 'zooniverse/models/user'

class UploadForm extends Controller
  
  className: 'readymade-generic-page'
  
  template: (context) ->
    logged_in = """
        <h2>Upload photos</h2>
        <p>Upload photos of UK orchids that you have found during the 2015 field season here. See the <a href="#/upload/resources">resources section</a> to view field recording instructions and find out more about the 29 orchid species that we are asking you to find. You can also learn why we are asking you to tell us your name and sign-in to Zooniverse, along with how your images and observation data will be managed.</p>
        <h3>Guides to download</h3>
        <p><a href="resources/OrchidObservers_InstructionSheet.pdf">Instructions for observers (145KB PDF)</a></p>
        <p><a href="resources/OrchidObservers_IDGuide_v2.pdf">UK Orchid Identification Guide (16MB PDF)</a></p>
        <iframe name=upload title="Upload photos to the Biodiversity Research Centre" seamless src='http://www.brc.ac.uk/iframe-host/zooniverse/enter-orchid-record?external=t&email=#{User.current?.email}&username=#{User.current?.name}'></iframe>
      """
    logged_out = """
      <h2>Upload photos</h2>
      <p>Upload photos of UK orchids that you have found during the 2015 field season here. See the <a href="#/upload/resources">resources section</a> to view field recording instructions and find out more about the 29 orchid species that we are asking you to find. You can also learn why we are asking you to tell us your name and sign-in to Zooniverse, along with how your images and observation data will be managed.</p>
      <h3>Guides to download</h3>
      <p><a href="resources/OrchidObservers_InstructionSheet.pdf">Instructions for observers (145KB PDF)</a></p>
      <p><a href="resources/OrchidObservers_IDGuide_v2.pdf">UK Orchid Identification Guide (16MB PDF)</a></p>
      <p>Please log in to upload photos.</p>
      """
    offline = """
      <h2>Upoad photos</h2>
      <p>A huge thank you to all our participants who photographed and submitted their images and records of wild orchids throughout 2015. We’ve now collected all the field data for our analysis but we’d love your help with finishing classifying species and flowering stage in the photographs on the <a href="#identify">identify</a> page! We’d also like help checking and transcribing the labels and flowering stage for our historical orchid collection on the <a href="#transcribe">transcribe</a> page. Thanks for your help!</p>
                  """
    
    # template = if User.current then logged_in else logged_out
    template = offline
      
  
  constructor: ->
    super
    @el.attr id: 'upload-photos'
    
    @listenTo User, 'change', (e, user) =>
      @el.html @template @
      
      iframe = @el.find 'iframe[name=upload]'
      iframe[0]?.style.minHeight = window.innerHeight + 'px'
        
  <commit_msg>Updates to the upload page text<commit_after>Controller = require 'zooniverse/controllers/base-controller'
Api = require 'zooniverse/lib/api'
User = require 'zooniverse/models/user'

class UploadForm extends Controller
  
  className: 'readymade-generic-page'
  
  template: (context) ->
    logged_in = """
        <h2>Upload photos</h2>
        <p>Upload photos of UK orchids that you have found during the 2015 field season here. See the <a href="#/upload/resources">resources section</a> to view field recording instructions and find out more about the 29 orchid species that we are asking you to find. You can also learn why we are asking you to tell us your name and sign-in to Zooniverse, along with how your images and observation data will be managed.</p>
        <h3>Guides to download</h3>
        <p><a href="resources/OrchidObservers_InstructionSheet.pdf">Instructions for observers (145KB PDF)</a></p>
        <p><a href="resources/OrchidObservers_IDGuide_v2.pdf">UK Orchid Identification Guide (16MB PDF)</a></p>
        <iframe name=upload title="Upload photos to the Biodiversity Research Centre" seamless src='http://www.brc.ac.uk/iframe-host/zooniverse/enter-orchid-record?external=t&email=#{User.current?.email}&username=#{User.current?.name}'></iframe>
      """
    logged_out = """
      <h2>Upload photos</h2>
      <p>Upload photos of UK orchids that you have found during the 2015 field season here. See the <a href="#/upload/resources">resources section</a> to view field recording instructions and find out more about the 29 orchid species that we are asking you to find. You can also learn why we are asking you to tell us your name and sign-in to Zooniverse, along with how your images and observation data will be managed.</p>
      <h3>Guides to download</h3>
      <p><a href="resources/OrchidObservers_InstructionSheet.pdf">Instructions for observers (145KB PDF)</a></p>
      <p><a href="resources/OrchidObservers_IDGuide_v2.pdf">UK Orchid Identification Guide (16MB PDF)</a></p>
      <p>Please log in to upload photos.</p>
      """
    offline = """
      <h2>Upload photos</h2>
      <p>A huge thank you to all our participants who photographed and submitted their images and records of wild orchids throughout 2015. We’ve now collected all the field data for our analysis but if you photograph orchids this year, please submit them direct to the Botanical Society of Britain and Ireland (BSBI) – you can find contact details for the BSBI in your area <a href="http://bsbi.org/local-botany">here</a></p>
      <p>We’d love your help to finish transcribing the labels and classifying flowering stage for our historical orchid collection on the <a href="#transcribe">Transcribe</a> page.</p>
      <p>Thanks for your help!</p>
                  """
    
    # template = if User.current then logged_in else logged_out
    template = offline
      
  
  constructor: ->
    super
    @el.attr id: 'upload-photos'
    
    @listenTo User, 'change', (e, user) =>
      @el.html @template @
      
      iframe = @el.find 'iframe[name=upload]'
      iframe[0]?.style.minHeight = window.innerHeight + 'px'
        
  
{'fraction_non_alphanumeric': 0.10274306119136503, 'fraction_numerical': 0.012660282421684791, 'mean_word_length': 3.6191904047976013, 'pattern_counts': {'":': 0, '<': 95, '<?xml version=': 0, '>': 101, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2586630', 'n_tokens_mistral': 1846, 'n_tokens_neox': 1738, 'n_words': 658}