|
| 1 | +<!-- Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | + Licensed under the MIT License. --> |
| 3 | + |
| 4 | +@model TeamDisplayModel |
| 5 | + |
| 6 | +@using Microsoft.Graph |
| 7 | + |
| 8 | +@{ |
| 9 | + ViewData["Title"] = Model.Team.AdditionalData["displayName"]; |
| 10 | + ViewData["teamId"] = Model.Team.Id; |
| 11 | + ViewData["teamArchived"] = Model.Team.IsArchived.Value; |
| 12 | + var archiveButtonLabel = Model.Team.IsArchived.Value ? "Unarchive" : "Archive"; |
| 13 | +} |
| 14 | + |
| 15 | +<div class="card mb-4" id="team-card"> |
| 16 | + <div class="card-body"> |
| 17 | + <h1 class="card-title">@Model.Team.AdditionalData["displayName"]</h1> |
| 18 | + <form asp-action="ArchiveTeam" class="mb-3" onsubmit="return confirm('Are you sure you want @archiveButtonLabel.ToLower() this team?');"> |
| 19 | + <input type="hidden" name="teamId" value="@Model.Team.Id"> |
| 20 | + <input type="hidden" name="archiveAction" value="@archiveButtonLabel"> |
| 21 | + <input type="submit" class="btn btn-primary" value="@archiveButtonLabel"> |
| 22 | + </form> |
| 23 | + <ul class="nav nav-tabs mb-2" id="team-tab" role="tablist"> |
| 24 | + <li class="nav-item" role="presentation"> |
| 25 | + <a class="nav-link active" id="channel-list" data-toggle="tab" href="#channels" role="tab">Channels</a> |
| 26 | + </li> |
| 27 | + <li class="nav-item" role="presentation"> |
| 28 | + <a class="nav-link" id="team-settings" data-toggle="tab" href="#settings" role="tab">Settings</a> |
| 29 | + </li> |
| 30 | + <li class="nav-item" role="presentation"> |
| 31 | + <a class="nav-link" id="installed-apps" data-toggle="tab" href="#apps" role="tab">Apps</a> |
| 32 | + </li> |
| 33 | + </ul> |
| 34 | + <div class="tab-content" id="team-tab-content"> |
| 35 | + <div class="tab-pane fade show active" id="channels" role="tabpanel"> |
| 36 | + <form class="form-inline mt-3 mb-3" asp-action="CreateChannel"> |
| 37 | + <input type="hidden" name="teamId" value="@Model.Team.Id"> |
| 38 | + <label class="sr-only" for="channelName">New channel name</label> |
| 39 | + <input type="text" class="form-control mb-2 mr-2" name="channelName" id="channelName" placeholder="New channel name" required> |
| 40 | + <label class="sr-only" for="channelDescription">New channel description</label> |
| 41 | + <input type="text" class="form-control mb-2 mr-2" name="channelDescription" id="channelDescription" placeholder="New channel description"> |
| 42 | + <input type="submit" class="btn btn-sm btn-primary mb-2" value="Create new channel" disabled="@Model.Team.IsArchived.Value"> |
| 43 | + </form> |
| 44 | + <partial name="_ChannelListPartial" for="Channels" view-data="ViewData"> |
| 45 | + </div> |
| 46 | + <div class="tab-pane fade" id="settings" role="tabpanel"> |
| 47 | + <div class="card"> |
| 48 | + <div class="card-body"> |
| 49 | + <form asp-action="UpdateSettings"> |
| 50 | + <input type="hidden" name="Id" value="@Model.Team.Id"> |
| 51 | + <h5 class="mb-3">Messaging settings</h5> |
| 52 | + <div class="form-check"> |
| 53 | + <input class="form-check-input" type="checkbox" name="MessagingSettings.AllowChannelMentions" checked="@Model.Team.MessagingSettings.AllowChannelMentions.Value" value="true"> |
| 54 | + <label class="form-check-label">Allow channel mentions</label> |
| 55 | + <input type="hidden" name="MessagingSettings.AllowChannelMentions" value="false"> |
| 56 | + </div> |
| 57 | + <div class="form-check"> |
| 58 | + <input class="form-check-input" type="checkbox" name="MessagingSettings.AllowTeamMentions" checked="@Model.Team.MessagingSettings.AllowTeamMentions.Value" value="true"> |
| 59 | + <label class="form-check-label">Allow team mentions</label> |
| 60 | + <input type="hidden" name="MessagingSettings.AllowTeamMentions" value="false"> |
| 61 | + </div> |
| 62 | + <div class="form-check"> |
| 63 | + <input class="form-check-input" type="checkbox" name="MessagingSettings.AllowOwnerDeleteMessages" checked="@Model.Team.MessagingSettings.AllowOwnerDeleteMessages.Value" value="true"> |
| 64 | + <label class="form-check-label">Allow owner to delete messages</label> |
| 65 | + <input type="hidden" name="MessagingSettings.AllowOwnerDeleteMessages" value="false"> |
| 66 | + </div> |
| 67 | + <div class="form-check"> |
| 68 | + <input class="form-check-input" type="checkbox" name="MessagingSettings.AllowUserDeleteMessages" checked="@Model.Team.MessagingSettings.AllowUserDeleteMessages.Value" value="true"> |
| 69 | + <label class="form-check-label">Allow users to delete messages</label> |
| 70 | + <input type="hidden" name="MessagingSettings.AllowUserDeleteMessages" value="false"> |
| 71 | + </div> |
| 72 | + <div class="form-check"> |
| 73 | + <input class="form-check-input" type="checkbox" name="MessagingSettings.AllowUserEditMessages" checked="@Model.Team.MessagingSettings.AllowUserEditMessages.Value" value="true"> |
| 74 | + <label class="form-check-label">Allow users to edit</label> |
| 75 | + <input type="hidden" name="MessagingSettings.AllowUserEditMessages" value="false"> |
| 76 | + </div> |
| 77 | + <hr/> |
| 78 | + <h5 class="mb-3">Member settings</h5> |
| 79 | + <div class="form-check"> |
| 80 | + <input class="form-check-input" type="checkbox" name="MemberSettings.AllowCreateUpdateChannels" checked="@Model.Team.MemberSettings.AllowCreateUpdateChannels.Value" value="true"> |
| 81 | + <label class="form-check-label">Allow members to create and update channels</label> |
| 82 | + <input type="hidden" name="MemberSettings.AllowCreateUpdateChannels" value="false"> |
| 83 | + </div> |
| 84 | + <div class="form-check"> |
| 85 | + <input class="form-check-input" type="checkbox" name="MemberSettings.AllowDeleteChannels" checked="@Model.Team.MemberSettings.AllowDeleteChannels.Value" value="true"> |
| 86 | + <label class="form-check-label">Allow members to delete channels</label> |
| 87 | + <input type="hidden" name="MemberSettings.AllowDeleteChannels" value="false"> |
| 88 | + </div> |
| 89 | + <div class="form-check"> |
| 90 | + <input class="form-check-input" type="checkbox" name="MemberSettings.AllowCreateUpdateRemoveTabs" checked="@Model.Team.MemberSettings.AllowCreateUpdateRemoveTabs.Value" value="true"> |
| 91 | + <label class="form-check-label">Allow members to create, udpate, and remove tabs</label> |
| 92 | + <input type="hidden" name="MemberSettings.AllowCreateUpdateRemoveTabs" value="false"> |
| 93 | + </div> |
| 94 | + <div class="form-check"> |
| 95 | + <input class="form-check-input" type="checkbox" name="MemberSettings.AllowAddRemoveApps" checked="@Model.Team.MemberSettings.AllowAddRemoveApps.Value" value="true"> |
| 96 | + <label class="form-check-label">Allow members to add and remove apps</label> |
| 97 | + <input type="hidden" name="MemberSettings.AllowAddRemoveApps" value="false"> |
| 98 | + </div> |
| 99 | + <div class="form-check"> |
| 100 | + <input class="form-check-input" type="checkbox" name="MemberSettings.AllowCreateUpdateRemoveConnectors" checked="@Model.Team.MemberSettings.AllowCreateUpdateRemoveConnectors.Value" value="true"> |
| 101 | + <label class="form-check-label">Allow members to create, update, and remove connectors</label> |
| 102 | + <input type="hidden" name="MemberSettings.AllowCreateUpdateRemoveConnectors" value="false"> |
| 103 | + </div> |
| 104 | + <hr/> |
| 105 | + <h5 class="mb-3">Guest settings</h5> |
| 106 | + <div class="form-check"> |
| 107 | + <input class="form-check-input" type="checkbox" name="GuestSettings.AllowCreateUpdateChannels" checked="@Model.Team.GuestSettings.AllowCreateUpdateChannels.Value" value="true"> |
| 108 | + <label class="form-check-label">Allow guests to create and update channels</label> |
| 109 | + <input type="hidden" name="GuestSettings.AllowCreateUpdateChannels" value="false"> |
| 110 | + </div> |
| 111 | + <div class="form-check"> |
| 112 | + <input class="form-check-input" type="checkbox" name="GuestSettings.AllowDeleteChannels" checked="@Model.Team.GuestSettings.AllowDeleteChannels.Value" value="true"> |
| 113 | + <label class="form-check-label">Allow guests to delete channels</label> |
| 114 | + <input type="hidden" name="GuestSettings.AllowDeleteChannels" value="false"> |
| 115 | + </div> |
| 116 | + <hr/> |
| 117 | + <h5 class="mb-3">Fun settings</h5> |
| 118 | + <div class="form-check"> |
| 119 | + <input class="form-check-input" type="checkbox" name="FunSettings.AllowGiphy" checked="@Model.Team.FunSettings.AllowGiphy.Value" value="true"> |
| 120 | + <label class="form-check-label">Allow Giphy</label> |
| 121 | + <input type="hidden" name="FunSettings.AllowGiphy" value="false"> |
| 122 | + </div> |
| 123 | + <div class="form-group"> |
| 124 | + <label>Giphy content rating</label> |
| 125 | + <select name="FunSettings.GiphyContentRating" class="form-control"> |
| 126 | + <option value="strict" selected="@Model.Team.FunSettings.GiphyContentRating.Value.Equals(GiphyRatingType.Strict)">Strict</option> |
| 127 | + <option value="moderate" selected="@Model.Team.FunSettings.GiphyContentRating.Value.Equals(GiphyRatingType.Moderate)">Moderate</option> |
| 128 | + </select> |
| 129 | + </div> |
| 130 | + <div class="form-check"> |
| 131 | + <input class="form-check-input" type="checkbox" name="FunSettings.AllowStickersAndMemes" checked="@Model.Team.FunSettings.AllowStickersAndMemes.Value" value="true"> |
| 132 | + <label class="form-check-label">Allow stickers and memes</label> |
| 133 | + <input type="hidden" name="FunSettings.AllowStickersAndMemes" value="false"> |
| 134 | + </div> |
| 135 | + <div class="form-check"> |
| 136 | + <input class="form-check-input" type="checkbox" name="FunSettings.AllowCustomMemes" checked="@Model.Team.FunSettings.AllowCustomMemes.Value" value="true"> |
| 137 | + <label class="form-check-label">Allow custom memes</label> |
| 138 | + <input type="hidden" name="FunSettings.AllowCustomMemes" value="false"> |
| 139 | + </div> |
| 140 | + <input type="submit" class="btn btn-primary mt-3" value="Update" disabled="@Model.Team.IsArchived.Value"> |
| 141 | + </form> |
| 142 | + </div> |
| 143 | + </div> |
| 144 | + </div> |
| 145 | + <div class="tab-pane fade" id="apps" role="tabpanel"> |
| 146 | + <partial name="_AppListPartial" for="InstalledApps" view-data="ViewData"> |
| 147 | + </div> |
| 148 | + </div> |
| 149 | + </div> |
| 150 | +</div> |
0 commit comments