Skip to content

Commit

Permalink
fix(resource/comment.html, utilization/details.html): narrow the area…
Browse files Browse the repository at this point in the history
… of if sentence
  • Loading branch information
To-Ki-O committed May 15, 2024
1 parent c56df31 commit 04283ea
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 159 deletions.
79 changes: 26 additions & 53 deletions ckanext/feedback/templates/resource/comment.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,65 +136,38 @@ <h4 class="reply">{{ reply.created.strftime('%Y/%m/%d %H:%M') }}</h4>
</div>
</article>

{% if h.is_base_public_folder_bs3() %}
<div id="reply-form-window" class="modal fade" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<form id="reply-form" class="top-centered-content" action="{{ url_for('resource_comment.reply', resource_id=resource.id ) }}" method="post">
<input type="hidden" id="selected_resource_comment_id" name="resource_comment_id">
<div class="modal-header">
<div id="reply-form-window" class="modal fade" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<form id="reply-form" class="top-centered-content" action="{{ url_for('resource_comment.reply', resource_id=resource.id ) }}" method="post">
<input type="hidden" id="selected_resource_comment_id" name="resource_comment_id">
<div class="modal-header">
{% if h.is_base_public_folder_bs3() %}
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<div class="modal-body">
<h4 id="selected_comment_header"></h4>
<p class="content-align wrap-text" id="selected_comment"></p>
<div class="form-group control-full">
<label class="control-label" for="code">{{ _('Input') }}</label>
<div class="controls">
<textarea id="reply_content" name="reply_content" cols="20" rows="3" placeholder="" class="form-control"></textarea>
</div>
<div>
<p id="reply-error" class="alert alert-error" style="display: none;">{{ _('Please enter your reply') }}</p>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" onclick="return checkReplyExists();">{{ _('Send') }}</button>
</div>
</form>
</div>
</div>
</div>
{% else %}
<div id="reply-form-window" class="modal fade" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<form id="reply-form" class="top-centered-content" action="{{ url_for('resource_comment.reply', resource_id=resource.id ) }}" method="post">
<input type="hidden" id="selected_resource_comment_id" name="resource_comment_id">
<div class="modal-header">
{% else %}
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<h4 id="selected_comment_header"></h4>
<p class="content-align wrap-text" id="selected_comment"></p>
<div class="form-group control-full">
<label class="control-label" for="code">{{ _('Input') }}</label>
<div class="controls ">
<textarea id="reply_content" name="reply_content" cols="20" rows="3" placeholder="" class="form-control"></textarea>
</div>
<div>
<p id="reply-error" class="alert alert-error" style="display: none;">{{ _('Please enter your reply') }}</p>
</div>
{% endif %}
</div>
<div class="modal-body">
<h4 id="selected_comment_header"></h4>
<p class="content-align wrap-text" id="selected_comment"></p>
<div class="form-group control-full">
<label class="control-label" for="code">{{ _('Input') }}</label>
<div class="controls">
<textarea id="reply_content" name="reply_content" cols="20" rows="3" placeholder="" class="form-control"></textarea>
</div>
<div>
<p id="reply-error" class="alert alert-error" style="display: none;">{{ _('Please enter your reply') }}</p>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" onclick="return checkReplyExists();">{{ _('Send') }}</button>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" onclick="return checkReplyExists();">{{ _('Send') }}</button>
</div>
</form>
</div>
</div>
{% endif %}
</div>
{% endblock -%}

{% block secondary %}{% endblock %}
Expand Down
158 changes: 52 additions & 106 deletions ckanext/feedback/templates/utilization/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,131 +109,77 @@ <h4>
</div>
</article>

{% if h.is_base_public_folder_bs3() %}
<div id="issue-resolution-form" class="modal fade" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<form name="issue_resolution_form" class="top-centered-content" action="{{ url_for('utilization.create_issue_resolution', utilization_id=utilization_id ) }}" method="post">
<div class="modal-header">
<div id="issue-resolution-form" class="modal fade" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<form name="issue_resolution_form" class="top-centered-content" action="{{ url_for('utilization.create_issue_resolution', utilization_id=utilization_id ) }}" method="post">
<div class="modal-header">
{% if h.is_base_public_folder_bs3() %}
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h2 class="modal-title">{{ _('Certification of issue resolution') }}</h2>
</div>
<div class="modal-body">
<div>
<p><small>{{ _('What is certification of issue resolution?') }}</small></p>
<p><small>{{ _('If it is determined that the content of the utilization method leads to the solution of the problem, it can be certified as a problem solution.') }}</small></p>
</div>
<div class="form-group control-full">
<label class="control-label" for="code">{{ _('Resolved Issue') }}</label>
<div class="controls">
<textarea id="description" name="description" cols="20" rows="3" placeholder="" class="form-control"></textarea>
</div>
<div>
<p id="description-error" class="alert alert-error" style="display: none;">{{ _('Please enter your issue resolution content') }}</p>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" onclick="return checkDescriptionExists()">{{ _('Certificate') }}</button>
</div>
</form>
</div>
</div>
</div>

