-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #206 from liqd/2017-04-pv-refactor-idea-details
refactor item detail templates
- Loading branch information
Showing
32 changed files
with
272 additions
and
315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
101 changes: 17 additions & 84 deletions
101
apps/budgeting/templates/meinberlin_budgeting/proposal_detail.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,23 @@ | ||
{% extends "base.html" %} | ||
{% load i18n rules react_comments react_ratings %} | ||
{% extends "meinberlin_contrib/item_detail.html" %} | ||
{% load rules item_tags i18n %} | ||
|
||
{% block title %}{{proposal.name}}{% endblock %} | ||
{% block content %} | ||
<div class="resource-navigation"> | ||
<div class="l-wrapper"> | ||
<nav class="resource-navigation__breadcrumbs breadcrumbs"> | ||
<ul> | ||
<li> | ||
<a href="{% url 'project-detail' proposal.project.slug %}"> | ||
<i class="fa fa-arrow-left" aria-hidden="true"></i> | ||
{% trans 'back to project' %}</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
|
||
{% has_perm 'meinberlin_budgeting.modify_proposal' request.user proposal as show_dropdown %} | ||
{% if show_dropdown %} | ||
<div class="resource-navigation__actions dropdown dropdown--right"> | ||
<button | ||
title="{% trans 'Actions' %}" | ||
type="button" | ||
class="dropdown-toggle" | ||
data-toggle="dropdown" | ||
aria-haspopup="true" | ||
aria-expanded="false" | ||
id="proposal-{{proposal.pk}}-actions" | ||
> | ||
<i class="fa fa-ellipsis-v" aria-hidden="true"></i> | ||
</button> | ||
<ul class="dropdown-menu" aria-labelledby="proposal-{{proposal.pk}}-actions"> | ||
{% has_perm 'meinberlin_budgeting.moderate_proposal' request.user proposal as is_moderator %} | ||
{% if is_moderator %} | ||
<li> | ||
<a class="dropdown-item" href="{% url 'budgeting:proposal-moderate' slug=proposal.slug %}">{% trans 'Moderate' %}</a> | ||
</li> | ||
{% endif %} | ||
<li> | ||
<a class="dropdown-item" href="{% url 'budgeting:proposal-update' slug=proposal.slug %}">{% trans 'Edit' %}</a> | ||
</li> | ||
<li> | ||
<a class="dropdown-item" href="{% url 'budgeting:proposal-delete' slug=proposal.slug %}">{% trans 'Delete' %}</a> | ||
</li> | ||
</ul> | ||
</div> | ||
{% endif %} | ||
{% block additional_meta %} | ||
<div class="resource-header__meta"> | ||
<div>{{ proposal.budget }}€</div> | ||
</div> | ||
</div> | ||
|
||
<div class="resource-header"> | ||
<div class="l-wrapper"> | ||
<div class="l-center-6"> | ||
<h1 class="resource-header__title">{{ proposal.name }}</h1> | ||
|
||
<div class="resource-header__meta"> | ||
<div>{{ proposal.budget}}€</div> | ||
</div> | ||
|
||
<div class="resource-header__meta">{{ proposal.creator.username }}</div> | ||
|
||
<div class="resource-header__meta"> | ||
{% include 'meinberlin_moderatorfeedback/includes/moderatorfeedback.html' with item=proposal %} | ||
</div> | ||
|
||
{% if proposal.category %} | ||
<div class="resource-header__meta"> | ||
<div class="label label--big">{{ proposal.category }}</div> | ||
</div> | ||
{% endif %} | ||
|
||
<div class="resource-header__action"> | ||
{% react_ratings proposal %} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="proposal-description"> | ||
<div class="l-wrapper"> | ||
<div class="l-center-6"> | ||
{{ proposal.description | safe }} | ||
</div> | ||
<div class="resource-header__meta"> | ||
{% include 'meinberlin_moderatorfeedback/includes/moderatorfeedback.html' with item=proposal %} | ||
</div> | ||
</div> | ||
{% endblock %} | ||
|
||
<div class="l-wrapper"> | ||
{% react_comments proposal %} | ||
</div> | ||
{% block dropdown_items %} | ||
{% get_item_permission object 'moderate' as moderator_perm %} | ||
{% has_perm moderator_perm request.user proposal as is_moderator %} | ||
{% if is_moderator %} | ||
<li> | ||
{% get_item_url object 'moderate' as moderate_url %} | ||
<a class="dropdown-item" href="{{ moderate_url }}">{% trans 'Moderate' %}</a> | ||
</li> | ||
{% endif %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
apps/contrib/templates/meinberlin_contrib/item_detail.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{% extends "base.html" %} | ||
{% load i18n module_tags rules react_comments react_ratings wagtailcore_tags item_tags %} | ||
|
||
{% block title %}{{object.name}}{% endblock %} | ||
{% block content %} | ||
<div class="resource-navigation"> | ||
<div class="l-wrapper"> | ||
<nav class="resource-navigation__breadcrumbs breadcrumbs"> | ||
<ul> | ||
<li> | ||
<a href="{% url 'project-detail' object.project.slug %}"> | ||
<i class="fa fa-arrow-left" aria-hidden="true"></i> | ||
{% trans 'back to project' %}</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
|
||
{% get_item_change_permission object as change_perm %} | ||
{% has_perm change_perm request.user object as show_dropdown %} | ||
|
||
{% if show_dropdown %} | ||
<div class="resource-navigation__actions dropdown dropdown--right"> | ||
<button | ||
title="{% trans 'Actions' %}" | ||
type="button" | ||
class="dropdown-toggle" | ||
data-toggle="dropdown" | ||
aria-haspopup="true" | ||
aria-expanded="false" | ||
id="idea-{{object.pk}}-actions" | ||
> | ||
<i class="fa fa-ellipsis-v" aria-hidden="true"></i> | ||
</button> | ||
<ul class="dropdown-menu" aria-labelledby="idea-{{object.pk}}-actions"> | ||
<li> | ||
{% get_item_update_url object as change_url %} | ||
<a class="dropdown-item" href="{{ change_url }}">{% trans 'Edit' %}</a> | ||
</li> | ||
<li> | ||
{% get_item_delete_url object as delete_url %} | ||
<a class="dropdown-item" href="{{ delete_url }}">{% trans 'Delete' %}</a> | ||
</li> | ||
{% block dropdown_items %}{% endblock %} | ||
</ul> | ||
</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
|
||
<div class="resource-header"> | ||
<div class="l-wrapper"> | ||
<div class="l-center-6"> | ||
<h1 class="resource-header__title">{{ object.name }}</h1> | ||
|
||
<div class="resource-header__meta">{{ object.creator.username }}</div> | ||
|
||
{% if object.category %} | ||
<div class="resource-header__meta"> | ||
<div class="label label--big">{{ object.category }}</div> | ||
</div> | ||
{% endif %} | ||
|
||
{% block additional_meta %}{% endblock %} | ||
|
||
{% if object|has_feature:"rate" %} | ||
<div class="resource-header__action"> | ||
{% react_ratings object %} | ||
</div> | ||
{% endif %} | ||
|
||
{% block additional_content %}{% endblock %} | ||
|
||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="idea-description"> | ||
<div class="l-wrapper"> | ||
<div class="l-center-6"> | ||
{{ object.description | richtext }} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="l-wrapper"> | ||
{% react_comments object %} | ||
</div> | ||
{% endblock %} |
Oops, something went wrong.