Skip to content

Commit

Permalink
Continuous Release 1.11.1
Browse files Browse the repository at this point in the history
Merge pull request #608 from MaMpf-HD/dev
  • Loading branch information
Splines authored Apr 3, 2024
2 parents c81dc10 + 1e6d953 commit 4a37d85
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
//////////////////////////////////////
// Git
//////////////////////////////////////
"git.inputValidation": "warn",
"git.inputValidation": true,
"git.inputValidationSubjectLength": 50,
"git.inputValidationLength": 72,
//////////////////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion app/models/medium.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ def subscribed_users
# if "inherit from lecture" was selected (i.e. if the annotations status of
# this medium is -1).
def get_annotations_status # rubocop:todo Naming/AccessorMethodName
return lecture.annotations_status if annotations_status == -1
return lecture.annotations_status if annotations_status == -1 && lecture.present?

annotations_status
end
Expand Down
27 changes: 15 additions & 12 deletions app/views/annotations/_form_content_further_help.html.erb
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
<div id="emergency-link">
<% lecture = Medium.find_by_id(@medium_id).lecture %>
<% status = lecture.emergency_link_status_for_database %>
<% link = lecture.emergency_link %>
<% if status == Lecture.emergency_link_statuses[:lecture_link] %>
<% link_name = Lecture.find_by_id(link.tr("^[0-9]", "")).title %>
<% elsif status == Lecture.emergency_link_statuses[:direct_link] %>
<% link_name = link %>
<% if lecture %>
<% status = lecture.emergency_link_status_for_database %>
<% link = lecture.emergency_link %>
<% if status == Lecture.emergency_link_statuses[:lecture_link] %>
<% link_name = Lecture.find_by_id(link.tr("^[0-9]", "")).title %>
<% elsif status == Lecture.emergency_link_statuses[:direct_link] %>
<% link_name = link %>
<% end %>

<% unless link_name.blank? %>
<%= t('admin.annotation.further_help') %> <br>
<a href="<%= link %>" target="_blank" rel="noopener noreferrer">
<%= link_name %>
</a>
<% end %>
<% end %>
<% unless link_name.blank? %>
<%= t('admin.annotation.further_help') %> <br>
<a href="<%= link %>" target="_blank" rel="noopener noreferrer">
<%= link_name %>
</a>
<% end %>
</div>
3 changes: 2 additions & 1 deletion app/views/media/play.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@

<!--- ANNOTATION BUTTON -->
<% if user_signed_in? %>
<a id="annotation-button" class="btn" title="<%= t('admin.annotation.edit_annotation') %>">
<a id="annotation-button" class="btn"
title="<%= t('admin.annotation.annotation_modal_head_create_annotation') %>">
<i class="fas fa-sticky-note" aria-hidden="true"></i>
</a>
<% end %>
Expand Down

0 comments on commit 4a37d85

Please sign in to comment.