Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion controllers/taskboard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ def show(params)
@spec[:project_id] = project[:id]
@model = Dirt::Taskboard.new(@spec)
@model.cards
haml :taskboard
text = haml :taskboard

text.gsub(/#([0-9]+)/) do |m|
%Q{<a href="#{Dirt::CONFIG[:rt_url]}/Ticket/Display.html?id=#{$1}" target="_blank">##{$1}</a>}
end
end
end
end
2 changes: 1 addition & 1 deletion lib/request-tracker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def authenticate(params)
return response['set-cookie'].split('; ')[0]
elsif response.body.split('\n').first =~ /401 Credentials required/ then
raise "Your username or password is incorrect"
elsif response.body.split('\n').first =~ /401 Credentials required/ then
elsif response.body.split('\n').first =~ /302/ then
raise "Your have insufficient RT privileges"
else
raise "Got #{response.code} #{response.message} when trying to #{@base_url} body='#{response.body}'"
Expand Down
18 changes: 3 additions & 15 deletions views/macros/simple_task_board.haml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- lanes.each do |lane|
%td{data:{bind: "boxext :{ name :'box'}"}}
- stream_cards(:stream => stream, :lane => lane).each do |card|
.card-border{draggable: "true", ticketId: "#{card[:id]}", data: {target: "#comment_modal", toggle: "modal", bind: "click : handleClick , cardext :{ name :'#{card[:id]}'}"}}
.card-border{ticketId: "#{card[:id]}"}
.card{class: card[:age_class]}
%p="##{card[:id]}"
%p=card[:Owner]
Expand All @@ -24,22 +24,10 @@
- lanes.each do |lane|
%td{data:{bind: "boxext :{ name :'box'}"}}
- misc_cards(:lane => lane).each do |card|
.card-border{draggable: "true", ticketId: "#{card[:id]}", data: {target: "#comment_modal", toggle: "modal", bind: "click : handleClick , cardext :{ name :'#{card[:id]}'}"}}
.card-border{ticketId: "#{card[:id]}"}
.card{class: card[:age_class]}
%p="##{card[:id]}"
%p=card[:Owner]
-# %p=card[:LastUpdated]
%p
%span.card-subject(title="#{card[:Subject]}")=card[:short_subject]

#comment_modal.modal.hide.fade
.modal-header
%button.close{type: "button", data:{dismiss: "modal"}} x
%h3 Some heading
.modal-body
%p Some thing about the ticket
%p comments
.modal-footer
%button.btn.btn-primary{data: {dismiss: "modal"}} Close


%span.card-subject(title="#{card[:Subject]}")=card[:short_subject]