Sha256: a93f3983babbd64f327793cbc8d4dfa67c1453e4664e2dab17a8b2c22f7377ff

Contents?: true

Size: 1.92 KB

Versions: 10

Compression:

Stored size: 1.92 KB

Contents

<% content_for :title do %>
<h1 class="project-banner space-below">
  Add Projects from GitHub
</h1>
<% end %>

<p>Select the repos to create projects for in Houston</p>

<%= form_tag do %>
  <ul id="repos">
    <% @repos.each do |repo| %>
      <li class="repo <%= "disabled" if repo[:project] %> <%= "retired" if repo[:project] && repo[:project].retired? %>">
        <% if repo[:project] %>
          <input type="checkbox" checked disabled />
        <% else %>
          <input type="checkbox" name="repos[]" value="<%= repo[:full_name] %>" id="<%= repo[:full_name] %>" />
        <% end %>

        <label for="<%= repo[:full_name] %>">
          <span class="repo-visibility">
            <% if repo[:private] %>
              <i class="fa fa-lock"></i>
            <% else %>
              <i class="fa fa-unlock"></i>
            <% end %>
          </span>
          <span class="repo-owner">
            <%= repo[:owner] %>
          </span>
          <span class="repo-name">
            <% if repo[:project] %>
              <span class="label <%= repo[:project].color %>">
                <%= repo[:name] %>
              </span>
            <% else %>
              <b><%= repo[:name] %></b>
            <% end %>
          </span>
        </label>
      </li>
    <% end %>
  </ul>

  <div class="form-actions">
    <button type="submit" class="btn btn-primary">Add</button>
  </div>
<% end %>

<% content_for :javascripts do %>
  <script type="text/javascript">
    $(function() {
      $(':checkbox').click(function(e) {
        var $checkbox = $(e.target);
        $checkbox.closest('.repo').toggleClass('selected', $checkbox.prop('checked'));
      });

      $('[type="submit"]').click(function(e) {
        e.preventDefault();
        $(e.target)
          .prop('disabled', true)
          .html('<i class="fa fa-spinner fa-spin"></i> Adding Projects...')
          .closest('form')
          .submit();
      });
    });
  </script>
<% end %>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
houston-core-0.8.0.pre app/views/projects/new_from_github.html.erb
houston-core-0.7.0 app/views/projects/new_from_github.html.erb
houston-core-0.7.0.beta4 app/views/projects/new_from_github.html.erb
houston-core-0.7.0.beta3 app/views/projects/new_from_github.html.erb
houston-core-0.7.0.beta2 app/views/projects/new_from_github.html.erb
houston-core-0.7.0.beta app/views/projects/new_from_github.html.erb
houston-core-0.6.3 app/views/projects/new_from_github.html.erb
houston-core-0.6.2 app/views/projects/new_from_github.html.erb
houston-core-0.6.1 app/views/projects/new_from_github.html.erb
houston-core-0.6.0 app/views/projects/new_from_github.html.erb