mozilla

Revision 328339 of Template:PreviousNext

  • Revision slug: Template:PreviousNext
  • Revision title: Template:PreviousNext
  • Revision id: 328339
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment
Tags: 

Revision Content

<% /* first parameter: path of Previous page */ /* second parameter: path of Next page */ var lang = env.locale; var s_PreviousNext = mdn.localString({ "en-US": ["« Previous","Next »"], "cs": ["« Předchozí","Následující »"], "de": ["« zurück","weiter »"], "es": ["« Anterior","Siguiente »"], "fr": ["« Précédent","Suivant »"], "ja": ["« 前","次 »"], "ko": ["« 이전","다음 »"], "pl": ["« Poprzedni","Następny »"], "pt-PT": ["« Anterior","Próxima »"], "ru": ["« Предыдущая статья","Следующая статья »"], "zh-CN": ["« 上一页","下一页 »"], "zh-TW": ["« 前頁","次頁 »"] }); var strPrevious = ""; var strNext = "
"; if ($0) { strPrevious = "" + s_PreviousNext[0] + ""; } if ($1) { strNext = "" + s_PreviousNext[1] + ""; } %>

<%- strPrevious %><%- strNext %>

Revision Source

<%
/* first parameter: path of Previous page */
/* second parameter: path of Next page */
var lang = env.locale;
var s_PreviousNext = mdn.localString({
  "en-US": ["« Previous","Next »"],
  "cs": ["« Předchozí","Následující »"],
  "de": ["« zurück","weiter »"],
  "es": ["« Anterior","Siguiente »"],
  "fr": ["« Précédent","Suivant »"],
  "ja": ["« 前","次 »"],
  "ko": ["« 이전","다음 »"],
  "pl": ["« Poprzedni","Następny »"],
  "pt-PT": ["« Anterior","Próxima »"],
  "ru": ["« Предыдущая статья","Следующая статья »"],
  "zh-CN": ["« 上一页","下一页 »"],
  "zh-TW": ["« 前頁","次頁 »"]
});
var strPrevious = "";
var strNext = "<br>";

if ($0) {
  strPrevious = "<a style='float: left;' href='/" + lang + "/docs/" + string.replace($0, ' ', '_') + "'>" + s_PreviousNext[0] + "</a>";
}

if ($1) {
  strNext = "<a href='/" + lang + "/docs/" + string.replace($1, ' ', '_') + "'>" + s_PreviousNext[1] + "</a>";
}


%><div class="prevnext">
    <p align="right"><%- strPrevious %><%- strNext %></p>
</div>