From dc175b2676f16e9477872a6be3525c6938e4231a Mon Sep 17 00:00:00 2001 From: Luke Barratt Date: Sat, 26 Apr 2014 22:50:58 +0100 Subject: [PATCH] Cleanup admin issues styling --- app/assets/stylesheets/application.css.scss | 1 + app/assets/stylesheets/pages/_issues.scss | 32 ++++++++++++++++++ app/views/issues/_list.html.erb | 29 +++++++--------- app/views/issues/edit.html.erb | 7 ++-- app/views/issues/index.html.erb | 20 ++++++----- app/views/issues/show.html.erb | 37 +++++++++------------ 6 files changed, 73 insertions(+), 53 deletions(-) create mode 100644 app/assets/stylesheets/pages/_issues.scss diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 53b1a84..287616a 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -55,5 +55,6 @@ @import "pages/matches"; @import "pages/files"; @import "pages/bans"; +@import "pages/issues"; @import "pages/servers"; diff --git a/app/assets/stylesheets/pages/_issues.scss b/app/assets/stylesheets/pages/_issues.scss new file mode 100644 index 0000000..902a4c7 --- /dev/null +++ b/app/assets/stylesheets/pages/_issues.scss @@ -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 { + +} \ No newline at end of file diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 01938c8..b9bc075 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -1,29 +1,24 @@ - +
- - - - - - - + + + + + <% issues.each do |issue| %> - + - - - diff --git a/app/views/issues/edit.html.erb b/app/views/issues/edit.html.erb index 2eae0ec..f9ecbaa 100644 --- a/app/views/issues/edit.html.erb +++ b/app/views/issues/edit.html.erb @@ -1,6 +1,3 @@ -

Editing issue

+

Editing Issue

-<%= render :partial => "form" %> - -<%= link_to 'Show', @issue %> | -<%= link_to 'Back', issues_path %> \ No newline at end of file +<%= render partial: 'form' %> diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index c7a4229..7d3b2b8 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -1,29 +1,31 @@ -

Listing issues

+

Listing Issues

-
-
CreatedTitleStatusAssignedCategoryAuthorActionsCreatedTitleAssignedAuthor
<%= issue.created_at.strftime("%Y-%m-%d %H:%M:%S") %> <%= namelink issue %> - <%= issue.statuses[issue.status] %> - <%= namelink issue.assigned %><%= h issue.category %> <%= namelink issue.author %> + <% if issue.can_update? cuser %> - <%= link_to 'Edit', edit_issue_path(issue) %> - <% end; if issue.can_destroy? cuser %> - <%= link_to 'Destroy', issue, :confirm => 'Are you sure?', :method => :delete %> + <%= link_to icon('pencil'), edit_issue_path(issue) %> + <% end %> + <% if issue.can_destroy? cuser %> + <%= link_to icon('times'), issue, confirm: 'Are you sure?', method: :delete %> <% end %>