Cleanup admin issues styling

This commit is contained in:
Luke Barratt 2014-04-26 22:50:58 +01:00
parent c471ccff22
commit dc175b2676
6 changed files with 73 additions and 53 deletions

View file

@ -55,5 +55,6 @@
@import "pages/matches"; @import "pages/matches";
@import "pages/files"; @import "pages/files";
@import "pages/bans"; @import "pages/bans";
@import "pages/issues";
@import "pages/servers"; @import "pages/servers";

View file

@ -0,0 +1,32 @@
/*
Issues List
*/
table.issues {
.date {
width: 25%;
}
.title {
width: 35%;
}
.assigned,
.author {
width: 15%;
}
.actions {
width: 10%;
text-align: right;
}
}
/*
Issues Page
*/
#issue {
}

View file

@ -1,29 +1,24 @@
<table class="data"> <table class="issues striped">
<tr> <tr>
<th>Created</th> <th class="date">Created</th>
<th>Title</th> <th class="title">Title</th>
<th>Status</th> <th class="assinged">Assigned</th>
<th>Assigned</th> <th class="author">Author</th>
<th>Category</th> <th class="actions"></th>
<th>Author</th>
<th>Actions</th>
</tr> </tr>
<% issues.each do |issue| %> <% issues.each do |issue| %>
<tr class="<%= cycle('even', 'odd') %>"> <tr>
<td><%= issue.created_at.strftime("%Y-%m-%d %H:%M:%S") %></td> <td><%= issue.created_at.strftime("%Y-%m-%d %H:%M:%S") %></td>
<td><%= namelink issue %></td> <td><%= namelink issue %></td>
<td class="<%= issue.color %>">
<%= issue.statuses[issue.status] %>
</td>
<td><%= namelink issue.assigned %></td> <td><%= namelink issue.assigned %></td>
<td><%= h issue.category %></td>
<td><%= namelink issue.author %></td> <td><%= namelink issue.author %></td>
<td> <td class="actions">
<% if issue.can_update? cuser %> <% if issue.can_update? cuser %>
<%= link_to 'Edit', edit_issue_path(issue) %> <%= link_to icon('pencil'), edit_issue_path(issue) %>
<% end; if issue.can_destroy? cuser %> <% end %>
<%= link_to 'Destroy', issue, :confirm => 'Are you sure?', :method => :delete %> <% if issue.can_destroy? cuser %>
<%= link_to icon('times'), issue, confirm: 'Are you sure?', method: :delete %>
<% end %> <% end %>
</td> </td>
</tr> </tr>

View file

@ -1,6 +1,3 @@
<h1>Editing issue</h1> <h1>Editing Issue</h1>
<%= render :partial => "form" %> <%= render partial: 'form' %>
<%= link_to 'Show', @issue %> |
<%= link_to 'Back', issues_path %>

View file

@ -1,29 +1,31 @@
<h1>Listing issues</h1> <h1 class="title">Listing Issues</h1>
<div id="issueTabs"> <div id="issues" class="tabbed">
<ul id="issueTabs-nav" class="tabs"> <ul id="issues-nav" class="tabs">
<li><a href="#open">Open</a></li> <li><a href="#open">Open</a></li>
<li><a href="#solved">Solved</a></li> <li><a href="#solved">Solved</a></li>
<li><a href="#rejected">Rejected</a></li> <li><a href="#rejected">Rejected</a></li>
</ul> </ul>
<div class="box wide tabs"> <div class="tabbed-contents">
<div class="tab" id="open"> <div class="tab" id="open">
<%= render :partial => "list", :locals => {:issues => @open} %> <%= render partial: "list", locals: { issues: @open } %>
</div> </div>
<div class="tab" id="solved"> <div class="tab" id="solved">
<%= render :partial => "list", :locals => {:issues => @solved} %> <%= render partial: "list", locals: { issues: @solved } %>
</div> </div>
<div class="tab" id="rejected"> <div class="tab" id="rejected">
<%= render :partial => "list", :locals => {:issues => @rejected} %> <%= render partial: "list", locals: { issues: @rejected } %>
</div> </div>
</div> </div>
</div> </div>
<%= link_to 'New issue', new_issue_path %> <%= link_to 'New Issue', new_issue_path, class: 'button' %>
<script type="text/javascript"> <script type="text/javascript">
var tabber1 = new Yetii({id: 'issueTabs'}); new Yetii({
id: 'issues'
});
</script> </script>

View file

@ -1,30 +1,23 @@
<h1> <div id="issue">
Issue: <%= h @issue %> (created <%= @issue.created_at.strftime("%Y-%m-%d %H:%M:%S") %>) <h1>Issue: <%= h @issue %></h1>
</h1> <h2 class="title">Created: <%= @issue.created_at.strftime("%Y-%m-%d %H:%M:%S") %></h2>
<h3><%= link_to "Back to the list of issues", issues_path %></h3>
<div class="wide box">
<%= cascade @issue, [:author, :assigned, :category, "status_s"] %> <%= cascade @issue, [:author, :assigned, :category, "status_s"] %>
<h3>Issue details:</h3>
<p><%= @issue.text_parsed.html_safe %></p>
<% if @issue.solution and !@issue.solution.empty? %>
<h3>Solution:</h3>
<p><%= @issue.solution_formatted.html_safe %></p>
<% end %>
<p> <p>
<% if @issue.can_update? cuser%> <% if @issue.can_update? cuser%>
<%= link_to 'Edit', edit_issue_path(@issue) %> | <%= link_to 'Edit Issue', edit_issue_path(@issue), class: 'button' %>
<% end %> <% end %>
<%= link_to 'Back', issues_path %>
</p> </p>
<h3> <%= add_comments @issue %>
Issue details:
</h3>
<%= raw @issue.text_parsed %>
<% if @issue.solution and !@issue.solution.empty? %>
<h3>
Solution:
</h3>
<%= raw @issue.solution_formatted %>
<% end %>
</div> </div>
<%= add_comments @issue %>