|
|
(5 versioni intermedie di uno stesso utente non sono mostrate) |
Riga 1: |
Riga 1: |
| | __NOTOC__ |
|
| |
|
| | <div class="mw-ui-container mw-ui-vform" style="padding: 2em; background: #f9f9f9; border: 1px solid #ccc; border-radius: 8px;"> |
| | = 🔐 Richieste di Accesso con LinkedIn = |
|
| |
|
| | <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> |
|
| |
|
| == Richieste in attesa ==
| | <div id="richiesteLinkedIn"> |
| <table class="wikitable sortable linkedin-request-table"> | | <p>🔄 Caricamento richieste in corso...</p> |
| | | </div> |
| | | </div> |
| <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">
| |
| <!-- Qui vengono caricate dinamicamente le richieste -->
| |
| </tbody>
| |
| </table>
| |
| | |
| <script>
| |
| fetch('/wiki/Speciale:RichiesteLinkedIn?raw=true&format=json')
| |
| .then(res => res.json())
| |
| .then(data => {
| |
| const tbody = document.getElementById('linkedin-requests-body');
| |
| data.forEach(req => {
| |
| const tr = document.createElement('tr');
| |
| | |
| const tdData = document.createElement('td');
| |
| tdData.textContent = req.date;
| |
| | |
| const tdNome = document.createElement('td');
| |
| tdNome.textContent = req.name;
| |
| | |
| const tdRuolo = document.createElement('td');
| |
| tdRuolo.textContent = req.role;
| |
| | |
| const tdProfilo = document.createElement('td');
| |
| const linkProfilo = document.createElement('a');
| |
| linkProfilo.href = req.profile;
| |
| linkProfilo.textContent = '🔗 Profilo';
| |
| linkProfilo.target = '_blank';
| |
| tdProfilo.appendChild(linkProfilo);
| |
| | |
| const tdAzioni = document.createElement('td');
| |
| | |
| const approva = document.createElement('a');
| |
| approva.href = '/wiki/Approva_' + encodeURIComponent(req.name);
| |
| approva.className = 'linkedin-approve';
| |
| approva.textContent = '✅ Approva';
| |
| | |
| const rifiuta = document.createElement('a');
| |
| rifiuta.href = '/wiki/Rifiuta_' + encodeURIComponent(req.name);
| |
| rifiuta.className = 'linkedin-reject';
| |
| rifiuta.textContent = '❌ Rifiuta';
| |
| | |
| tdAzioni.appendChild(approva);
| |
| tdAzioni.appendChild(document.createTextNode(' · '));
| |
| tdAzioni.appendChild(rifiuta);
| |
| | |
| tr.appendChild(tdData);
| |
| tr.appendChild(tdNome);
| |
| tr.appendChild(tdRuolo);
| |
| tr.appendChild(tdProfilo);
| |
| 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> | |