diff --git a/package/models.py b/package/models.py index c0f0596f..413f20a5 100644 --- a/package/models.py +++ b/package/models.py @@ -75,41 +75,49 @@ class Project(BaseModel): { 'id': NONE_STATUS, 'name': '----', + 'short_name': '----', 'description': '', }, { 'id': UNKNOWN, 'name': 'Unknown', + 'short_name': 'Unknown', 'description': 'Unknown project status', }, { 'id': LIVE__RELEASED, 'name': 'Live/Released', + 'short_name': 'Live/Released', 'description': 'Project is ready to use', }, { 'id': WORKING_PROTOTYPE__BETA, 'name': 'Working Prototype/Beta', + 'short_name': 'Prototype/Beta', 'description': 'Project is working however, it still can contain some bugs', }, { 'id': DEMO__ALPHA, 'name': 'Demo/Alpha', + 'short_name': 'Demo/Alpha', 'description': 'Project can be used by people which are not afraid of bugs and has very high pain threshold', }, { 'id': CONCEPT, 'name': 'Concept', + 'short_name': 'Concept', 'description': 'Project which pretends to be a working product', }, { 'id': ABANDONED__BROKEN, 'name': 'Abandoned/Broken', + 'short_name': 'Abandoned', 'description': 'Project is no longer available or it is completely broken', }, { 'id': OUT_OF_DATE__RETIRED, 'name': 'Out of Date/Retired', + 'short_name': 'Retired', 'description': 'Project is no longer needed, because of changes in ecosystem', }, @@ -428,6 +436,16 @@ def status_description(self): ) ) + @property + def short_status_name(self): + return next( + ( + status['short_name'] + for status in Project.STATUSES + if status['id'] == self.status + ) + ) + class TeamMembership(BaseModel): account = models.ForeignKey(Account, default=None, blank=True, null=True) diff --git a/static/scss/new/module/_project-tile.scss b/static/scss/new/module/_project-tile.scss index ba352b23..c6066e29 100644 --- a/static/scss/new/module/_project-tile.scss +++ b/static/scss/new/module/_project-tile.scss @@ -1,3 +1,4 @@ +@import "../base/variables"; $gallery-size: 20; @@ -13,6 +14,49 @@ $gallery-size: 20; box-shadow: 0 3px 7px rgba(0,0,0,.1); // TODO: adjust EOS color } + &__status { + background-color: black; + opacity: 0.7; + color: $m-btn-font-color-hover; + position: relative; + height: 20px; + bottom: 20px; + margin-bottom: -20px; + float: left; + width: 100%; + text-align: center; + border-bottom-style: solid; + border-bottom-width: 2px; + + &--unknown { + border-bottom-color: $status-unknown; + } + + &--live_released { + border-bottom-color: $status-live-released; + } + + &--workingprototype_beta { + border-bottom-color: $status-working-prototype-beta; + } + + &--demo_alpha { + border-bottom-color: $status-demo-alpha; + } + + &--concept { + border-bottom-color: $status-concept; + } + + &--abandoned_broken { + border-bottom-color: $status-abandoned-broken; + } + + &--outofdate_retired { + border-bottom-color: $status-out-of-date-retired; + } + } + &__details { float: left; padding-left: 30px; diff --git a/templates/package/package.html b/templates/package/package.html index c44dd4cc..bec4e732 100644 --- a/templates/package/package.html +++ b/templates/package/package.html @@ -54,7 +54,6 @@

{{ package.name }}

{% endif %} {% endif %} -
diff --git a/templates/package/templatetags/_project_tile.html b/templates/package/templatetags/_project_tile.html index b5d1d8c2..131a0072 100644 --- a/templates/package/templatetags/_project_tile.html +++ b/templates/package/templatetags/_project_tile.html @@ -3,7 +3,14 @@