Permalink
Browse files

Add (hacky) view in lighthouse link

  • Loading branch information...
1 parent df8e8d7 commit 06c558399bf54cf14038aa878d17938f766b948d @kneath committed May 4, 2009
Showing with 21 additions and 1 deletion.
  1. +4 −0 lib/burndown/milestone.rb
  2. +15 −1 public/css/master.css
  3. +2 −0 views/timeline.erb
@@ -39,6 +39,10 @@ def percent_complete
((tickets_count - open_tickets_count).to_f/tickets_count.to_f*100).to_i
end
+ def external_url
+ "http://#{self.project.token.account}.#{Burndown.config[:lighthouse_host]}/projects/#{self.project.remote_id}/milestones/#{self.remote_id}"
+ end
+
# Queries the API for each milestone (yikes!). Hope you don't have too many.
def self.sync_with_lighthouse
Milestone.all.each do |milestone|
View
@@ -532,4 +532,18 @@ ul.form-actions button{
background:#009936;
}
-/* @end */
+/* @end */
+
+/* Such a hack... */
+a.lh-link{
+ margin-top:-80px;
+ float:right;
+ padding:7px 10px;
+ color:#fff;
+ background:#00344e;
+ -webkit-border-radius:5px;
+ -moz-border-radius:5px;
+}
+a.lh-link:hover{
+ background:#008acf;
+}
View
@@ -1,6 +1,8 @@
<% page_info :title => "Timeline &amp; Graph",
:breadcrumb => [ link_to(h(@milestone.project.name), "/"), link_to(h(@milestone.name), "/project/#{@milestone.project.id}") ] %>
+<a href="<%= @milestone.external_url %>" class="lh-link">View in Lighthouse &rarr;</a>
+
<% if @milestone.tickets_count > 0 %>
<div class="progress">
<ul class="stats">

0 comments on commit 06c5583

Please sign in to comment.