File tree Expand file tree Collapse file tree 5 files changed +34
-2
lines changed
assets/stylesheets/common
config/locales/views/groups Expand file tree Collapse file tree 5 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 2020- Prevent "No rows found" message from displaying in tables when data is loading (#7790 )
2121- Prevent ZIP files from being previewed in the assignment file viewer (#7802 )
2222- Display descriptive error message when scanned exam template name exceeds the 20-character limit (#7796 )
23+ - Made repository URL not a link for student assignment view when version control is enabled (#7807 )
2324
2425### 🔧 Internal changes
2526- Updated autotest seed files to ensure settings follow tester JSON schema (#7775 )
Original file line number Diff line number Diff line change @@ -628,6 +628,13 @@ kbd {
628628 li {
629629 margin-bottom : 0.5em ;
630630 }
631+
632+ .copy-url-button {
633+ margin-left : 0.5em ;
634+ margin-bottom : 0.3em ;
635+ min-width : auto ;
636+ padding : 0.2em 0.1em 0.2em 0.4em ;
637+ }
631638 }
632639 }
633640 }
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import {
1616 faClose ,
1717 faComments ,
1818 faCompress ,
19+ faCopy ,
1920 faDice ,
2021 faDownload ,
2122 faEnvelopeCircleCheck ,
@@ -77,6 +78,7 @@ library.add(
7778 faClose ,
7879 faComments ,
7980 faCompress ,
81+ faCopy ,
8082 faDice ,
8183 faDownload ,
8284 faEnvelopeCircleCheck ,
Original file line number Diff line number Diff line change 124124 <% if allowed_to? ( :access_repo? , @grouping ) %>
125125 < h3 > <%= t ( 'groups.student_interface.url_repository' ) %> </ h3 >
126126 < div class ='sub_block '>
127- HTTPS: < a href ='# '> <%= @grouping . group . repository_external_access_url %> </ a >
127+ HTTPS: < code > <%= @grouping . group . repository_external_access_url %> </ code >
128+ < button class ="copy-url-button " data-clipboard-text ="<%= @grouping . group . repository_external_access_url %> ">
129+ < i class ="fa-solid fa-copy "> </ i >
130+ </ button >
128131 <% if allowed_to? ( :view? , with : KeyPairPolicy ) %>
129132 < br >
130- SSH: < a href ='# '> <%= @grouping . group . repository_ssh_access_url %> </ a >
133+ SSH: < code > <%= @grouping . group . repository_ssh_access_url %> </ code >
134+ < button class ="copy-url-button " data-clipboard-text ="<%= @grouping . group . repository_ssh_access_url %> ">
135+ < i class ="fa-solid fa-copy "> </ i >
136+ </ button >
131137 <% end %>
132138 </ div >
133139 <% end %>
201207 <% end %>
202208<% end %>
203209</ div >
210+
211+ <%= javascript_tag nonce : true do %>
212+ document.addEventListener("DOMContentLoaded", () => {
213+ document.querySelectorAll('.copy-url-button').forEach(button => {
214+ button.addEventListener('click', () => {
215+ navigator.clipboard.writeText(button.dataset.clipboardText).then(() => {
216+ var flashDiv = document.getElementsByClassName("success")[0];
217+ var contents = flashDiv.getElementsByClassName("flash-content")[0] || flashDiv;
218+ contents.innerHTML = "< p > <%= t ( 'groups.student_interface.copied_to_clipboard' ) %> </ p > ";
219+ flashDiv.style.display = "block";
220+ });
221+ });
222+ });
223+ });
224+ <% end %>
Original file line number Diff line number Diff line change 7777 student_interface :
7878 confirm_create_group : This action will decline your pending invitations. Are you sure?
7979 confirm_delete_group : ' WARNING: You will lose access to your submitted files after deleting your group. Make sure you have a local copy of your files before clicking OK.'
80+ copied_to_clipboard : Successfully copied to clipboard.
8081 form_group : Create a group
8182 group_information : Group information
8283 group_options : Group options
You can’t perform that action at this time.
0 commit comments