diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 9bc77d32b..82c1185f2 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -11,6 +11,11 @@ module ApplicationHelper AppConfig.version.number.present? ? AppConfig.version.number : "" end + def changelog_url + url = "https://github.com/diaspora/diaspora/blob/master/Changelog.md" + url.sub!('/master/', "/#{AppConfig.git_revision}/") if AppConfig.git_available? + end + def how_long_ago(obj) timeago(obj.created_at) end diff --git a/app/views/shared/_links.haml b/app/views/shared/_links.haml index 12d52198c..074ec453d 100644 --- a/app/views/shared/_links.haml +++ b/app/views/shared/_links.haml @@ -1,6 +1,6 @@ %li= link_to '@joindiaspora', "http://twitter.com/joindiaspora" %li= link_to 'github', "https://github.com/diaspora/diaspora" %li= link_to t('layouts.header.blog'), "http://blog.diasporafoundation.org/" -%li= link_to t('layouts.application.whats_new'), 'https://github.com/diaspora/diaspora/blob/master/Changelog.md' +%li= link_to t('layouts.application.whats_new'), changelog_url %li= link_to(t('layouts.header.code') + " " + pod_version, "#{root_path.chomp('/')}/source.tar.gz", {:title => t('layouts.application.source_package')}) unless request.url.match(/joindiaspora.com/) %li= link_to(t('layouts.application.toggle'), toggle_mobile_path)