Commit 627fc99a authored by Maxim's avatar Maxim
Browse files

Added Admin window

parent b2738e77
......@@ -117,7 +117,9 @@ body {
.textr{
font-size: 1.25rem;
}
.textrs{
font-size: 0.75rem;
}
.texts{
font-size: 0.5rem;
}
......@@ -143,4 +145,13 @@ body {
}
.fontAnimation:hover{
font-size: 4rem;
}
.buttonToFadeGreen{
animation-name:fadeGreen;
animation-duration: 1.5s;
}
@keyframes fadeGreen {
from {background-color: #28a745;}
to {background-color: #007bff;}
}
\ No newline at end of file
......@@ -52,6 +52,18 @@ $(() => {
})
$(".adminEmailCopy").on("click",function (e){
$(".adminEmailCopy").addClass("buttonToFadeGreen");
setTimeout(function(){$(".adminEmailCopy").removeClass("buttonToFadeGreen");}, 2000);
var text = $("#admins option:selected").text();
var value= `<input value="${text}" id="selVal" />`;
$(value).insertAfter('.adminEmailCopy');
$("#selVal").select();
document.execCommand("Copy");
$('body').find("#selVal").remove();
})
$("button.role-save").on("click", function (e) {
if (loading) return;
......
......@@ -9,8 +9,6 @@
</tr>
</thead>
<tbody>
<% if @my_role == Roles::ADMIN %>
<% @members.each do |m| %>
<tr>
......@@ -55,7 +53,7 @@
<% @members.each do |m| %>
<tr>
<td><%= m.login %></td>
<td>
<td colspan="2">
<% if m.role == Roles::ADMIN %>
Admin
<% end %>
......@@ -75,7 +73,7 @@
<% if m.id == session[:user_id] %>
<tr>
<td><%= m.login %></td>
<td>
<td colspan="2">
Gast
</td>
</tr>
......
<div class="group-header">
<h3><%= @group.name %></h3>
<p><%= @group.description %></p>
<div class="row w-100">
<div class="row">
<div class="col">
<h3><%= @group.name %></h3>
</div>
<div class="col">
Administratoren der Gruppe:
</div>
</div>
<div class="row">
<div class="col">
<p><%= @group.description %></p>
</div>
<div class="col">
<div class="row">
<div class="col-11">
<select name="admins" id="admins" class="form-control role-select pointer">
<% @members.each do |m| %>
<% if m.role == Roles::ADMIN %>
<option value="<%= m.login %>@hs-mittweida.de"><%= m.login %>@hs-mittweida.de</option>
<% end %>
<% end %>
</select>
</div>
<div class="col-1">
<i class="btn btn-primary bi bi-clipboard pointer adminEmailCopy"></i>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<p>Erstellt am <%= @group.created_at.strftime("%d.%m.%Y %H:%M:%S") %></p>
<% unless @group.valid_until.nil? %>
<p>Gültig bis <%= @group.valid_until.strftime("%d.%m.%Y %H:%M:%S") %></p>
<% end %>
</div>
<div class="col"></div>
<div class="col textrs">
Bei Anfragen kontaktieren Sie bitte einen Gruppenadministrator.
</div>
</div>
</div>
</div>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment