Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

fix 404 when clicking on old version warning button #401

Closed
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
5 changes: 5 additions & 0 deletions app/components/guides-article.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,10 @@ export default Component.extend({
codeBlock.innerHTML = lines.join('\n');
})

},
actions: {
selectVersion (currentVersion) {
this.selectVersion(currentVersion);
}
}
});
3 changes: 1 addition & 2 deletions app/templates/components/guides-article.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{{#unless (eq version currentVersion)}}
<div class="old-version-warning">
<i class="icon-attention-circled"></i><strong>Old Guides - </strong>You are viewing the guides for Ember {{version}}.

{{#link-to 'version.show' 'release' path class="btn"}} VIEW {{currentVersion}} {{/link-to}}
<button onclick={{action "selectVersion" currentVersion}} class="btn">VIEW {{currentVersion}} </button>
</div>
{{/unless}}

Expand Down
2 changes: 1 addition & 1 deletion app/templates/version/index.hbs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{guides-article model=model.content pages=model.pages path='index' version=model.version currentVersion=model.currentVersion}}
{{guides-article model=model.content pages=model.pages path='index' version=model.version currentVersion=model.currentVersion selectVersion=(action 'selectVersion')}}
2 changes: 1 addition & 1 deletion app/templates/version/show.hbs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{guides-article model=model.content pages=model.pages path=model.path version=model.version currentVersion=model.currentVersion}}
{{guides-article model=model.content pages=model.pages path=model.path version=model.version currentVersion=model.currentVersion selectVersion=(action 'selectVersion')}}