Skip to content

Commit

Permalink
print view
Browse files Browse the repository at this point in the history
  • Loading branch information
vabene1111 committed Dec 26, 2019
1 parent 38bfb96 commit 2956a34
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions cookbook/templates/recipe_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
{% block content %}
<div class="row">
<div class="col col-md-9">
<h3>{{ recipe.name }} <a href="{% url 'edit_recipe' recipe.pk %}"><i class="fas fa-pencil-alt"></i></a></h3>
<h3>{{ recipe.name }} <a href="{% url 'edit_recipe' recipe.pk %}" class="d-print-none"><i class="fas fa-pencil-alt"></i></a></h3>
</div>
<div class="col col-md-3" style="text-align: right">
<div class="col col-md-3 d-print-none" style="text-align: right">
<button class="btn btn-success" onclick="$('#bookmarkModal').modal({'show':true})"><i
class="fas fa-bookmark"></i></button>
</div>
Expand All @@ -29,7 +29,7 @@ <h3>{{ recipe.name }} <a href="{% url 'edit_recipe' recipe.pk %}"><i class="fas

{% if recipe.internal %}
<small>{% trans 'by' %} {{ recipe.created_by.username }}<br/></small>
<br/>
<br/>
{% endif %}

{% if recipe.all_tags %}
Expand Down Expand Up @@ -63,7 +63,7 @@ <h4 class="card-title">{% trans 'Ingredients' %}</h4>
</div>
<div class="col col-md-3">

<div class="input-group">
<div class="input-group d-print-none">
<input type="number" value="1" maxlength="3" class="form-control" id="in_factor"
onchange="reloadIngredients()"/>
<div class="input-group-append">
Expand Down Expand Up @@ -117,8 +117,9 @@ <h4 class="card-title">{% trans 'Ingredients' %}</h4>
{% endif %}

{% if recipe.storage %}
<a href='#' onClick='openRecipe({{ recipe.id }}, true)'>{% trans 'View external recipe' %} <i
class="fas fa-external-link-alt"></i></a>
<a href='#' onClick='openRecipe({{ recipe.id }}, true)' class="d-print-none">{% trans 'View external recipe' %}
<i
class="fas fa-external-link-alt"></i></a>
{% endif %}

{% if not recipe.internal %}
Expand Down Expand Up @@ -147,23 +148,25 @@ <h5 class="card-title">{% trans 'External recipe' %}</h5>
<br/>

<h5>{% trans 'Comments' %}</h5>
<div class="d-print-none">

<form method="POST" class="post-form">
{% csrf_token %}
<div class="input-group mb-3">
<form method="POST" class="post-form">
{% csrf_token %}
<div class="input-group mb-3">
<textarea name="comment-text" cols="15" rows="2" class="textarea form-control" required
id="comment-id_text"></textarea>
<div class="input-group-append">
<input type="submit" value="{% trans 'Comment' %}" class="btn btn-success">
<div class="input-group-append">
<input type="submit" value="{% trans 'Comment' %}" class="btn btn-success">
</div>
</div>
</div>
</form>
</form>
</div>

{% for c in comments %}
<div class="card">
<div class="card-body">
<small class="card-title">{{ c.updated_at }} {% trans 'by' %} {{ c.created_by.username }}</small> <a
href="{% url 'edit_comment' c.pk %}"><i class="fas fa-pencil-alt"></i></a><br/>
href="{% url 'edit_comment' c.pk %}" class="d-print-none"><i class="fas fa-pencil-alt"></i></a><br/>
{{ c.text }}
</div>
</div>
Expand Down

0 comments on commit 2956a34

Please sign in to comment.