예제 #1
0
파일: BaseChrome.cs 프로젝트: t1b1c/lwas
 protected virtual void RenderVerbs(HtmlTextWriter writer, WebPart webPart)
 {
     if (webPart.AllowEdit)
     {
         VerbLink editLink = new VerbLink(base.Zone, "edit:" + webPart.ID);
         editLink.Text = "edit";
         writer.Write(" ");
         this.RenderVerbControl(writer, editLink);
     }
     if (webPart.AllowEdit && webPart.AllowClose)
     {
         VerbLink deleteLink = new VerbLink(base.Zone, "delete:" + webPart.ID);
         deleteLink.Text = "delete";
         writer.Write(" ");
         this.RenderVerbControl(writer, deleteLink);
     }
     if (webPart.ExportMode != WebPartExportMode.None)
     {
         HyperLink exportLink = new HyperLink();
         exportLink.Text        = "export";
         exportLink.NavigateUrl = base.WebPartManager.ResolveUrl("~/download/Export.aspx" + HttpContext.Current.Request.Url.Query + "&p=" + webPart.ID);
         writer.Write(" ");
         this.RenderVerbControl(writer, exportLink);
     }
     if (webPart.AllowEdit && webPart.ExportMode != WebPartExportMode.None)
     {
         VerbLink importLink = new VerbLink(base.Zone, "import:" + webPart.ID);
         importLink.Text = "import";
         writer.Write(" ");
         this.RenderVerbControl(writer, importLink);
     }
 }
예제 #2
0
파일: BaseChrome.cs 프로젝트: t1b1c/lwas
 protected virtual void RenderVerbs(HtmlTextWriter writer, WebPart webPart)
 {
     if (webPart.AllowEdit)
     {
         VerbLink editLink = new VerbLink(base.Zone, "edit:" + webPart.ID);
         editLink.Text = "edit";
         writer.Write(" ");
         this.RenderVerbControl(writer, editLink);
     }
     if (webPart.AllowEdit && webPart.AllowClose)
     {
         VerbLink deleteLink = new VerbLink(base.Zone, "delete:" + webPart.ID);
         deleteLink.Text = "delete";
         writer.Write(" ");
         this.RenderVerbControl(writer, deleteLink);
     }
     if (webPart.ExportMode != WebPartExportMode.None)
     {
         HyperLink exportLink = new HyperLink();
         exportLink.Text = "export";
         exportLink.NavigateUrl = base.WebPartManager.ResolveUrl("~/download/Export.aspx" + HttpContext.Current.Request.Url.Query + "&p=" + webPart.ID);
         writer.Write(" ");
         this.RenderVerbControl(writer, exportLink);
     }
     if (webPart.AllowEdit && webPart.ExportMode != WebPartExportMode.None)
     {
         VerbLink importLink = new VerbLink(base.Zone, "import:" + webPart.ID);
         importLink.Text = "import";
         writer.Write(" ");
         this.RenderVerbControl(writer, importLink);
     }
 }