savoirfairelinux / sous-chef

Sous-Chef is a web application to help organizations to plan and deliver meals, and to manage clients files.
GNU Affero General Public License v3.0
67 stars 45 forks source link

Fixed #743: display git information. #780

Closed lingxiaoyang closed 7 years ago

lingxiaoyang commented 7 years ago

Fixes #743 by lingxiaoyang

Changes proposed in this pull request:

Status

How to verify this change

N/A

Deployment notes and migration

N/A

New translatable strings

N/A

Additional notes

If applicable, explain the rationale behind your change.

lingxiaoyang commented 7 years ago

@kousu Does this meet your requirements?

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.02%) to 95.359% when pulling 873f5a56e7d94a1282cb194fd8d6a9277c234ada on lingxiaoyang:dev into 26fe5eff80490acb44777f1970ad41a5d65b8e27 on savoirfairelinux:dev.

kousu commented 7 years ago

Hi @lingxiaoyang ! I'm sorry I didn't see this sooner (I've been fiddling with my mail server and spam settings and maybe banned github temporarily). This looks perfect to me! What do you think @lamontfr ?

erozqba commented 7 years ago

@lingxiaoyang I was yesterday with @lamontfr and in the screen of our laptop it doesn't show all the text, we only see the first part because the other is not visible and there is not a scroll bar. I suggest this changes:

diff --git a/src/sous_chef/templates/base.html b/src/sous_chef/templates/base.html
index 84de9e3..474a169 100644
--- a/src/sous_chef/templates/base.html
+++ b/src/sous_chef/templates/base.html
@@ -53,6 +53,19 @@
                 <img src="{% static 'images/logo-souschef-coul.png' %}" class="ui centered small image">
                 <div class="ui horizontal inverted small divided link list">
                     <p><i class="code yellow icon"></i> {% trans "with" %} &nbsp;<i class="heart yellow icon"></i> {% trans "in Montreal" %}</p>
+                    <small>
+                        {% if GIT_HEAD %}
+                            <span style="color:aqua;">
+                               | Git HEAD: {{ GIT_HEAD|slice:":7" }} |
+                            </span>
+                        {% endif %}
+
+                        {% if GIT_TAG %}
+                            <span style="color:aqua;">
+                                | Git tag: {{ GIT_TAG }} |
+                            </span>
+                        {% endif %}
+                    </small>
                 </div>
             </div>
         </footer>
diff --git a/src/sous_chef/templates/system/menu.html b/src/sous_chef/templates/system/menu.html
index 81d45a6..c795634 100644
--- a/src/sous_chef/templates/system/menu.html
+++ b/src/sous_chef/templates/system/menu.html
@@ -50,13 +50,9 @@
     <a class="item" href="{% url 'billing:list' %}"><i class="dollar icon"></i>{% trans 'Billing' %}</a>
     {% if request.user.is_superuser %}<a class="item" href="{% url 'admin:index' %}"><i class="settings icon"></i>{% trans 'Admin' %}</a>{% endif %}
     <a href="{% url 'page:logout' %}" class="item"><i class="sign out icon"></i>{% trans 'Logout' %}</a>
-    <br />
-    <p style="color:aqua;"> {{ SC_ENVIRONMENT_NAME }} {{ SC_VERSION }}</p>
-    {% if GIT_HEAD %}
-    <p style="color:aqua;">Git HEAD: {{ GIT_HEAD|slice:":7" }}</p>
-    {% endif %}
-
-    {% if GIT_TAG %}
-    <p style="color:aqua;">Git tag: {{ GIT_TAG }}</p>
-    {% endif %}
+</div>
+<div class="item">
+    <strong class="ui center aligned container" style="color:aqua;">
+        {{ SC_ENVIRONMENT_NAME }} {{ SC_VERSION }}
+    </strong>
 </div>

So this will put in the footer the GIT HEAD and the GIT TAG, are you OK with this?

image

lamontfr commented 7 years ago

@erozqba @lingxiaoyang I agree with Ernesto's suggestion.

lingxiaoyang commented 7 years ago

@lamontfr @erozqba It's interesting. I didn't test on a small screen...

Let's do this.

erozqba commented 7 years ago

@lingxiaoyang I'm just waiting for your commit to merge!

erozqba commented 7 years ago

This work has already been merged in PR #800.

kousu commented 7 years ago

Congratulations!

Le 15 août 2017 22:32:22 HAE, Ernesto Rodriguez Ortiz notifications@github.com a écrit :

Closed #780.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/savoirfairelinux/sous-chef/pull/780#event-1207507509

-- kousu