PageRenderTime 47ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/pigeoncms/Modules/PigeonCms.CommentsAdmin/views/Default.ascx

http://pigeoncms.googlecode.com/
ASP.NET | 226 lines | 202 code | 24 blank | 0 comment | 0 complexity | 65c8ccf4b63a2ccf0db2071ff9688e14 MD5 | raw file
Possible License(s): LGPL-3.0, GPL-3.0, LGPL-2.1, GPL-2.0
  1. <%@ Control Language="C#" AutoEventWireup="true" CodeFile="Default.ascx.cs" Inherits="Controls_CommentsAdmin" %>
  2. <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
  3. <%@ Register src="~/Controls/ItemParams.ascx" tagname="ItemParams" tagprefix="uc1" %>
  4. <%@ Register src="~/Controls/PermissionsControl.ascx" tagname="PermissionsControl" tagprefix="uc1" %>
  5. <script type="text/javascript">
  6. // <!CDATA[
  7. //use in popup version
  8. function closePopup() { parent.$.fancybox.close(); }
  9. // ]]>
  10. </script>
  11. <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
  12. <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="1" AssociatedUpdatePanelID="Upd1">
  13. <ProgressTemplate>
  14. <div class="loading"><%=PigeonCms.Utility.GetLabel("LblLoading", "loading") %></div>
  15. </ProgressTemplate>
  16. </asp:UpdateProgress>
  17. <asp:UpdatePanel ID="Upd1" runat="server">
  18. <ContentTemplate>
  19. <h1><%=base.GetLabel("ModuleTitle", "Comments")%></h1>
  20. <asp:Label ID="LblErr" runat="server" Text="" CssClass="error"></asp:Label>
  21. <asp:Label ID="LblOk" runat="server" Text="" CssClass="success"></asp:Label>
  22. <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0" OnActiveViewChanged="MultiView1_ActiveViewChanged">
  23. <asp:View ID="ViewSee" runat="server">
  24. <div class="adminToolbar">
  25. </div>
  26. <fieldset>
  27. <%=base.GetLabel("LblFilters")%>&nbsp;
  28. <asp:DropDownList ID="DropStatusFilter" runat="server" AutoPostBack="true" CssClass="adminMediumText" OnSelectedIndexChanged="DropStatusFilter_SelectedIndexChanged">
  29. </asp:DropDownList>
  30. <asp:TextBox ID="TxtSearchFilter" runat="server" AutoPostBack="true" CssClass="adminMediumText"
  31. ontextchanged="TxtSearchFilter_TextChanged"></asp:TextBox>
  32. <cc1:TextBoxWatermarkExtender TargetControlID="TxtSearchFilter" runat="server"
  33. WatermarkText="<search>" WatermarkCssClass="adminMediumText watermark">
  34. </cc1:TextBoxWatermarkExtender>
  35. </fieldset>
  36. <br />
  37. <asp:GridView ID="Grid1" runat="server" AllowPaging="True" AllowSorting="true" Width="100%" AutoGenerateColumns="False"
  38. DataSourceID="ObjDs1" DataKeyNames="Id" OnRowCommand="Grid1_RowCommand" OnRowCreated="Grid1_RowCreated" OnRowDataBound="Grid1_RowDataBound">
  39. <Columns>
  40. <asp:TemplateField ItemStyle-Width="10">
  41. <ItemTemplate>
  42. <asp:ImageButton ID="LnkSel" CommandName="Select" CommandArgument='<%#Eval("Id") %>'
  43. runat="server" SkinID="ImgEditFile" />
  44. </ItemTemplate>
  45. </asp:TemplateField>
  46. <asp:BoundField DataField="Title" HeaderText="Titolo" SortExpression="" />
  47. <asp:BoundField DataField="Alias" HeaderText="Alias" SortExpression="Alias" />
  48. <asp:TemplateField HeaderText="Sezione" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
  49. <ItemTemplate>
  50. <asp:Literal ID="LitSectionTitle" runat="server" />
  51. </ItemTemplate>
  52. </asp:TemplateField>
  53. <asp:TemplateField HeaderText="Categoria" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
  54. <ItemTemplate>
  55. <asp:Literal ID="LitCategoryTitle" runat="server" />
  56. </ItemTemplate>
  57. </asp:TemplateField>
  58. <asp:BoundField DataField="ItemTypeName" HeaderText="Tipo" SortExpression="ItemType" />
  59. <asp:TemplateField HeaderText="Abilitato" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
  60. <ItemTemplate>
  61. <asp:ImageButton runat="server" ID="ImgEnabledOk" CommandName="ImgEnabledOk" CommandArgument='<%#Eval("Id") %>' SkinID="ImgOk" Visible="false" />
  62. <asp:ImageButton runat="server" ID="ImgEnabledKo" CommandName="ImgEnabledKo" CommandArgument='<%#Eval("Id") %>' SkinID="ImgUnchecked" Visible="false" />
  63. </ItemTemplate>
  64. </asp:TemplateField>
  65. <asp:TemplateField HeaderText="Access type" SortExpression="AccessType">
  66. <ItemTemplate>
  67. <asp:Literal ID="LitAccessTypeDesc" runat="server" Text=""></asp:Literal>
  68. </ItemTemplate>
  69. </asp:TemplateField>
  70. <asp:TemplateField HeaderText="Access Level" SortExpression="AccessCode, AccessLevel">
  71. <ItemTemplate>
  72. <asp:Literal ID="LitAccessLevel" runat="server" Text=""></asp:Literal>
  73. </ItemTemplate>
  74. </asp:TemplateField>
  75. <asp:TemplateField HeaderText="Cancella" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10">
  76. <ItemTemplate>
  77. <asp:ImageButton ID="LnkDel" CommandName="DeleteRow" CommandArgument='<%#Eval("Id") %>'
  78. runat="server" SkinID="ImgDelFile"
  79. OnClientClick="return confirm('Cancellare la riga?');" />
  80. </ItemTemplate>
  81. </asp:TemplateField>
  82. <asp:BoundField DataField="Id" HeaderText="ID" SortExpression="Id" ItemStyle-HorizontalAlign="Right" HeaderStyle-HorizontalAlign="Right" />
  83. </Columns>
  84. </asp:GridView>
  85. <asp:ObjectDataSource ID="ObjDs1" runat="server" SortParameterName="sort" SelectMethod="GetByFilter"
  86. TypeName="PigeonCms.ItemsManager`2[[PigeonCms.Item],[PigeonCms.ItemsFilter]]" OnSelecting="ObjDs1_Selecting">
  87. <SelectParameters>
  88. <asp:Parameter Name="filter" Type="Object" />
  89. <asp:Parameter Name="sort" Type="String" DefaultValue="Ordering" />
  90. </SelectParameters>
  91. <DeleteParameters>
  92. <asp:Parameter Name="Id" Type="Int32" />
  93. </DeleteParameters>
  94. </asp:ObjectDataSource>
  95. </asp:View>
  96. <asp:View ID="ViewInsert" runat="server">
  97. <div class="adminToolbar">
  98. <asp:Button ID="BtnSave" runat="server" Text="<%$ Resources:PublicLabels, CmdSave %>" CssClass="button" OnClientClick="MyObject.UpdateEditorFormValue();" OnClick="BtnSave_Click" />
  99. <asp:Button ID="BtnCancel" runat="server" Text="<%$ Resources:PublicLabels, CmdCancel %>" CssClass="button" CausesValidation="false" OnClick="BtnCancel_Click" />
  100. </div>
  101. <div class="col width-60">
  102. <fieldset class="adminForm">
  103. <legend></legend>
  104. <table class="adminTable">
  105. <tr>
  106. <td class="key"><%=base.GetLabel("LblItemType", "Item type", null, true)%></td>
  107. <td colspan="3">
  108. <asp:Literal ID="LitItemType" runat="server"></asp:Literal></td>
  109. </tr>
  110. <tr>
  111. <td class="key"><%=base.GetLabel("LblCategory", "Category", DropCategories, true)%></td>
  112. <td style="width: 500px">
  113. <asp:DropDownList ID="DropCategories" runat="server" CssClass=""></asp:DropDownList>&nbsp;&nbsp;&nbsp;
  114. </td>
  115. </tr>
  116. <tr>
  117. <td class="key"><%=base.GetLabel("LblEnabled", "Enabled", ChkEnabled, true)%></td>
  118. <td>
  119. <asp:CheckBox ID="ChkEnabled" runat="server" Enabled="true" />
  120. </td>
  121. </tr>
  122. <tr>
  123. <td class="key"><%=base.GetLabel("LblTitle", "Title", null, true)%></td>
  124. <td>
  125. <asp:Panel runat="server" ID="PanelTitle"></asp:Panel>
  126. </td>
  127. </tr>
  128. <tr>
  129. <td class="key"><%=base.GetLabel("LblAlias", "Alias", TxtAlias, true)%></td>
  130. <td>
  131. <asp:TextBox ID="TxtAlias" runat="server" CssClass="adminMediumText"></asp:TextBox>
  132. <asp:RequiredFieldValidator ID="ReqAlias" ControlToValidate="TxtAlias" runat="server" Text="*"></asp:RequiredFieldValidator>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td class="key"><%=base.GetLabel("LblItemDate", "Item date", TxtItemDate, true)%></td>
  137. <td class="calendar">
  138. <asp:TextBox ID="TxtItemDate" runat="server" CssClass='adminSmallText'></asp:TextBox>
  139. <cc1:CalendarExtender ID="CalItemDate" runat="server"
  140. TargetControlID="TxtItemDate" Format="dd/MM/yyyy"></cc1:CalendarExtender>
  141. </td>
  142. </tr>
  143. <tr>
  144. <td class="key"><%=base.GetLabel("LblValidFrom", "Valid from", TxtValidFrom, true)%></td>
  145. <td class="calendar">
  146. <asp:TextBox ID="TxtValidFrom" runat="server" CssClass='adminSmallText'></asp:TextBox>
  147. <cc1:CalendarExtender ID="CalValidFrom" runat="server"
  148. TargetControlID="TxtValidFrom" Format="dd/MM/yyyy"></cc1:CalendarExtender>
  149. </td>
  150. </tr>
  151. <tr>
  152. <td class="key"><%=base.GetLabel("LblValidTo", "Valid to", TxtValidTo, true)%></td>
  153. <td class="calendar">
  154. <asp:TextBox ID="TxtValidTo" runat="server" CssClass='adminSmallText'></asp:TextBox>
  155. <cc1:CalendarExtender ID="CalValidTo" runat="server"
  156. TargetControlID="TxtValidTo" Format="dd/MM/yyyy"></cc1:CalendarExtender>
  157. </td>
  158. </tr>
  159. <tr>
  160. <td class="key"><%=base.GetLabel("LblDescription", "Description", null, true)%></td>
  161. <td>
  162. <asp:Panel runat="server" ID="PanelDescription"></asp:Panel>
  163. </td>
  164. </tr>
  165. </table>
  166. </fieldset>
  167. </div>
  168. <div class="col width-40">
  169. <fieldset class="adminForm recordInfo">
  170. <legend><%=base.GetLabel("LblRecordInfo", "Record info") %></legend>
  171. <table class="adminTable" cellspacing="0">
  172. <tr>
  173. <td class="key"><%=base.GetLabel("LblRecordId", "ID") %></td>
  174. <td><asp:Label ID="LblId" runat="server" Text=""></asp:Label></td>
  175. </tr>
  176. <tr>
  177. <td class="key"><%=base.GetLabel("LblCreated", "Created") %></td>
  178. <td><asp:Label ID="LblCreated" runat="server" Text=""></asp:Label></td>
  179. </tr>
  180. <tr>
  181. <td class="key"><%=base.GetLabel("LblLastUpdate", "Last update") %></td>
  182. <td><asp:Label ID="LblUpdated" runat="server" Text=""></asp:Label></td>
  183. </tr>
  184. </table>
  185. </fieldset>
  186. <fieldset class="adminForm">
  187. <uc1:PermissionsControl ID="PermissionsControl1" runat="server" />
  188. </fieldset>
  189. <fieldset class="adminForm">
  190. <legend><%=base.GetLabel("LblFields", "Fields", null, true) %></legend>
  191. <uc1:ItemParams ID="ItemFields1" runat="server" />
  192. </fieldset>
  193. <fieldset class="adminForm">
  194. <legend><%=base.GetLabel("LblParameters", "Parameters", null, true) %></legend>
  195. <uc1:ItemParams ID="ItemParams1" runat="server" />
  196. </fieldset>
  197. </div>
  198. <div class="clear"/>
  199. </asp:View>
  200. </asp:MultiView>
  201. </ContentTemplate>
  202. </asp:UpdatePanel>