-
-
Notifications
You must be signed in to change notification settings - Fork 23
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 #5061 from dodona-edu/enhancement/right-request
- Loading branch information
Showing
8 changed files
with
46 additions
and
54 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 was deleted.
Oops, something went wrong.
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 +1 @@ | ||
dodona.setHTMLExecuteScripts(document.querySelector("#requests-table-wrapper"), "<%= escape_javascript(render partial: 'requests_table', locals: { requests: @requests }) %>"); | ||
document.querySelector("#request_<%= @rights_request.id %> .card-actions").innerHTML = '<button class="btn btn-filled d-btn-success" disabled><%= t("rights_requests.index.approved") %></button>' |
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,12 +1,40 @@ | ||
<div class="row"> | ||
<div class="offset-md-1 col-md-10 col-12"> | ||
<div class="card"> | ||
<div class="card-title card-title-colored"> | ||
<h2 class="card-title-text"><%= t ".title" %></h2> | ||
</div> | ||
<div class="card-supporting-text" id="requests-table-wrapper"> | ||
<%= render partial: 'requests_table', locals: { requests: @requests } %> | ||
<div class="page-subtitle justify-content-between"> | ||
<h3><%= @title %></h3> | ||
</div> | ||
|
||
<% @requests.each do |request| %> | ||
<div class="col-lg-4 col-md-6 col-12"> | ||
<div class="card" id="request_<%= request.id %>"> | ||
<div class="card-title card-title-colored"> | ||
<h2 class="card-title-text"> | ||
<%= link_to request.user.full_name, request.user, target: "_blank", title: request.user.full_name, class: 'ellipsis-overflow' %> | ||
</h2> | ||
<h3 class="card-subtitle-text"> | ||
<%= link_to request.user.institution do %> | ||
<% if request.institution_name.present? %> | ||
<%= request.institution_name %> | ||
<% elsif request.user.institution.generated_name %> | ||
<i class="mdi mdi-alert colored-warning mdi-18"></i> | ||
<%= t('.no_institution_provided') %> | ||
<% else %> | ||
<%= request.user.institution.name %> | ||
<% end %> | ||
<% end %> | ||
</h3> | ||
</div> | ||
<div class="card-supporting-text" > | ||
<%= request.context %> | ||
</div> | ||
<div class="card-actions card-border"> | ||
<%= link_to approve_rights_request_path(request), remote: true, method: :post, class: "btn btn-icon btn-icon-filled d-btn-success", title: t(".approve") do %> | ||
<i class="mdi mdi-check"></i> | ||
<% end %> | ||
<%= link_to reject_rights_request_path(request), remote: true, method: :post, class: "btn btn-icon btn-icon-filled d-btn-danger", title: t(".reject"), data: {confirm: t("general.are_you_sure")} do %> | ||
<i class="mdi mdi-close"></i> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> |
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 +1 @@ | ||
dodona.setHTMLExecuteScripts(document.querySelector("#requests-table-wrapper"), "<%= escape_javascript(render partial: 'requests_table', locals: { requests: @requests }) %>"); | ||
document.querySelector("#request_<%= @rights_request.id %> .card-actions").innerHTML = '<button class="btn btn-filled d-btn-danger" disabled><%= t("rights_requests.index.rejected") %></button>' |
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