From 4b45f63eda0d4b39ab560a9aae15f78e12b750eb Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Thu, 20 Aug 2015 19:03:44 +0800 Subject: [PATCH] css update plus links from cross sites and stuff working also multiple listing of tickets fixed --- app/assets/javascripts/search.js | 28 +- app/assets/stylesheets/_ticket_variables.scss | 9 - app/assets/stylesheets/ticket_index.scss | 38 -- app/assets/stylesheets/ticket_variables.scss | 9 - app/assets/stylesheets/tickets.css | 28 -- app/assets/stylesheets/tickets/_classes.scss | 15 + app/assets/stylesheets/tickets/_common.scss | 5 + .../tickets/_ticket_variables.scss | 32 ++ .../stylesheets/tickets/ticket_index.scss | 119 +++++++ .../{ticket.scss => tickets/ticket_show.scss} | 329 ++++++++++++++---- app/controllers/admin/tickets_controller.rb | 8 +- app/helpers/tickets_helper.rb | 13 + app/views/admin/tickets/_query.html.erb | 50 +-- app/views/admin/tickets/_search_form.html.erb | 12 +- app/views/admin/tickets/_ticket.html.erb | 6 +- app/views/admin/tickets/index.html.erb | 36 +- app/views/admin/tickets/my_tickets.html.erb | 2 - app/views/admin/tickets/show.html.erb | 31 +- .../tickets/tickets_by_category.html.erb | 1 - 19 files changed, 542 insertions(+), 229 deletions(-) delete mode 100644 app/assets/stylesheets/_ticket_variables.scss delete mode 100644 app/assets/stylesheets/ticket_index.scss delete mode 100644 app/assets/stylesheets/ticket_variables.scss delete mode 100644 app/assets/stylesheets/tickets.css create mode 100644 app/assets/stylesheets/tickets/_classes.scss create mode 100644 app/assets/stylesheets/tickets/_common.scss create mode 100644 app/assets/stylesheets/tickets/_ticket_variables.scss create mode 100644 app/assets/stylesheets/tickets/ticket_index.scss rename app/assets/stylesheets/{ticket.scss => tickets/ticket_show.scss} (59%) create mode 100644 app/helpers/tickets_helper.rb diff --git a/app/assets/javascripts/search.js b/app/assets/javascripts/search.js index 02f04be..cf59d85 100644 --- a/app/assets/javascripts/search.js +++ b/app/assets/javascripts/search.js @@ -1,19 +1,19 @@ (function(){ document.getElementById("search-form").reset(); - $("#serach-btn").on("click",function(){ - var el = $(this); - if(el.hasClass("opened")){ - $(".search-box input").stop().animate({"width":"0"},function(){ - $(".search-box").hide(); - el.removeClass("opened"); - }).val(""); - }else{ - $(".search-box").show(); - el.addClass("opened"); - $(".search-box input").stop().animate({"width":"200px"}).focus(); - } - return false; - }) + // $("#serach-btn").on("click",function(){ + // var el = $(this); + // if(el.hasClass("opened")){ + // $(".search-box input").stop().animate({"width":"0"},function(){ + // $(".search-box").hide(); + // el.removeClass("opened"); + // }).val(""); + // }else{ + // $(".search-box").show(); + // el.addClass("opened"); + // $(".search-box input").stop().animate({"width":"200px"}).focus(); + // } + // return false; + // }) var regex = new RegExp(/[a-z]+:/); $("#smart-field-select").on("change",function(){ diff --git a/app/assets/stylesheets/_ticket_variables.scss b/app/assets/stylesheets/_ticket_variables.scss deleted file mode 100644 index 3e922fa..0000000 --- a/app/assets/stylesheets/_ticket_variables.scss +++ /dev/null @@ -1,9 +0,0 @@ -@charset "utf-8"; - -// colors -$blue: #326cc1; -$light-blue: #dce5e8; -$white: #fff; - -// units -$main-width: 1000px; \ No newline at end of file diff --git a/app/assets/stylesheets/ticket_index.scss b/app/assets/stylesheets/ticket_index.scss deleted file mode 100644 index 6b8ce1a..0000000 --- a/app/assets/stylesheets/ticket_index.scss +++ /dev/null @@ -1,38 +0,0 @@ -@charset "utf-8"; -@import 'ticket_variables'; - - -.ticket-container { - max-width: $main-width; - width: 96%; - margin: auto; - background-color: $white; -} - - -.ticket-section-heading { - background-color: $blue; - color: $white; - padding: 10px 14px; -} -.ticket-section-container { - padding: 0 1rem; - margin-bottom: 20px; -} -.ticket-category-title { - background-color: #fff; -} - -.ticket-item { - padding: 8px 5px; - border-bottom: 1px solid $light-blue; -} - -.ticket-item:first-child { - border-top: 1px solid $light-blue; -} - -.ticket-section-view-all { - text-align: right; - margin: 20px 5px 40px; -} \ No newline at end of file diff --git a/app/assets/stylesheets/ticket_variables.scss b/app/assets/stylesheets/ticket_variables.scss deleted file mode 100644 index 1e70bd2..0000000 --- a/app/assets/stylesheets/ticket_variables.scss +++ /dev/null @@ -1,9 +0,0 @@ -@charset "utf-8"; - -// colors -$blue: #326cc1; -$light-blue: #dce5e8; - - -// units -$main-width: 1000px; \ No newline at end of file diff --git a/app/assets/stylesheets/tickets.css b/app/assets/stylesheets/tickets.css deleted file mode 100644 index 093aa60..0000000 --- a/app/assets/stylesheets/tickets.css +++ /dev/null @@ -1,28 +0,0 @@ -hr{ - border-color: #8E8E8E -moz-use-text-color #ffffff; - margin-top: 5px; -} - -.ticket{ -} - -.ticket .ticket-title{ - font-size: 14px; - margin-left: 15px; - line-height: 45px; -} - -.category_ticket_wrap .search-wrap{ - /*float: left; - margin-top: -43px; - margin-left: 200px;*/ - display: inline; -} - -.category_ticket_wrap h3{ - width: auto; -} - -.urgent-container{ - /*background-color: #F7EEE2;*/ -} \ No newline at end of file diff --git a/app/assets/stylesheets/tickets/_classes.scss b/app/assets/stylesheets/tickets/_classes.scss new file mode 100644 index 0000000..5a71245 --- /dev/null +++ b/app/assets/stylesheets/tickets/_classes.scss @@ -0,0 +1,15 @@ +@charset "utf-8"; +@import 'ticket_variables'; +@import 'common'; + +.t-round { + border-radius: $t-round; +} + +.t-strong-round { + border-radius: $t-strong-round; +} + +.t-uppercase { + text-transform: uppercase; +} \ No newline at end of file diff --git a/app/assets/stylesheets/tickets/_common.scss b/app/assets/stylesheets/tickets/_common.scss new file mode 100644 index 0000000..d8bcffb --- /dev/null +++ b/app/assets/stylesheets/tickets/_common.scss @@ -0,0 +1,5 @@ +@charset "utf-8"; + +#filter { + display: none; +} \ No newline at end of file diff --git a/app/assets/stylesheets/tickets/_ticket_variables.scss b/app/assets/stylesheets/tickets/_ticket_variables.scss new file mode 100644 index 0000000..f6af5ff --- /dev/null +++ b/app/assets/stylesheets/tickets/_ticket_variables.scss @@ -0,0 +1,32 @@ +@charset "utf-8"; +@import url(http://fonts.googleapis.com/css?family=Roboto); + +// font stacks +$main-font: 'Roboto', sans-serif; + +// colors +$primary: #2980b9; +$second: #489ad8; + +$red: #d95f49; +$yellow: #F28A31; +$green: #69B556; +$purple: #9f57b9; + +$light-blue: #f8fbff; +$dark-blue: #2e3e4f; + +$gray: #888; +$subtle-gray: #f1f1f1; +$light-gray: #edf0f1; + +$white: #fff; +$black: #000; + +// units +$main-width: 1000px; +$t-round: 0.125rem; +$t-strong-round: 0.25rem; + +$t-normal: .3s; +$t-fast: .15s; diff --git a/app/assets/stylesheets/tickets/ticket_index.scss b/app/assets/stylesheets/tickets/ticket_index.scss new file mode 100644 index 0000000..72c431e --- /dev/null +++ b/app/assets/stylesheets/tickets/ticket_index.scss @@ -0,0 +1,119 @@ +@charset "utf-8"; +@import 'ticket_variables'; +@import 'common'; +@import 'classes'; +body { + background-color: $subtle-gray; +} + +.ticket-container { + a { + color: $primary; + &:hover { + color: lighten($primary, 10%); + } + } +} + +.ticket-container, +.ticket-search-wrap { + max-width: $main-width; + width: 96%; + margin: auto; +} + +.ticket-search-option { + width: 10%; +} + +input.ticket-search-field { + width: 80%; + height: 30px; + margin-bottom: 0; +} + +.ticket-section { + margin-bottom: 20px; +} + +.ticket-section-heading { + background-color: $primary; + color: $white; + padding: 16px 14px; + margin-bottom: 0; + font-family: $main-font; + &.type--ugrent { + background-color: $red; + } + &.type--normal { + background-color: $second; + } +} + +.ticket-section-heading-icon { + margin-right: 8px; +} + +.ticket-section-container { + background-color: $white; + margin-bottom: 20px; + position: relative; +} + +.ticket-category-title { + margin: 0; + padding: 20px 16px; + background-color: #fbfbfb; + font-family: $main-font; + border-bottom: 1px solid $light-gray; +} + +.ticket-category-title-icon { + margin-right: 5px; +} + +.ticket-item { + padding: 16px 20px; + border-bottom: 1px solid $light-gray; + font-family: $main-font; + &:hover { + background-color: $light-blue; + } +} + +.ticket-item:first-child { + border-top: 1px solid $light-gray; +} + +.ticket-label { + white-space: nowrap; +} + +.ticket-section-view-all { + position: absolute; + right: 2rem; + top: 20px; + &:hover { + .ticket-section-view-all-icon { + top: 0; + } + } + .ticket-section-view-all-btn { + overflow: hidden; + display: block; + font-size: 12px; + color: $gray; + font-family: $main-font; + &:hover { + text-decoration: none; + } + } +} + +.ticket-section-view-all-icon { + position: relative; + top: 40px; + color: $second; + -webkit-webkit-transition: $t-fast all; + transition: $t-fast all; +} diff --git a/app/assets/stylesheets/ticket.scss b/app/assets/stylesheets/tickets/ticket_show.scss similarity index 59% rename from app/assets/stylesheets/ticket.scss rename to app/assets/stylesheets/tickets/ticket_show.scss index 074b583..8c83266 100644 --- a/app/assets/stylesheets/ticket.scss +++ b/app/assets/stylesheets/tickets/ticket_show.scss @@ -1,5 +1,8 @@ - @charset "utf-8"; +@import 'ticket_variables'; +@import 'common'; +@import 'classes'; + #main-wrap .wrap-inner { padding-top: 20px !important; } @@ -32,7 +35,6 @@ #ticket_footer_pagination { text-align: center; - @media screen and (max-width: 50rem) { text-align: left; } @@ -108,18 +110,7 @@ } } -// Ticket page -// helper classes -$primary: #2980b9; -$second: #489ad8; -$red: #d95f49; -$yellow: #F28A31; -$green: #69B556; -$dark-blue: #2e3e4f; -$gray: #888; -$light-gray: #edf0f1; -$white: #fff; -$black: #000; + .t-list-unstyled { list-style: none; @@ -158,13 +149,12 @@ $black: #000; background-color: $gray; } -.t-status-in-progress { +.t-status-processing { color: $white; - background-color: $primary; + background-color: $purple; } .t-category { - text-transform: uppercase; border-radius: 0.125rem; display: inline-block; padding: 4px 0.375rem; @@ -176,12 +166,35 @@ $black: #000; background-color: $yellow; } -.t-btn { +.t-item { font-size: 0.8125rem; color: $gray; background-color: $white; } +.t-btn { + font-size: 0.75rem; + font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; + background-color: $white; + padding: 7px 0.625rem; + border-radius: $t-round; + &:hover { + text-decoration: none; + } +} + +.t-btn-primary { + background-color: $primary; +} + +.t-btn-danger { + color: $white; + background-color: $red; + &:hover { + color: $white; + } +} + .t-depth-1 { margin-left: 1.5625rem; } @@ -194,20 +207,67 @@ $black: #000; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; > li { text-shadow: none; + font-size: 0.8125rem; } } +// ticket notification +.notice { + position: fixed; + top: -5rem; + font-size: 0.8125rem; + font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; + -webkit-transition: .15s all ease-in-out; + transition: .15s all ease-in-out; + -webkit-box-shadow: 0 2px 15px 0 rgba(0, 0, 0, .1); + margin: 0; + +} + +.notice-pop { + left: 100px; + padding: 20px 2rem; + color: $white; + background-color: rgba($black, .85); + box-shadow: 0 2px 15px 0 rgba(0, 0, 0, .1); + &.in { + top: 60px; + } +} + +.notice-close { + margin-left: 0.625rem; + font-size: 1.0375rem; + vertical-align: middle; + &:hover { + cursor: pointer; + } +} + +.notice-bar-on { + #main-wrap { + padding-top: 70px; + } +} +.notice-bar { + position: fixed; + left: 61px; + width: 100%; + color: $white; + background-color: $red; + padding: 10px; + text-indent: 1rem; + &.in { + top: 40px; + } +} + +.notice-bar-close { + +} + .ticket-wrap { position: relative; - background-color: $white; - -webkit-border-bottom-right-radius: 0.25rem; - -webkit-border-bottom-left-radius: 0.25rem; - -moz-border-radius-bottomright: 0.25rem; - -moz-border-radius-bottomleft: 0.25rem; - border-bottom-right-radius: 0.25rem; - border-bottom-left-radius: 0.25rem; - -webkit-box-shadow: 0 2px 15px 0 rgba(0, 0, 0, .2); - box-shadow: 0 2px 15px 0 rgba(0, 0, 0, .2); max-width: 1000px; width: 96%; margin: 0 auto; @@ -221,11 +281,8 @@ $black: #000; -moz-border-radius-topright: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; - &:hover { - .ticket-action { - top: 1.4rem; - opacity: 1; - } + &.active { + background-color: $red; } .ticket-heading { color: $white; @@ -244,17 +301,34 @@ $black: #000; color: #EDF0F1; float: left; font-size: 0.8125rem; + @media screen and(max-width: 39.375rem) { + margin-bottom: 10px; + } } .ticket-state { float: right; } + .ticket-urgent-btn { + margin-right: 3px; + color: $white; + background-color: $gray; + &.active { + background-color: $red; + color: $white; + } + } + // 630px + @media screen and (max-width: 39.375rem) { + > div[class^="ticket-"] { + float: none; + } + } } .ticket-action { position: absolute; right: 1.4rem; - top: -0.2rem; - opacity: 0; + top: 1.4rem; transition: .3s all; .dropdown-menu { top: 120%; @@ -312,18 +386,84 @@ $black: #000; } } -.ticket-content { - padding: 10px 1.8rem 20px; - overflow: auto; +.ticket-category { + position: relative; +} +.ticket-category-dropdown { + text-transform: uppercase; + color: $white; + &:hover { + color: $white; + } +} + +.ticket-category-select { + top: 120%; + left: auto; + right: 0; + padding: 15px 0; + border: none; + border-radius: 0.125rem; + min-width: 140px; + .t-btn { + i { + margin-right: 0.3125rem; + } + } + > li { + > a { + padding: 3px 0.75rem; + } + } + li { + > a { + &:hover { + background-color: $second; + background-image: none; + } + } + } + li { + > .ticket-delete { + &:hover { + background-color: $red; + } + } + > .ticket-close { + &:hover { + background-color: $yellow; + } + } + } +} + +.ticket-query-wrap { + -webkit-box-shadow: 0 2px 15px 0 rgba(0, 0, 0, .1); + box-shadow: 0 2px 15px 0 rgba(0, 0, 0, .1); + background-color: $white; + padding: 10px 1.875rem 30px 1.875rem; + margin-bottom: 30px; } .ticket-query { - margin: 15px 0 20px 0; + padding: 15px 0 20px 0; font-size: 0.9375rem; } -// response +.ticket-query-wrap:first-child { + -webkit-border-bottom-right-radius: 0.25rem; + -webkit-border-bottom-left-radius: 0.25rem; + -moz-border-radius-bottomright: 0.25rem; + -moz-border-radius-bottomleft: 0.25rem; + border-bottom-right-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} +.ticket-query-wrap:nth-child(1n+2) { + border-radius: 0.25rem; +} + +// response .ticket-response { font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; border: 1px solid lighten($gray, 40%); @@ -337,12 +477,33 @@ $black: #000; color: $white; font-size: 0.9375rem; margin: 0 0 20px; + cursor: pointer; + -webkit-transition: .15s all; + transition: .15s all; + &.collapsed { + margin: 0; + background-color: $gray; + outline-color: $gray; + &:hover { + background-color: $second; + outline-color: $second; + } + } + .ticket-response-heading-collapse { + font-size: 1.2rem; + padding: 2px 5px; + } } .ticket-response-heading-icon { margin-right: 0.5rem; } - +.ticket-response-wrap { + &.collapsed { + height: 0; + overflow: hidden; + } +} .ticket-response-item { margin: 35px auto; width: 90%; @@ -389,6 +550,29 @@ $black: #000; padding: 10px 1.8rem 20px; } +// Go back top +.go-back-top { + background: $gray; + color: $white; + border-radius: 4px; + width: 50px; + height: 50px; + line-height: 50px; + text-align: center; + text-transform: uppercase; + cursor: pointer; + position: fixed; + right: 1rem; + bottom: 1rem; + -webkit-transition: .15s all; + transition: .15s all; + &:hover { + border-radius: 50%; + background-color: $primary; + } +} + + // ticket table .ticket-table { td { @@ -396,38 +580,45 @@ $black: #000; } } - - -// TODO joshua pleae change it -.ticket-category-select{ - border: medium none; - text-decoration: none; - color: $white; - border-radius: 0.125rem; - left: auto; - min-width: 100px; - padding: 15px 0; - right: 0; - top: 8.3%; -} - -.ticket-category-dropdown{ - color: $white; - text-decoration: none; - &:hover{ - color : $white; - text-decoration: none; +// create ticket +.ticket-create-form { + .ticket-create-subject { + width: 77%; + margin-right: 0.625rem; + height: 30px; } - &:active{ - outline:none; - } - &:focus{ - outline:none; + .ticket-create-type { + width: 20%; + height: 40px; } } -.popover[class*=tour-]{ - z-index: 1101; -} + +// .ticket-category-select{ +// border: medium none; +// text-decoration: none; +// color: $white; +// border-radius: 0.125rem; +// left: auto; +// min-width: 100px; +// padding: 15px 0; +// right: 0; +// top: 8.3%; +// } + +// .ticket-category-dropdown{ +// color: $white; +// text-decoration: none; +// &:hover{ +// color : $white; +// text-decoration: none; +// } +// &:active{ +// outline:none; +// } +// &:focus{ +// outline:none; +// } +// } // till here \ No newline at end of file diff --git a/app/controllers/admin/tickets_controller.rb b/app/controllers/admin/tickets_controller.rb index ad7f8b6..7665dea 100644 --- a/app/controllers/admin/tickets_controller.rb +++ b/app/controllers/admin/tickets_controller.rb @@ -1,5 +1,7 @@ class Admin::TicketsController < OrbitAdminController + include TicketsHelper + before_action :set_smart_tags def index @@ -11,8 +13,8 @@ class Admin::TicketsController < OrbitAdminController if authorizations.count == 0 @categories = ModuleApp.find_by_key("ticket").categories rescue [] @categories.each do |category| - @tickets[category] = Ticket.open.not_urgent.limit(5).asc(:created_at) - @urgent_tickets[category] = Ticket.open.all_urgent.asc(:created_at) + @tickets[category] = Ticket.where(:category_id => category.id).open.not_urgent.limit(5).asc(:created_at) + @urgent_tickets[category] = Ticket.where(:category_id => category.id).open.all_urgent.asc(:created_at) end else @categories = authorizations.collect{|authorization| authorization.category} @@ -143,7 +145,7 @@ class Admin::TicketsController < OrbitAdminController tq = TicketQuery.find(params[:ticket_query_id]) rescue nil if !tq.nil? response = TicketQueryResponse.new - response.response = params[:ticket_query_response] + response.response = smart_store_link_parser(params[:ticket_query_response]) response.response_by = current_user.id response.save tq.ticket_query_responses << response diff --git a/app/helpers/tickets_helper.rb b/app/helpers/tickets_helper.rb new file mode 100644 index 0000000..9294527 --- /dev/null +++ b/app/helpers/tickets_helper.rb @@ -0,0 +1,13 @@ +module TicketsHelper + def smart_links_parser(html,site) + html = html.gsub("href=\"/uploads/","href=\"http://#{site.site_domain}/uploads/") + html = html.gsub("src=\"/uploads/","src=\"http://#{site.site_domain}/uploads/") + return html + end + + def smart_store_link_parser(html) + html = html.gsub("href=\"/uploads/","href=\"http://#{request.host_with_port}/uploads/") + html = html.gsub("src=\"/uploads/","src=\"http://#{request.host_with_port}/uploads/") + return html + end +end \ No newline at end of file diff --git a/app/views/admin/tickets/_query.html.erb b/app/views/admin/tickets/_query.html.erb index 12fe8a6..5b6777b 100644 --- a/app/views/admin/tickets/_query.html.erb +++ b/app/views/admin/tickets/_query.html.erb @@ -1,25 +1,27 @@ -
- <%= query.query.html_safe %> -
-
-

- - Response -

-
> - <%= render :partial => "response", :collection => query.ticket_query_responses %> -
- <% if params[:reopen] != "true" && @ticket.ticket_queries.count == (query_counter + 1) %> -
-
- - -
- -
- - <% end %> +
+
+ <%= smart_links_parser(query.query, @ticket.registered_site).html_safe %> +
+
+

+ + Response +

+
> + <%= render :partial => "response", :collection => query.ticket_query_responses %> +
+ <% if params[:reopen] != "true" && @ticket.ticket_queries.count == (query_counter + 1) %> +
+
+ + +
+ +
+ + <% end %> +
\ No newline at end of file diff --git a/app/views/admin/tickets/_search_form.html.erb b/app/views/admin/tickets/_search_form.html.erb index d492a4e..13a24df 100644 --- a/app/views/admin/tickets/_search_form.html.erb +++ b/app/views/admin/tickets/_search_form.html.erb @@ -1,18 +1,18 @@ -
- +
+ <% if params[:keywords].present? %> - + Searched for <%= params[:keywords] %> <% end %> -
\ No newline at end of file diff --git a/app/views/admin/tickets/_ticket.html.erb b/app/views/admin/tickets/_ticket.html.erb index 792ed35..c9f4fe2 100644 --- a/app/views/admin/tickets/_ticket.html.erb +++ b/app/views/admin/tickets/_ticket.html.erb @@ -5,12 +5,12 @@ when "closed" badge_class = "t-status-close" when "commenced" - badge_class = "t-status-in-progress" + badge_class = "t-status-processing" end %>
- #<%= ticket.uid %> - <%= ticket.subject %> (<%= ticket.registered_site.title %>) -
+ #<%= ticket.uid %> - <%= ticket.subject %> (<%= ticket.registered_site.title %>) +
<% if ticket.is_urgent? %> Urgent <% end %> diff --git a/app/views/admin/tickets/index.html.erb b/app/views/admin/tickets/index.html.erb index 47b1f42..a1703f8 100644 --- a/app/views/admin/tickets/index.html.erb +++ b/app/views/admin/tickets/index.html.erb @@ -1,29 +1,43 @@ <% content_for :page_specific_css do %> + <%= stylesheet_link_tag "https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" %> <%= stylesheet_link_tag "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" %> - <%= stylesheet_link_tag "ticket_index" %> - <%= stylesheet_link_tag "tickets" %> - <%= stylesheet_link_tag "ticket" %> + <%= stylesheet_link_tag "tickets/ticket_index" %> <% end %> <%= render :partial => "search_form" %>
-
-

Urgent Tickets

+
+

+ + Urgent Tickets +

<% @categories.each do |category| %> <% if !@urgent_tickets[category].nil? %> -
-

<%= category.title %>

+
+

+ + <%= category.title %> +

<%= render :partial => "ticket", :collection => @urgent_tickets[category] %>
<% end %> <% end %>
-

Normal Tickets

+

+ + Tickets +

<% @categories.each do |category| %> -
-

<%= category.title %>

+
+

+ + <%= category.title %> +

<%= render :partial => "ticket", :collection => @tickets[category] %>
<% end %> diff --git a/app/views/admin/tickets/my_tickets.html.erb b/app/views/admin/tickets/my_tickets.html.erb index 8a686e4..6684859 100644 --- a/app/views/admin/tickets/my_tickets.html.erb +++ b/app/views/admin/tickets/my_tickets.html.erb @@ -1,6 +1,4 @@ <% content_for :page_specific_css do %> - <%= stylesheet_link_tag "tickets" %> - <%= stylesheet_link_tag "ticket" %> <% end %> <%= render :partial => "search_form" %>
diff --git a/app/views/admin/tickets/show.html.erb b/app/views/admin/tickets/show.html.erb index aab7860..45bfdd4 100644 --- a/app/views/admin/tickets/show.html.erb +++ b/app/views/admin/tickets/show.html.erb @@ -1,6 +1,6 @@ <% content_for :page_specific_css do %> <%= stylesheet_link_tag "https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" %> - <%= stylesheet_link_tag "ticket" %> + <%= stylesheet_link_tag "tickets/ticket_show" %> <% end %> <% content_for :page_specific_javascript do %> <%= javascript_include_tag "lib/jquery.form.js" %> @@ -13,12 +13,16 @@ when "closed" badge_class = "t-status-close" when "commenced" - badge_class = "t-status-in-progress" + badge_class = "t-status-processing" end %> +
-
> +
" >

#<%= @ticket.uid %> - <%= @ticket.subject[0..50] %> <% if !@ticket.taken_by.nil? %> <% user = User.find(@ticket.taken_by) %> @@ -33,26 +37,26 @@

<% if @ticket.status != "closed" %> - " id="toggle-urgent">Urgent + " id="toggle-urgent"> + + Urgent + <% end %> @@ -104,7 +111,7 @@