<div id="issue-resolution-detail" class="modal fade" tabindex="-1">
<div class="modal-dialog modal-dialog-centered modal-lg">
<div class="modal-content">
<div class="modal-header">
<h2 class="modal-title">{{ _('Resolved Issue details') }}</h>
<button type="button" class="close" data-dismiss="modal">&times;</button>
</div>
<div id="issue-resolution-table" class="modal-body">
<div>
<table class="table table-bordered table-striped table-responsive">
<thead class="table-header">
<tr>
<th class="col-md-3">{{ _('Certificated') }}</th>
<th>{{ _('Resolved Issue') }}</th>
</tr>
</thead>
<tbody>
{% for issue_resolution in issue_resolutions %}
<tr>
<td>{{ issue_resolution.created.strftime('%Y/%m/%d %H:%M:%S') }}</td>
<td class="multiple-line">{{ issue_resolution.description }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
{% else %}
<div id="issue-resolution-form" class="modal fade" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<form name="issue_resolution_form" class="top-centered-content" action="{{ url_for('utilization.create_issue_resolution', utilization_id=utilization_id ) }}" method="post">
<div class="modal-header">
{% else %}
<h2 class="modal-title">{{ _('Certification of issue resolution') }}</h2>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
{% endif %}
</div>
<div class="modal-body">
<div>
<p><small>{{ _('What is certification of issue resolution?') }}</small></p>
<p><small>{{ _('If it is determined that the content of the utilization method leads to the solution of the problem, it can be certified as a problem solution.') }}</small></p>
</div>
<div class="modal-body">
<div>
<p><small>{{ _('What is certification of issue resolution?') }}</small></p>
<p><small>{{ _('If it is determined that the content of the utilization method leads to the solution of the problem, it can be certified as a problem solution.') }}</small></p>
<div class="form-group control-full">
<label class="control-label" for="code">{{ _('Resolved Issue') }}</label>
<div class="controls">
<textarea id="description" name="description" cols="20" rows="3" placeholder="" class="form-control"></textarea>
</div>
<div class="form-group control-full">
<label class="control-label" for="code">{{ _('Resolved Issue') }}</label>
<div class="controls">
<textarea id="description" name="description" cols="20" rows="3" placeholder="" class="form-control"></textarea>
</div>
<div>
<p id="description-error" class="alert alert-error" style="display: none;">{{ _('Please enter your issue resolution content') }}</p>
</div>
<div>
<p id="description-error" class="alert alert-error" style="display: none;">{{ _('Please enter your issue resolution content') }}</p>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" onclick="return checkDescriptionExists()">{{ _('Certificate') }}</button>
</div>
</form>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" onclick="return checkDescriptionExists()">{{ _('Certificate') }}</button>
</div>
</form>
</div>
</div>
</div>

<div id="issue-resolution-detail" class="modal fade" tabindex="-1">
<div class="modal-dialog modal-dialog-centered modal-lg">
<div class="modal-content">
<div class="modal-header">
<div id="issue-resolution-detail" class="modal fade" tabindex="-1">
<div class="modal-dialog modal-dialog-centered modal-lg">
<div class="modal-content">
<div class="modal-header">
{% if h.is_base_public_folder_bs3() %}
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h2 class="modal-title">{{ _('Resolved Issue details') }}</h2>
{% else %}
<h2 class="modal-title">{{ _('Resolved Issue details') }}</h2>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div id="issue-resolution-table" class="modal-body">
<div>
<table class="table table-bordered table-striped table-responsive">
<thead class="table-header">
{% endif %}
</div>
<div id="issue-resolution-table" class="modal-body">
<div>
<table class="table table-bordered table-striped table-responsive">
<thead class="table-header">
<tr>
<th class="col-md-3">{{ _('Certificated') }}</th>
<th>{{ _('Resolved Issue') }}</th>
</tr>
</thead>
<tbody>
{% for issue_resolution in issue_resolutions %}
<tr>
<th class="col-md-3">{{ _('Certificated') }}</th>
<th>{{ _('Resolved Issue') }}</th>
<td>{{ issue_resolution.created.strftime('%Y/%m/%d %H:%M:%S') }}</td>
<td class="multiple-line">{{ issue_resolution.description }}</td>
</tr>
</thead>
<tbody>
{% for issue_resolution in issue_resolutions %}
<tr>
<td>{{ issue_resolution.created.strftime('%Y/%m/%d %H:%M:%S') }}</td>
<td class="multiple-line">{{ issue_resolution.description }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% endif %}
</div>
{% endblock %}

{% block secondary %}{% endblock %}
Expand Down

0 comments on commit 04283ea

Please sign in to comment.