summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbrainch/models/actions.py8
-rwxr-xr-xbrainch/templates/brainch/diff.html4
-rwxr-xr-xbrainch/templates/brainch/edit.html4
-rw-r--r--brainch/templates/brainch/history.html2
-rw-r--r--brainch/templates/brainch/inc/clone_list.html2
-rw-r--r--brainch/templates/brainch/index.html2
-rw-r--r--brainch/templates/brainch/pull-request.html4
-rwxr-xr-xbrainch/templates/brainch/user-index.html2
-rwxr-xr-xbrainch/templates/brainch/view.html12
-rwxr-xr-xbrainch/views/misc/index.py2
-rwxr-xr-xbrainch/views/repositories/pull_request.py2
-rwxr-xr-xbrainch/views/repositories/view.py1
-rwxr-xr-xbrainch/views/utils.py2
-rw-r--r--mysite/static/css/brainch.css29
14 files changed, 39 insertions, 37 deletions
diff --git a/brainch/models/actions.py b/brainch/models/actions.py
index 9e10029..6cbbc66 100755
--- a/brainch/models/actions.py
+++ b/brainch/models/actions.py
@@ -61,15 +61,15 @@ class UserAction(models.Model):
message = u"<a href=\"%s\">%s</a> " \
% (profile.get_absolute_url(), self.who.username)
if self.get_what_display() == "CREATED":
- message += "<span class=\"created\">created</span> "
+ message += "<span class=\"created\">&#9055;created</span> "
message += "\"%s\"" \
% data.get("repo_name", "???")
elif self.get_what_display() == "EDITED":
- message += "<span class=\"edited\">&#2710; edited</span> "
+ message += "<span class=\"edited\">&#8605; edited</span> "
message += "\"%s\"" \
% data.get("repo_name", "???")
elif self.get_what_display() == "CLONED":
- message += "<span class=\"cloned\">&#9903; cloned</span> "
+ message += "<span class=\"cloned\">&#8887; cloned</span> "
message += "\"%s\"" \
% data.get("repo_name", "???")
message += "from %s" \
@@ -81,7 +81,7 @@ class UserAction(models.Model):
message += "\"%s\"" \
% data.get("repo_name", "???")
elif self.get_what_display() == "INVITED":
- message += "<span class=\"invited\">invited</span> "
+ message += "<span class=\"invited\">&#9993; invited</span> "
message += "%s " \
% data.get("repo_mates", "???")
message += "to synchronize his/her version of \"%s\"" \
diff --git a/brainch/templates/brainch/diff.html b/brainch/templates/brainch/diff.html
index fda30bc..9e95b03 100755
--- a/brainch/templates/brainch/diff.html
+++ b/brainch/templates/brainch/diff.html
@@ -10,8 +10,8 @@
{% block sidebar %}
<ul class="tools">
- <li><a href="{% url brainch-view repo.user repo.slug %}">Read latest version</a></li>
- <li><a href="{% url brainch-history repo.user repo.slug %}">History of the text</a></li>
+ <li>&#8620; <a href="{% url brainch-view repo.user repo.slug %}">Read latest version</a></li>
+ <li>&#8619; <a href="{% url brainch-history repo.user repo.slug %}">History of the text</a></li>
</ul>
{% endblock sidebar %}
diff --git a/brainch/templates/brainch/edit.html b/brainch/templates/brainch/edit.html
index 1ffa03f..d06528e 100755
--- a/brainch/templates/brainch/edit.html
+++ b/brainch/templates/brainch/edit.html
@@ -20,8 +20,8 @@
{% block sidebar %}
<ul class="tools">
- <li><a href='{% url brainch-view user.username repo.slug %}'>Read latest version</a></li>
- <li><a href='{% url brainch-history user.username repo.slug %}'>History of the text</a></li>
+ <li>&#8620; <a href='{% url brainch-view user.username repo.slug %}'>Read latest version</a></li>
+ <li>&#8619; <a href='{% url brainch-history user.username repo.slug %}'>History of the text</a></li>
</ul>
{% endblock sidebar %}
diff --git a/brainch/templates/brainch/history.html b/brainch/templates/brainch/history.html
index 7b99c33..8872b18 100644
--- a/brainch/templates/brainch/history.html
+++ b/brainch/templates/brainch/history.html
@@ -10,7 +10,7 @@
{% block sidebar %}
<ul class="tools">
- <li><a href='{% url brainch-view repo.user repo.slug %}'>Read latest version</a></li>
+ <li>&#8620; <a href='{% url brainch-view repo.user repo.slug %}'>Read latest version</a></li>
</ul>
{% clone_list repo %}
{% endblock sidebar %}
diff --git a/brainch/templates/brainch/inc/clone_list.html b/brainch/templates/brainch/inc/clone_list.html
index 601e926..d62b1e4 100644
--- a/brainch/templates/brainch/inc/clone_list.html
+++ b/brainch/templates/brainch/inc/clone_list.html
@@ -3,7 +3,7 @@
<ul class='other-copies'>
{% for clone in clone_list %}
<li>
- {% ifequal clone origin.origin %}*{% endifequal %}
+ {% ifequal clone origin.origin %}&#8886;{% endifequal %}
{% with clone.user as user %}
<a href="/{{ user }}">{{ user }}</a>'s
{% endwith %}
diff --git a/brainch/templates/brainch/index.html b/brainch/templates/brainch/index.html
index 80da45a..c8c3d7b 100644
--- a/brainch/templates/brainch/index.html
+++ b/brainch/templates/brainch/index.html
@@ -40,7 +40,7 @@
</div>
<div class="column column20">
<h2>Brainch Activity</h2>
- <dl>
+ <dl id='news'>
<dt>06/11/2010</dt>
<dd>Brainch presentation at Make Art, Poitiers<sup>FR</sup></p>
<dt>11/2010</dt>
diff --git a/brainch/templates/brainch/pull-request.html b/brainch/templates/brainch/pull-request.html
index ec7642e..9ec3eb2 100644
--- a/brainch/templates/brainch/pull-request.html
+++ b/brainch/templates/brainch/pull-request.html
@@ -5,8 +5,8 @@
{% block sidebar %}
<ul class="tools">
- <li><a href='{% url brainch-view repo.user repo.name %}'>Read latest version</a></li>
- <li><a href='{% url brainch-history repo.user repo.name %}'>History of the text</a></li>
+ <li>&#8620; <a href='{% url brainch-view repo.user repo.slug %}'>Read latest version</a></li>
+ <li>&#8619; <a href='{% url brainch-history repo.user repo.slug %}'>History of the text</a></li>
</ul>
{% endblock sidebar %}
diff --git a/brainch/templates/brainch/user-index.html b/brainch/templates/brainch/user-index.html
index f922b84..b9edf94 100755
--- a/brainch/templates/brainch/user-index.html
+++ b/brainch/templates/brainch/user-index.html
@@ -11,7 +11,7 @@
{% block sidebar %}
{% ifequal user.username username %}
<h2>Your tools</h2>
- <p><a href="{% url brainch-create username %}">Create a new text</a></p>
+ <p>&#9055; <a href="{% url brainch-create username %}">Create a new text</a></p>
{% endifequal %}
{% endblock %}
diff --git a/brainch/templates/brainch/view.html b/brainch/templates/brainch/view.html
index 8e30886..b122b81 100755
--- a/brainch/templates/brainch/view.html
+++ b/brainch/templates/brainch/view.html
@@ -7,20 +7,20 @@
{% block sidebar %}
<ul class="tools">
{% ifnotequal revision "HEAD" %}
- <li><a href="{% url brainch-view repo.user repo.slug %}">Read latest version</a></li>
+ <li>&#8620; <a href="{% url brainch-view repo.user repo.slug %}">Read latest version</a></li>
{% endifnotequal %}
- <li><a href="{% url brainch-history repo.user repo.slug %}">History of the text</a></li>
+ <li>&#8619; <a href="{% url brainch-history repo.user repo.slug %}">History of the text</a></li>
{% if user.is_authenticated %}
{% ifequal repo.user user %}
- <li><a href="{% url brainch-edit repo.user repo.slug %}">Edit the text</a></li>
- <li><a href="{% url brainch-pull-request repo.user repo.slug %}">Propose your changes</a></li>
+ <li>&#8605; <a href="{% url brainch-edit repo.user repo.slug %}">Edit the text</a></li>
+ <li>&#9993; <a href="{% url brainch-pull-request repo.user repo.slug %}">Propose your changes</a></li>
{% else %}
{% if clone %}
- <li><a href="{% url brainch-pull repo.user repo.slug %}">Synchronize your text</a></li>
+ <li>&#8633; <a href="{% url brainch-pull repo.user repo.slug %}">Synchronize your text</a></li>
{% else %}
- <li><a href="{% url brainch-clone repo.user repo.slug %}">Clone this text</a></li>
+ <li>&#8887; <a href="{% url brainch-clone repo.user repo.slug %}">Clone this text</a></li>
{% endif %}
{% endifequal %}
{% endif %}
diff --git a/brainch/views/misc/index.py b/brainch/views/misc/index.py
index 4b80b95..c24c3cf 100755
--- a/brainch/views/misc/index.py
+++ b/brainch/views/misc/index.py
@@ -28,7 +28,7 @@ def index(request):
repo_list = Repository.objects.all()
# Gets back the user's actions.
- action_list = UserAction.objects.all()[:15]
+ action_list = UserAction.objects.all()[:10]
ctx = {
"repo_list": repo_list,
diff --git a/brainch/views/repositories/pull_request.py b/brainch/views/repositories/pull_request.py
index 68bb09f..e97f9ec 100755
--- a/brainch/views/repositories/pull_request.py
+++ b/brainch/views/repositories/pull_request.py
@@ -34,7 +34,7 @@ def pull_request(request, username, name):
"""
Send to one's mates a request for pull
"""
- repo = Repository.objects.get(name=name, user__username=username)
+ repo = Repository.objects.get(slug=name, user__username=username)
if request.method == 'POST': # If the form has been submitted...
form = PullRequestForm(request.POST, mates=get_mate_repos(username, name), prospects=get_mate_repos(username, name, invert=True)) # A form bound to the POST data
if form.is_valid():
diff --git a/brainch/views/repositories/view.py b/brainch/views/repositories/view.py
index 8c0eb66..e982d5c 100755
--- a/brainch/views/repositories/view.py
+++ b/brainch/views/repositories/view.py
@@ -26,6 +26,7 @@ def view(request, username, name):
"""
Shows a text.
"""
+ clone = False
repo = get_object_or_404(
Repository,
diff --git a/brainch/views/utils.py b/brainch/views/utils.py
index 75a1b3f..6bc76fa 100755
--- a/brainch/views/utils.py
+++ b/brainch/views/utils.py
@@ -51,7 +51,7 @@ def get_mate_repos(username, name, invert=False):
mates = []
prospects= []
# List of users already sharing a copy
- clone_list = Repository.objects.filter(name=name).exclude(user__username=username)
+ clone_list = Repository.objects.filter(slug=name).exclude(user__username=username)
for clone in clone_list:
mates.append((clone.user.email, u"%s (%s)" % (clone.user.username, clone.user.email)))
# List of the other users
diff --git a/mysite/static/css/brainch.css b/mysite/static/css/brainch.css
index 5a1c39d..5710867 100644
--- a/mysite/static/css/brainch.css
+++ b/mysite/static/css/brainch.css
@@ -72,6 +72,14 @@ p {
margin-bottom: 18px;
}
+input[type='submit'] {
+ font-family: "Liberation Sans", Helvetica, Sans-Serif;
+ border-style: none;
+ background-color: black;
+ color: white;
+ padding: 2px;
+ text-transform: uppercase;
+}
h1#logo {
color: black;
}
@@ -220,11 +228,6 @@ form#edit-text label {
margin-bottom: 18px;
/*display: inline; */
}
-form#edit-text input[type='submit'] {
- border-style: none;
- background-color: black;
- color: white;
-}
div#login input[type='text'],
div#login input[type='password'] {
@@ -242,11 +245,6 @@ div#login label {
margin-bottom: 18px;
display: block;
}
-div#login input[type='submit'] {
- border-style: none;
- background-color: black;
- color: white;
-}
div#view-diff {
font-family: Monaco, monospace;
@@ -275,13 +273,9 @@ div#view-history dd.commit-message {
margin-bottom: 18px;
}
div#view-history input[type='submit'] {
- border-style: none;
- background-color: black;
- color: white;
position: fixed;
top: 54px;
left: 758px;
- font-family: "Liberation Sans", Helvetica, Sans-Serif;
}
@@ -306,4 +300,11 @@ div.repo_list_entry p {
margin-bottom: 0;
}
+dl#news dd {
+ margin-bottom: 18px;
+}
+ul.errorlist li {
+ background-color: yellow;
+ display: inline;
+}