From a6f71e96415673143d56ebe781bd69a7d06b8edc Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 19 2014 10:46:00 +0000 Subject: If the repo is empty inform the user and tell the user how to initialize it --- diff --git a/progit/templates/repo_info.html b/progit/templates/repo_info.html index 4a48847..6770324 100644 --- a/progit/templates/repo_info.html +++ b/progit/templates/repo_info.html @@ -16,71 +16,94 @@ {% if branchname %} ({{ branchname }}) {% endif %} +{% if repo_obj and repo_obj.is_empty %} -
-

Branches

- -
+

If you already have a git repo:

+
+      git remote add origin https://githosted.org/{{ repo.name }}.git
+      git push -u origin master
+    
-{% if total_page %} - - -
- {% if page > 1%} - - < Previous - +

If you have no create your git repo yet:

+
+      touch README.rst
+      git init
+      git add README.rst
+      git commit -m "Add README file"
+      git remote add origin https://githosted.org/{{ repo.name }}.git
+      git push -u origin master
+    
+ + + +{% else %} +
+

Branches

+ +
+ + {% if total_page %} + + + + + - - + -
+ {% if page > 1%} + < Previous + + {% else %} + < Previous + {% endif %} + {{ page }} / {{ total_page }} + {% if page < total_page %} + + Next > + + {% else %} + Next > {% endif %} - {{ page }} / {{ total_page }} - {% if page < total_page %} - - Next > - - {% else %} - Next > - {% endif %} -
-{% endif %} - -
- {% if origin != 'view_log' %} -

Last 10 commits

- {% else %} -

Commits list

+
{% endif %} -