diff --git a/conservancy/usethesource/admin.py b/conservancy/usethesource/admin.py index e1181c55..8d131dc1 100644 --- a/conservancy/usethesource/admin.py +++ b/conservancy/usethesource/admin.py @@ -26,6 +26,7 @@ class CandidateAdmin(admin.ModelAdmin): ] inlines = [CommentInline] prepopulated_fields = {'slug': ['name']} + view_on_site = True def save_model(self, request, obj, form, change): send_email = obj.id is None diff --git a/conservancy/usethesource/models.py b/conservancy/usethesource/models.py index 70b05b0c..4f360dfe 100644 --- a/conservancy/usethesource/models.py +++ b/conservancy/usethesource/models.py @@ -2,6 +2,7 @@ import uuid from django.contrib.auth.models import User from django.db import models +from django.urls import reverse def gen_message_id(): @@ -29,6 +30,9 @@ class Candidate(models.Model): def __str__(self): return self.name + def get_absolute_url(self): + return reverse('usethesource:candidate', kwargs={'slug': self.slug}) + class Comment(models.Model): """A comment about experiences or learnings building the candidate.""" diff --git a/conservancy/usethesource/templates/usethesource/add_comment_button_partial.html b/conservancy/usethesource/templates/usethesource/add_comment_button_partial.html index 1a370e98..806d6bea 100644 --- a/conservancy/usethesource/templates/usethesource/add_comment_button_partial.html +++ b/conservancy/usethesource/templates/usethesource/add_comment_button_partial.html @@ -1,3 +1,3 @@
- +
diff --git a/conservancy/usethesource/templates/usethesource/candidate.html b/conservancy/usethesource/templates/usethesource/candidate.html index 8d396d22..e4a20ca6 100644 --- a/conservancy/usethesource/templates/usethesource/candidate.html +++ b/conservancy/usethesource/templates/usethesource/candidate.html @@ -1,5 +1,7 @@ {% extends "usethesource/base.html" %} +{% block title %}{{ candidate.name }} - Software Freedom Conservancy{% endblock %} + {% block head %} {{ block.super }} @@ -11,10 +13,14 @@
-

{{ candidate.name }}

-

Vendor: {{ candidate.vendor }}

-

Device: {{ candidate.device }}

-

Released: {{ candidate.release_date }}

+
+

{{ candidate.name }}

+ +
+ +

Vendor: {{ candidate.vendor }}

+

Device: {{ candidate.device }}

+

Released: {{ candidate.release_date }}

Download source
@@ -22,12 +28,14 @@
-

{{ candidate.description }}

+ {{ candidate.description|linebreaks }} -

Comments

- {% for comment in candidate.comment_set.all %} - {% include "usethesource/comment_partial.html" %} - {% endfor %} + {% with comments=candidate.comment_set.all %} + {% if comments or user.is_staff %}

Comments

{% endif %} + {% for comment in comments %} + {% include "usethesource/comment_partial.html" %} + {% endfor %} + {% endwith %} {% if user.is_staff %} {% include "usethesource/add_comment_button_partial.html" %} diff --git a/conservancy/usethesource/templates/usethesource/landing_page.html b/conservancy/usethesource/templates/usethesource/landing_page.html index 391d9c3d..a5fb1147 100644 --- a/conservancy/usethesource/templates/usethesource/landing_page.html +++ b/conservancy/usethesource/templates/usethesource/landing_page.html @@ -1,20 +1,28 @@ {% extends "usethesource/base.html" %} +{% block title %}Use the Source - Software Freedom Conservancy{% endblock %} + {% block content %} {{ block.super }} -
-

Software Freedom Conservancy works to ensure that you have the right to repair and modify the software on your devices. Use The Source shows you one of the key steps in this process: how we evaluate the source code candidates that companies provide to you, as is required when they use Linux or other GPLed software (most do). Through the collaborative process shown in each candidate's comment threads, we highlight common issues in the below source candidates, and what steps need to be taken by the companies to fix them (i.e. to comply with software right to repair licenses like the GPL). You can also see examples of candidates already in compliance, which are no longer just candidates, but real "corresponding source code".

+
+ -

If you wish to let us know about a source code candidate (corresponding or not!) that you'd like us to take a look at, and possibly include in the list below, please upload the candidate to us using this form and then email us at compliance@sfconservancy.org with the filename and any other information you have about the candidate. There are many other ways you can help, regardless of whether you're a developer or not - see our Help Defend Software Freedom and Rights page for details!

+

Software Freedom Conservancy works to ensure that you have the right to repair and modify the software on your devices. Use The Source shows you one of the key steps in this process: how we evaluate the source code candidates that companies provide to you, as is required when they use Linux or other GPLed software (most do). Through the collaborative process shown in each candidate's comment threads, we highlight common issues in the below source candidates, and what steps need to be taken by the companies to fix them (i.e. to comply with software right to repair licenses like the GPL). You can also see examples of candidates already in compliance, which are no longer just candidates, but real "corresponding source code".

+

Submit a Candidate

+

If you wish to let us know about a source code candidate (corresponding or not!) that you'd like us to take a look at, and possibly include in the list below, please upload the candidate to us using this form and then email us at compliance@sfconservancy.org with the filename and any other information you have about the candidate. There are many other ways you can help, regardless of whether you're a developer or not - see our Help Defend Software Freedom and Rights page for details!

+
-

Candidates

+

Source Candidates List

{% for candidate in candidates %} -
+

{{ candidate.name }}

-

Released {{ candidate.release_date }}

+

Released {{ candidate.release_date }}

{{ candidate.description }}

{% endfor %}