|
|
(3 versioni intermedie di uno stesso utente non sono mostrate) |
Riga 1: |
Riga 1: |
| <div class="homepage-layout">
| | __NOTOC__ |
| <!-- 🧾 Sezione centrale richieste -->
| |
| <div class="hero-header" style="text-align:center; padding: 40px 20px;">
| |
| <h1 class="hero-title">Richieste Accesso LinkedIn</h1>
| |
| <p class="hero-subtitle">Gestisci le richieste in attesa dalla community scientifica</p>
| |
| </div>
| |
|
| |
|
| <div class="no-border-container" style="max-width: 1000px; margin: auto;">
| | <div class="mw-ui-container mw-ui-vform" style="padding: 2em; background: #f9f9f9; border: 1px solid #ccc; border-radius: 8px;"> |
| <div class="table-box" style="overflow-x:auto; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);">
| | = 🔐 Richieste di Accesso con LinkedIn = |
| <table class="wikitable sortable linkedin-request-table">
| |
| <thead>
| |
| <tr>
| |
| <th>Data</th>
| |
| <th>Nome</th>
| |
| <th>Ruolo</th>
| |
| <th>Profilo LinkedIn</th>
| |
| <th>Azione</th>
| |
| </tr>
| |
| </thead>
| |
| <tbody id="linkedin-requests-body">
| |
| <!-- 🌀 I dati verranno caricati via JavaScript -->
| |
| </tbody>
| |
| </table>
| |
| </div>
| |
| </div>
| |
| </div>
| |
|
| |
|
| | <p>Qui sotto sono elencate le richieste in attesa da parte degli utenti che hanno effettuato il login con LinkedIn. Ogni richiesta può essere <b>approvata</b> o <b>rifiutata</b> manualmente cliccando sui pulsanti corrispondenti.</p> |
|
| |
|
| | | <div id="richiesteLinkedIn"> |
| <script> | | <p>🔄 Caricamento richieste in corso...</p> |
| fetch('/wiki/Speciale:RichiesteLinkedIn?raw=true&format=json')
| | </div> |
| .then(res => res.json())
| | </div> |
| .then(data => { | |
| const tbody = document.getElementById('linkedin-requests-body');
| |
| data.forEach(req => {
| |
| const tr = document.createElement('tr');
| |
| | |
| // Data
| |
| const tdData = document.createElement('td');
| |
| tdData.textContent = req.date;
| |
| tr.appendChild(tdData);
| |
| | |
| // Nome
| |
| const tdNome = document.createElement('td');
| |
| tdNome.textContent = req.name;
| |
| tr.appendChild(tdNome);
| |
| | |
| // Ruolo
| |
| const tdRuolo = document.createElement('td');
| |
| tdRuolo.textContent = req.role;
| |
| tr.appendChild(tdRuolo);
| |
| | |
| // Profilo LinkedIn
| |
| const tdProfilo = document.createElement('td');
| |
| const link = document.createElement('a');
| |
| link.href = req.profile;
| |
| link.textContent = '🔗 Profilo';
| |
| link.target = '_blank';
| |
| tdProfilo.appendChild(link);
| |
| tr.appendChild(tdProfilo);
| |
| | |
| // Azioni
| |
| const tdAzioni = document.createElement('td');
| |
| | |
| const btnApprova = document.createElement('a');
| |
| btnApprova.href = '/wiki/Approva_' + encodeURIComponent(req.name);
| |
| btnApprova.className = 'mw-ui-button';
| |
| btnApprova.textContent = '✅ Approva';
| |
| | |
| const btnRifiuta = document.createElement('a');
| |
| btnRifiuta.href = '/wiki/Rifiuta_' + encodeURIComponent(req.name);
| |
| btnRifiuta.className = 'mw-ui-button';
| |
| btnRifiuta.textContent = '❌ Rifiuta';
| |
| | |
| tdAzioni.appendChild(btnApprova);
| |
| tdAzioni.appendChild(document.createTextNode(' '));
| |
| tdAzioni.appendChild(btnRifiuta);
| |
| tr.appendChild(tdAzioni);
| |
| | |
| tbody.appendChild(tr);
| |
| });
| |
| })
| |
| .catch(err => {
| |
| document.getElementById('linkedin-requests-body').innerHTML =
| |
| '<tr><td colspan="5">⚠️ Nessuna richiesta trovata o errore nel caricamento</td></tr>';
| |
| console.error(err);
| |
| });
| |
| </script> | |