schneidmaster/gitreports.com

View on GitHub
app/views/repositories/show.erb

Summary

Maintainability
Test Coverage
<div class="row">
  <div class="col-xs-12">
    <h3><%= @repository.name %></h3>
    <p>
      Owner: <%= link_to @repository.holder_name, @repository.holder_path %>
    </p>
    <p>
      Users:
      <% @repository.users.each do |user| %>
        <% if user != @repository.users.first %>
          ,
        <% end %>
        <%= link_to user.username, user.github_path %>
      <% end %>
    </p>
    <p>
      Status: <%= @repository.is_active ? "Active" : "Inactive" %>
    </p>
    <% if @repository.is_active %>
      <p>
        Public Link: <%= link_to "View", repository_public_path(@repository.holder_name, @repository.name) %>
      </p>
    <% end %>
    <hr>
    <p>
      <%= link_to "Edit", edit_repository_path(@repository) %> /
      <% if @repository.is_active %>
        <%= link_to "Deactivate", repository_path(@repository, repository: { is_active: false }), method: :patch, data: { confirm: "Are you sure you want to deactivate repository '" + @repository.name + "'?" } %>
      <% else %>
        <%= link_to "Activate", repository_path(@repository, repository: { is_active: true }), method: :patch, data: { confirm: "Are you sure you want to activate repository '" + @repository.name + "'?" } %>
      <% end %>
    </p>
    <hr>
    <h4>
      Display Name
    </h4>
    <p>
      <i>This is the project name that will be displayed when an anonymous user creates a new issue.</i>
    </p>
    <p>
      <% if @repository.display_name.present? %>
        <%= @repository.display_name %>
      <% else %>
        Not set
      <% end %>
    </p>
    <h4>
      Issue Name
    </h4>
    <p>
      <i>This is what will be set as the name of the new issue created on GitHub.</i>
    </p>
    <p>
      <% if @repository.issue_name.present? %>
        <%= @repository.issue_name %>
      <% else %>
        Not set
      <% end %>
    </p>
    <h4>
      Prompt
    </h4>
    <p>
      <i>This is the message that will be displayed to an anonymous user when they create a new issue.</i>
    </p>
    <p>
      <% if @repository.prompt.present? %>
        <%= @repository.prompt %>
      <% else %>
        Not set
      <% end %>
    </p>
    <h4>
      Follow Up
    </h4>
    <p>
      <i>This is the result message that will be displayed to an anonymous user after they submit a new issue.</i>
    </p>
    <p>
      <% if @repository.followup.present? %>
        <%= @repository.followup %>
      <% else %>
        Not set
      <% end %>
    </p>
    <h4>
      Labels
    </h4>
    <p>
      <i>This is the comma-separated list of labels that will be applied to the new issue created on GitHub (bug, enhancement, etc.).</i>
    </p>
    <p>
      <% if @repository.labels.present? %>
        <%= @repository.labels %>
      <% else %>
        Not set
      <% end %>
    </p>
    <h4>
      Notification Email(s)
    </h4>
    <p>
      <i>A notification email will be sent to these email(s) when an issue is submitted.</i>
    </p>
    <p>
      <% if @repository.notification_emails.present? %>
        <%= @repository.notification_emails %>
      <% else %>
        Not set
      <% end %>
    </p>
    <h4>
      Custom Issue Titles
    </h4>
    <p>
      <b><%= @repository.allow_issue_title ? 'Yes' : 'No' %></b>: Users are <%= 'not' unless @repository.allow_issue_title %> permitted to set the issue title on GitHub.
    </p>
    <h4>
      Submitter Email Inclusion
    </h4>
    <p>
      <b><%= @repository.include_submitter_email ? 'Yes' : 'No' %></b>: User emails are <%= 'not' unless @repository.include_submitter_email %> included in notification emails.
    </p>
  </div>
</div>