[gitg] Show committer date in commit info



commit 147f8f6d5cfc53ec0616e8f1bbabba6db759b0b1
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Sun Mar 15 11:11:05 2015 +0100

    Show committer date in commit info

 libgitg/resources/ui/diff-view/diff-view.css  |   12 +++++++++++-
 libgitg/resources/ui/diff-view/diff-view.html |    6 +++---
 libgitg/resources/ui/diff-view/diff-view.js   |    8 +++++---
 3 files changed, 19 insertions(+), 7 deletions(-)
---
diff --git a/libgitg/resources/ui/diff-view/diff-view.css b/libgitg/resources/ui/diff-view/diff-view.css
index 09a278a..7eae61b 100644
--- a/libgitg/resources/ui/diff-view/diff-view.css
+++ b/libgitg/resources/ui/diff-view/diff-view.css
@@ -40,6 +40,11 @@ div#diff div.file.background table.file {
   height: 100%;
 }
 
+div.author-info {
+  min-height: 50px;
+  padding-top: 6px;
+}
+
 img.avatar {
   float: left;
   margin-right: 10px;
@@ -231,7 +236,12 @@ div.commit .date, div.commit .sha1 {
 
 div.commit .committer {
   font-size: 0.8em;
-  display: none;
+  display: inline-block;
+  margin-top: 3px;
+}
+
+div.commit .committer .date {
+  font-size: 1em;
 }
 
 div.commit .sha1 {
diff --git a/libgitg/resources/ui/diff-view/diff-view.html b/libgitg/resources/ui/diff-view/diff-view.html
index 070d4f1..d12e9fb 100644
--- a/libgitg/resources/ui/diff-view/diff-view.html
+++ b/libgitg/resources/ui/diff-view/diff-view.html
@@ -39,11 +39,11 @@
           <div class="parent-chooser" data-id="parent_chooser">
           </div>
           <img class="avatar" data-id="avatar" src="gitg-diff:/icon/avatar-default-symbolic?size=50"/>
-          <p>
+          <div class="author-info">
             <span class="author" data-id="author"></span><br/>
-            <span class="author committer" data-id="committed-by"></span>
             <span class="date" data-id="date"></span>
-          </p>
+            <div class="author committer" data-id="committed-by"></div>
+          </div>
           <p class="message" data-id="message"></p>
           <p data-id="notes_container">
             <span class="notes" data-id="notes"></span><br/>
diff --git a/libgitg/resources/ui/diff-view/diff-view.js b/libgitg/resources/ui/diff-view/diff-view.js
index 7fdbd95..f6b7dd4 100644
--- a/libgitg/resources/ui/diff-view/diff-view.js
+++ b/libgitg/resources/ui/diff-view/diff-view.js
@@ -180,12 +180,14 @@ function write_commit(content, commit)
        // Committer
        if (commit.author.name !== commit.committer.name ||
            commit.author.email !== commit.committer.email) {
-               elems['committed-by'].html(author_to_html(commit.committer, 
settings.strings.committed_by).append($('<br>')));
-               elems['committed-by'].show();
+               var elem = author_to_html(commit.committer, settings.strings.committed_by);
+               elem.append($('<br>')).append($('<span class="date"/>').text(commit.committer.time));
+
+               elems['committed-by'].html(elem);
        }
        else
        {
-               elems['committed-by'].hide();
+               elems['committed-by'].html('');
        }
 
        // Date


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]