From cef112efc3502e14b37ead4fa624d25744f74e0c Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Tue, 16 Oct 2012 00:14:43 +0600 Subject: [PATCH] [refs #579] first version of the outdated diff --- app/views/projects/pull_requests/_activity.html.haml | 10 +++++++++- config/locales/models/pull_request.en.yml | 3 ++- config/locales/models/pull_request.ru.yml | 3 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/views/projects/pull_requests/_activity.html.haml b/app/views/projects/pull_requests/_activity.html.haml index bd131b305..3f868e607 100644 --- a/app/views/projects/pull_requests/_activity.html.haml +++ b/app/views/projects/pull_requests/_activity.html.haml @@ -10,6 +10,14 @@ -elsif item.is_a? Array =render 'projects/git/commits/commits_small', :commits => commits_queue if commits_queue.present? -commits_queue.clear - =render 'projects/pull_requests/discussion_comments', :item => item, :add_id => nil + -unless item[1].first.data[:actual] + -exp_id = "expand-comment#{item[1].first.id}" + .activity + =t '.show_outdated_diff' + %span.data-expander.collapsed{:id => exp_id}   + .hidden{:id => "content-#{exp_id}"} + =render 'projects/pull_requests/discussion_comments', :item => item, :add_id => nil + -else + =render 'projects/pull_requests/discussion_comments', :item => item, :add_id => nil =render 'projects/git/commits/commits_small', :commits => commits_queue if commits_queue.present? diff --git a/config/locales/models/pull_request.en.yml b/config/locales/models/pull_request.en.yml index 7bc790a7e..c9f002c1c 100644 --- a/config/locales/models/pull_request.en.yml +++ b/config/locales/models/pull_request.en.yml @@ -28,7 +28,8 @@ en: ready: Ready merged: Merged closed: Closed - + activity: + show_outdated_diff: Show outdated_diff pull_requests: tabs: discussion: Discussion diff --git a/config/locales/models/pull_request.ru.yml b/config/locales/models/pull_request.ru.yml index 6aff6b4c8..ccc46fd70 100644 --- a/config/locales/models/pull_request.ru.yml +++ b/config/locales/models/pull_request.ru.yml @@ -30,7 +30,8 @@ ru: ready: Готов к мержу merged: Смержен closed: Закрыт - + activity: + show_outdated_diff: Отобразить устаревшие изменения pull_requests: tabs: discussion: Дискуссия