Skip to content

Commit 01c1a90

Browse files
authoredSep 13, 2023
Merge pull request #626 from hms-dbmi/HYP-297
Hyp 297
2 parents 9bc38ae + 40f0d7c commit 01c1a90

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 4.2.1 on 2023-06-28 10:32
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('projects', '0102_agreementform_skippable'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='dataproject',
15+
name='commercial_only',
16+
field=models.BooleanField(default=False, help_text='Commercial only projects are for commercial entities only'),
17+
),
18+
]

‎app/projects/models.py

+3
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,9 @@ class DataProject(models.Model):
329329
)
330330
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")
331331

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

334337
order = models.IntegerField(blank=True, null=True, help_text="Indicate an order (lowest number = highest order) for how the DataProjects should be listed.")

‎app/templates/projects/project-blurb.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
<h4 class="panel-title">
44
<a class="collapsed" role="button" href="{% url 'projects:view-project' project.project_key %}">
55
<span style="font-size:24px; font-weight: bold;">{{ project.name }}</span>
6+
{% if project.commercial_only %}
7+
<span style="font-size: 1em; margin-bottom: 8px; margin-left: 10px;" class="badge">Commercial Only</span>
8+
{% endif %}
69
<br />
710
<br />
811
{{ project.short_description }}
912
</a>
1013
</h4>
1114
</div>
1215
</div>
13-

0 commit comments

Comments
 (0)
Please sign in to comment.