-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from barrymcgee/charm-details-page
Standardise entity headers on entity detail pages
- Loading branch information
Showing
8 changed files
with
274 additions
and
330 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<div class="p-strip--light is-bordered is-shallow"> | ||
<header class="row"> | ||
<div class="col-8"> | ||
<div class="entity__title-wrap"> | ||
{% if context.entity.icon %} | ||
<img src="{{ context.entity.icon }}" alt="" width="96" id="the-icon" class="p-media-object__image is-round" /> | ||
{% endif %} | ||
<h1 itemprop="name" class="u-no-margin--bottom entity__title"> | ||
<span> | ||
{{ context.entity.display_name }} | ||
<sup class="entity__version"> | ||
#{{ context.entity.revision_number }} | ||
</sup> | ||
</span> | ||
</h1> | ||
</div> | ||
<ul class="entity__meta p-inline-list--middot"> | ||
{% if context.entity.user %} | ||
<li class="p-inline-list__item"> | ||
<span class="entity__user"> | ||
By <a | ||
href="/u/{{ context.entity.user }}">{{ context.entity.user }}</a> | ||
</span> | ||
</li> | ||
{% endif %} | ||
{% if context.entity.latest_revision and context.entity.revision_number != context.entity.latest_revision %} | ||
<li class="p-inline-list__item"> | ||
<span class="entity__latest-version"> | ||
<a href="/{{ context.entity.latest_revision['url'] }}" onclick="dataLayer.push({ | ||
'event' : 'GAEvent', | ||
'eventCategory' : 'Entity Details Link', | ||
'eventAction' : 'Goto latest version', | ||
'eventLabel' : 'Latest version (#ID)', | ||
'eventValue' : '{{ context.entity.latest_revision['full_id'] }}' | ||
});"><strong>Latest version</strong> (#{{ context.entity.latest_revision }}) | ||
</a> | ||
</span> | ||
</li> | ||
{% endif %} | ||
{% if context.entity.meta_published_info %} | ||
<li class="p-inline-list__item"> | ||
<span class="entity__channel"> | ||
{% for meta_info in context.entity.meta_published_info %} | ||
<span>{{ meta_info['Channel'] }}</span>{% if not loop.last %},{% endif %} | ||
{% endfor %} | ||
</span> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
{% if context.entity.series %} | ||
Supports: | ||
{% for supported_release in context.entity.series %} | ||
<span class="entity__supported-release {{ supported_release }}"> | ||
{{ supported_release }} | ||
</span> | ||
{% endfor %} | ||
{% endif %} | ||
</div> | ||
<div class="col-4"> | ||
<div class="p-code-snippet"> | ||
<input class="p-code-snippet__input deploy-command__field" value="{{ context.entity.id }}" | ||
readonly="readonly"> | ||
<button class="p-code-snippet__action">Copy to clipboard</button> | ||
</div> | ||
<p> | ||
<a href="https://jujucharms.com/new/?deploy-target={{ context.entity.id }}" | ||
class="p-button--positive row" rel="nofollow"> | ||
Add to new model | ||
</a> | ||
</p> | ||
</div> | ||
</header> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.