diff --git a/conservancy/usethesource/admin.py b/conservancy/usethesource/admin.py index e1181c5540cf95b9a07fa4b3dd13272723b4f9d8..8d131dc1502dce9e2c77249e0d6cca5a857f7733 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 70b05b0cae7da8b197c6b120698865185d6d8acf..4f360dfee3b235f1b24925e388ee90297b93e72c 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 1a370e98f8094acfcb1ea4629328ecfc598751a6..806d6beadaf96a3b4394cdaf899f79982117f4b6 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 8d396d227e3ffdcf6c14dd1fac086cfd41b3dc19..e4a20ca6a610502c604a70774ad06fad5f8dd460 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 391d9c3d8e47da9d12a5c270f141f5bc6317e80a..a5fb11473a8f1eb94547dae745c593a4b3fc87c6 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".

+
+

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 %}