Итак, у меня есть две колонки в моей таблице.Заблокирован и изменения ожидаютКогда активна блокировка, редактирование отключено.Но для остальных, таких как «Разблокировано» и «Ожидает внесения изменений», вы можете получить доступ к редактированию в «Меню действий».
Пока у меня работает «Заблокировано», но в остальных режим «Редактирование» все еще отключен.
<td class="hidden-xs hidden-sm text-center">
@if (t.IsLocked)
{
//<span class="fa fa-lock fa-lg writer-locked" data-toggle="tooltip" title="This song is locked, pending changes."></span>
}
else
{
//<span class="fa fa-lock fa-lg writer-locked" data-toggle="tooltip" title="This song is locked, pending changes."></span>
<span class="fa fa-unlock fa-lg writer-unlocked" data-toggle="tooltip" title="This song is unlocked, there are no pending changes." aria-hidden="true"></span>
}
</td>
<td class="hidden-xs hidden-sm text-center">
@if (t.HasActiveAmendment)
{
//<span class="fa fa-pencil-square-o writers-cross text-center" aria-hidden="true" data-toggle="tooltip" title="This song has been edited, pending changes."></span>
}
else
{
//<span class="fa fa-pencil-square-o writers-cross text-center" aria-hidden="true" data-toggle="tooltip" title="This song has been edited, pending changes."></span>
<span class="fa fa-minus writers-check text-center" data-toggle="tooltip" title="This song has no pending changes." aria-hidden="true"></span>
}
</td>
<td class="updateTableRow text-center">
<div class="dropdownContainer btn-group text-right">
<button id="@actionWriterId" type="button" class="btn btn-primary br2 btn-xs fs12 dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
Action
<span class="caret ml5"></span>
</button>
<ul class="dropdown-menu dropdown-menu-right" role="menu">
<li>
@if (t.IsLocked)
{
<a href="#" id="@editWriterId" data-container="body" data-toggle="tooltip" title="Edit" data-rowhover="editTableRow" class="js_EditWriter">Edit</a>
}
else
{
<a class="isDisabled" data-toggle="tooltip" title="You cannot edit this song until pending writer edits are approved">Edit</a>
}
</li>
<li>
<a href="#" id="@deleteWriterId" data-container="body" data-toggle="tooltip" title="Delete" data-rowhover="deleteTableRow" class="js_DeleteWriter">Delete</a>
</li>
</ul>
</div>
</td>
</tr>
tableRowIndex++;
}
</tbody>
</table>