sudara/alonetone

View on GitHub
app/views/assets/new.html.erb

Summary

Maintainability
Test Coverage
<% if @user.assets_count == 0 %>
<div class="page_container page_container_with_blank_slate_full_cloud">
  <%= render layout: 'shared/blank_slate', locals: { name: 'ben', role: 'frontend dev' } do %>
      <p>
        Here is where you can upload your first mp3.
      </p>

      <p>
        It can be something in progress, a demo, or a even a zip file full of mp3s of your latest album.
      </p>

      <p>
        It will be public right away, but you can always adjust the title and description before sharing it.
      </p>
  <% end %>
</div>
<% end %>


<% content_for :left do %>
  <div class="upload box">
    <h2 class="box">Upload, upload, upload</h2>
    <div class="static_content">
      <%= render partial: 'form' %>
    </div>
    <div class="static_content">
        <p>Upload mp3 or zip files, up to 40MB each.</p>
      <p>By clicking "Upload!" <b>you confirm that you own the copyright to the files you upload</b>
      and accept our terms and conditions.</p>

      <p>We recommend that you upload 192kbps mp3s.</p>
      <p>128kbps (what soundcloud &amp; bandcamp stream at) is usually pretty artifacty.
        256kbps can take significantly longer for browsers to download and stream.</p>
      </div>
  </div>

  <% if current_user.moderator? %>
  <div class="upload box">
    <h2 class="box">Upload by URL</h2>
    <div class="static_content">
    <%= form_for :asset, url: user_tracks_path(current_user) do |f| %>
      <div id="uploader">
        <dl class="group" class="fileform">
          <dt id="filelbls">
          </dt>
          <dd class="asset-data">
            <ul class="filefields">
              <li>
                <%= text_field_tag  'asset_data[]', '', placeholder: 'dropbox url, etc', size: 50 %>
              </li>
            </ul>
          </dd>
        </dl>
      </div>
      <div class="submit_wrapper">
        <%= submit_tag 'Upload, and publish!', id: 'upload', data: { disable_with: 'Uploading...' }  %>
        <%= submit_tag "Upload, but don't publish", data: { disable_with: 'Uploading...' }  %>
      </div>
      <% end %>
      <div class="uploading" style='display:none'>
        <%= image_tag 'icons/uploading.gif'%>
      </div>
    </div>
  </div>
  <% end %>

<% end %>

<% content_for :right do%>
  <div id="fineprint" class="box">
    <h2 class="box">Terms And Conditions</h2>
    <p class="static_content">
        <strong>This is a free, legal service for musicians to host and distribute their own music.</strong><br><br>
    We reserve the right to remove material that doesn't fit the spirit of the site.
    </p>

    <div class=" static_content">
        You will only upload music that you own the rights to (i.e. you created it and did not sell exclusive rights)<br><br>
        <strong><span style="color:red">If you upload copyrighted music we will ban your account, your IP address and report you to the gerbils in tuxedos<span></strong><br/>
    </div>
    <div class=" static_content">
        <strong>Mp3s uploaded here will be public the minute you upload them.</strong>
    </div>
    <div class=" static_content">
        By uploading a mp3 file to alonetone.com, <b>you grant alonetone.com the non-exclusive right to distribute<br/>
        the music in any way we see fit without your further permission or notification. </b><br/>
        <br/>
        In other words, you are posting something on the public internet, expect it to be spread around. Your music will likely show up on alonetone.com, facebook, itunes, or other websites. <br/><br/>

        As the rights are non-exclusive, you keep your rights as a copyright holder.
        You can sell it or distribute it elsewhere - you own it!<br/>
    </div>
    <div class=" static_content">

        <strong>You may delete your music at any time</strong><br><br>

        All traces of your track will be removed from alonetone, ripping it out of any user's playlists, removing comments, etc
    </div>
    </div>
<% end %>