-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve attachments interface and error handling (#1682)
* Add "Add Attachment" button for instructors when viewing a course * Decouple create attachment logic from update attachment * Move "add attachment" to top, wrap in <p> to be consistent * Use modern syntax for building routes * Make attachment list appearance consistent across course and assessment attachments * Remove more dead code * Make assessment list page appearance consistent Co-authored-by: Joey Wildman <[email protected]>
- Loading branch information
1 parent
da5ca2b
commit 67f6644
Showing
7 changed files
with
79 additions
and
70 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 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
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,23 +1,23 @@ | ||
<% if @is_assessment then %> | ||
<% if @is_assessment %> | ||
<h2>Listing <%= link_to @assessment.display_name, [@course, @assessment] %> Attachments</h2> | ||
<% else %> | ||
<h2>Listing <%= link_to @course.full_name, @course %> Attachments</h2> | ||
<% end %> | ||
|
||
|
||
<p> | ||
<% if @is_assessment then %> | ||
<%= link_to 'Add '+@assessment.display_name+' Attachment', new_course_assessment_attachment_path(@course, @assessment) %> | ||
<% else %> | ||
<%= link_to 'Add Course Attachment', new_course_attachment_path(@course) %> | ||
<% end %> | ||
</p> | ||
|
||
<% if @attachments.any? then %> | ||
<ul> | ||
<%= render @attachments %> | ||
</ul> | ||
<% else %> | ||
There are no attachments yet. | ||
<% end %> | ||
<ul class="collection with-header attachments"> | ||
<li class="collection-item add"> | ||
<p> | ||
<% if @is_assessment %> | ||
<%= link_to new_course_assessment_attachment_path(@course, @assessment) do %> | ||
<i class="material-icons left">note_add</i>Add <%= @assessment.display_name %> Attachment | ||
<% end %> | ||
<% else %> | ||
<%= link_to new_course_attachment_path(@course) do %> | ||
<i class="material-icons left">note_add</i>Add Course Attachment | ||
<% end %> | ||
<% end %> | ||
</p> | ||
</li> | ||
<%= render @attachments %> | ||
</ul> | ||
|