Skip to content

Commit

Permalink
Merge pull request #626 from hms-dbmi/HYP-297
Browse files Browse the repository at this point in the history
Hyp 297
  • Loading branch information
b32147 authored Sep 13, 2023
2 parents a10ae56 + df9baa1 commit e2fd713
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
18 changes: 18 additions & 0 deletions app/projects/migrations/0103_dataproject_commercial_only.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 4.2.1 on 2023-06-28 10:32

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('projects', '0102_agreementform_skippable'),
]

operations = [
migrations.AddField(
model_name='dataproject',
name='commercial_only',
field=models.BooleanField(default=False, help_text='Commercial only projects are for commercial entities only'),
),
]
3 changes: 3 additions & 0 deletions app/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,9 @@ class DataProject(models.Model):
)
teams_source_message = models.TextField(default="Teams approved there will be automatically added to this project but will need still need approval for this project.", blank=True, null=True, verbose_name="Teams Source Message")

# Set this to show badging to indicate that only commercial entities should apply for access
commercial_only = models.BooleanField(default=False, blank=False, null=False, help_text="Commercial only projects are for commercial entities only")

show_jwt = models.BooleanField(default=False, blank=False, null=False)

order = models.IntegerField(blank=True, null=True, help_text="Indicate an order (lowest number = highest order) for how the DataProjects should be listed.")
Expand Down
4 changes: 3 additions & 1 deletion app/templates/projects/project-blurb.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
<h4 class="panel-title">
<a class="collapsed" role="button" href="{% url 'projects:view-project' project.project_key %}">
<span style="font-size:24px; font-weight: bold;">{{ project.name }}</span>
{% if project.commercial_only %}
<span style="font-size: 1em; margin-bottom: 8px; margin-left: 10px;" class="badge">Commercial Only</span>
{% endif %}
<br />
<br />
{{ project.short_description }}
</a>
</h4>
</div>
</div>

0 comments on commit e2fd713

Please sign in to comment.