Skip to content

Commit

Permalink
Reformat service#show page and add tracking event to Docker link
Browse files Browse the repository at this point in the history
  • Loading branch information
rheinwein committed Sep 17, 2014
1 parent 5ac0c51 commit 5076c18
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 24 deletions.
38 changes: 22 additions & 16 deletions app/assets/stylesheets/panamax/service_details.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,26 +140,32 @@
* {
display: inline-block;
}
h6 {
color: $dark_grey;
font-weight: bold;
}
span {
margin-right: 6px;
}
a {
padding-left: 10px;
border-left: 1px solid $dark_grey;

.image-details {
h6 {
color: $dark_grey;
font-weight: bold;
padding-bottom: 0;
}

span {
margin-right: 6px;
}

.docker-link {
padding-left: 10px;
border-left: 1px solid $dark_grey;
}
}

a.documentation {
border: 0;
.documentation {
padding: 0;
position: absolute;
bottom: 0;
display: block;
text-decoration: underline;
font-size: 0.9em;

a {
text-decoration: underline;
font-size: 0.9em;
}
}
}

Expand Down
18 changes: 10 additions & 8 deletions app/views/services/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@
%span.load-state= @service.load_state

.base-image-detail
%h6 Base Image:
%span#image-name
= @service.base_image_name
%h6 Tag:
%span
= @service.image_tag_name
= link_to 'View on Docker Hub', @service.docker_index_url, { target: 'blank' }
=link_to('Documentation', '#', { class: 'documentation instructions-dialog', data: {'doc-url'=> documentation_app_path(@app.id)} }) if @app.documentation_to_html.present?
.image-details
%h6 Base Image:
%span#image-name
= @service.base_image_name
%h6 Tag:
%span
= @service.image_tag_name
= link_to 'View on Docker Hub', @service.docker_index_url, { class: 'docker-link', target: 'blank', data: { 'tracking-method' => 'click', 'tracking-action' => 'View on Docker Hub', 'tracking-category' => 'Outbound Link', 'tracking-label' => @service.docker_index_url }}
.documentation
= link_to('Documentation', '#', { class: 'instructions-dialog', data: {'doc-url'=> documentation_app_path(@app.id)} }) if @app.documentation_to_html.present?

= form_for [@app, @service], html: { class: 'service-edit-form' } do |f|
= render 'shared/errors', errors: f.object.errors
Expand Down

0 comments on commit 5076c18

Please sign in to comment.