From 562ad02a6da7323b3ec5e2b0259ee1f17935d5f6 Mon Sep 17 00:00:00 2001 From: Jakub Stasiak Date: Thu, 14 May 2015 00:14:24 +0200 Subject: [PATCH] Add file permalink button The button appears when a file is viewed in a branch or a tag. It points to a URL containing the branch's (or tag's) current commit id so that it'll always point to the same content. --- conf/locale/locale_de-DE.ini | 1 + conf/locale/locale_en-US.ini | 1 + conf/locale/locale_es-ES.ini | 1 + conf/locale/locale_fr-FR.ini | 1 + conf/locale/locale_ja-JP.ini | 1 + conf/locale/locale_lv-LV.ini | 1 + conf/locale/locale_nl-NL.ini | 1 + conf/locale/locale_pl-PL.ini | 1 + conf/locale/locale_pt-BR.ini | 1 + conf/locale/locale_ru-RU.ini | 1 + conf/locale/locale_zh-CN.ini | 1 + conf/locale/locale_zh-HK.ini | 1 + templates/repo/view_file.tmpl | 5 +++++ 13 files changed, 17 insertions(+) diff --git a/conf/locale/locale_de-DE.ini b/conf/locale/locale_de-DE.ini index f3737f709d18..434040a1f572 100755 --- a/conf/locale/locale_de-DE.ini +++ b/conf/locale/locale_de-DE.ini @@ -341,6 +341,7 @@ releases=Veröffentlichungen file_raw=Roh file_history=Verlauf file_view_raw=Ansicht Roh +file_permalink=Permalink commits.commits=Commits commits.search=Durchsuche Commits diff --git a/conf/locale/locale_en-US.ini b/conf/locale/locale_en-US.ini index 841e4201bd63..d7c4e0ec1ca1 100644 --- a/conf/locale/locale_en-US.ini +++ b/conf/locale/locale_en-US.ini @@ -343,6 +343,7 @@ releases = Releases file_raw = Raw file_history = History file_view_raw = View Raw +file_permalink = Permalink commits.commits = Commits commits.search = Search commits diff --git a/conf/locale/locale_es-ES.ini b/conf/locale/locale_es-ES.ini index 75f5bd3096bf..42ec40e29f99 100755 --- a/conf/locale/locale_es-ES.ini +++ b/conf/locale/locale_es-ES.ini @@ -343,6 +343,7 @@ releases=Releases file_raw=Raw file_history=Histórico file_view_raw=Ver Raw +file_permalink=Permalink commits.commits=Commits commits.search=Buscar Commits diff --git a/conf/locale/locale_fr-FR.ini b/conf/locale/locale_fr-FR.ini index cd7063f9538d..f2549b55635d 100755 --- a/conf/locale/locale_fr-FR.ini +++ b/conf/locale/locale_fr-FR.ini @@ -341,6 +341,7 @@ releases=Publications file_raw=Raw file_history=Historique file_view_raw=Voir le Raw +file_permalink=Permalink commits.commits=Commissions commits.search=Rechercher des commissions diff --git a/conf/locale/locale_ja-JP.ini b/conf/locale/locale_ja-JP.ini index 1f5faa3d7b42..cffdf08f3d47 100755 --- a/conf/locale/locale_ja-JP.ini +++ b/conf/locale/locale_ja-JP.ini @@ -341,6 +341,7 @@ releases=リリース file_raw=生データ file_history=履歴 file_view_raw=生データを見る +file_permalink=Permalink commits.commits=コミット commits.search=コミットの検索 diff --git a/conf/locale/locale_lv-LV.ini b/conf/locale/locale_lv-LV.ini index 93dad754225c..1e7da6c0743c 100755 --- a/conf/locale/locale_lv-LV.ini +++ b/conf/locale/locale_lv-LV.ini @@ -341,6 +341,7 @@ releases=Laidieni file_raw=Neapstrādāts file_history=Vēsture file_view_raw=Rādīt neapstrādātu +file_permalink=Permalink commits.commits=Revīzijas commits.search=Meklēt revīzijas diff --git a/conf/locale/locale_nl-NL.ini b/conf/locale/locale_nl-NL.ini index 5f39e42dca2c..483c35638c00 100755 --- a/conf/locale/locale_nl-NL.ini +++ b/conf/locale/locale_nl-NL.ini @@ -343,6 +343,7 @@ releases=Publicaties file_raw=Ruwe file_history=Geschiedenis file_view_raw=Weergave ruwe +file_permalink=Permalink commits.commits=Commits commits.search=Zoeken diff --git a/conf/locale/locale_pl-PL.ini b/conf/locale/locale_pl-PL.ini index e8a4a29d274b..bb3bc5ca95de 100755 --- a/conf/locale/locale_pl-PL.ini +++ b/conf/locale/locale_pl-PL.ini @@ -343,6 +343,7 @@ releases=Wydania file_raw=Czysty file_history=Historia file_view_raw=Zobacz czysty +file_permalink=Permalink commits.commits=Commity commits.search=Przeszukaj commity diff --git a/conf/locale/locale_pt-BR.ini b/conf/locale/locale_pt-BR.ini index 055d4dec34b4..82d9a7f59b51 100755 --- a/conf/locale/locale_pt-BR.ini +++ b/conf/locale/locale_pt-BR.ini @@ -341,6 +341,7 @@ releases=Lançamentos file_raw=Cru file_history=Histórico file_view_raw=Ver cru +file_permalink=Permalink commits.commits=Commits commits.search=Pesquisar commits diff --git a/conf/locale/locale_ru-RU.ini b/conf/locale/locale_ru-RU.ini index ac1e2c6a1caf..66c5b6a4c291 100755 --- a/conf/locale/locale_ru-RU.ini +++ b/conf/locale/locale_ru-RU.ini @@ -341,6 +341,7 @@ releases=Релизы file_raw=Исходник file_history=История file_view_raw=Посмотреть исходник +file_permalink=Permalink commits.commits=Коммиты commits.search=Поиск коммитов diff --git a/conf/locale/locale_zh-CN.ini b/conf/locale/locale_zh-CN.ini index 347e6976395a..da9435108e5a 100755 --- a/conf/locale/locale_zh-CN.ini +++ b/conf/locale/locale_zh-CN.ini @@ -343,6 +343,7 @@ releases=版本发布 file_raw=原始文件 file_history=文件历史 file_view_raw=查看原始文件 +file_permalink=Permalink commits.commits=次代码提交 commits.search=搜索提交历史 diff --git a/conf/locale/locale_zh-HK.ini b/conf/locale/locale_zh-HK.ini index 92a391694649..660221091fcd 100755 --- a/conf/locale/locale_zh-HK.ini +++ b/conf/locale/locale_zh-HK.ini @@ -341,6 +341,7 @@ releases=版本發佈 file_raw=原始文件 file_history=文件歷史 file_view_raw=查看原始文件 +file_permalink=Permalink commits.commits=次代碼提交 commits.search=搜索提交歷史 diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index d33cc950236d..4d11170bd0cf 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -12,6 +12,11 @@ {{.FileName}}{{FileSize .FileSize}} {{end}} {{if not .ReadmeInList}} + {{if not .IsCommit}} + + + + {{end}}