UploadInfo page implemented

main
Inga 🏳‍🌈 14 years ago
parent f6f1f7d104
commit 0ca2c88e67
  1. 2
      Builder/IISMainHandler/build.txt
  2. 1
      Common/Common.csproj
  3. 2
      Common/URL/UrlManager.cs
  4. 29
      Common/URL/upload/Info.cs
  5. 1
      IISMainHandler/HandlersFactory.cs
  6. 1
      IISMainHandler/IISMainHandler.csproj
  7. 28
      IISMainHandler/handlers/response/UploadInfoHandler.cs
  8. 18
      templates/Full/UploadInfo.xslt
  9. 2
      templates/Full/elems/UploadInfo.xslt

@ -165,6 +165,7 @@
<Compile Include="URL\QuickLink.cs" />
<Compile Include="URL\Robots.cs" />
<Compile Include="URL\Static.cs" />
<Compile Include="URL\upload\Info.cs" />
<Compile Include="URL\upload\Item.cs" />
<Compile Include="URL\upload\List.cs" />
<Compile Include="URL\upload\New.cs" />

@ -274,6 +274,8 @@ namespace FLocal.Common.URL {
switch(requestParts[1].ToLower()) {
case "item":
return new upload.Item(requestParts[2], GetRemainder(requestParts, 3));
case "info":
return new upload.Info(requestParts[2], GetRemainder(requestParts, 3));
case "list":
return new upload.List(GetRemainder(requestParts, 2));
case "new":

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FLocal.Core;
using FLocal.Common.dataobjects;
namespace FLocal.Common.URL.upload {
public class Info : AbstractUrl {
public readonly Upload upload;
public Info(string uploadId, string remainder) : base(remainder) {
this.upload = Upload.LoadById(int.Parse(uploadId));
}
public override string title {
get {
return this.upload.filename;
}
}
protected override string _canonical {
get {
return "/Upload/Info/" + this.upload.id + "/";
}
}
}
}

@ -41,6 +41,7 @@ namespace FLocal.IISHandler {
{ typeof(URL.QuickLink), CreateHandler<URL.QuickLink, handlers.response.QuickLinkHandler> },
{ typeof(URL.Robots), CreateHandler<URL.Robots, handlers.response.RobotsHandler> },
{ typeof(URL.Static), CreateHandler<URL.Static, handlers.StaticHandler> },
{ typeof(URL.upload.Info), CreateHandler<URL.upload.Info, handlers.response.UploadInfoHandler> },
{ typeof(URL.upload.Item), CreateHandler<URL.upload.Item, handlers.response.UploadHandler> },
{ typeof(URL.upload.List), CreateHandler<URL.upload.List, handlers.response.UploadListHandler> },
{ typeof(URL.upload.New), CreateHandler<URL.upload.New, handlers.response.UploadNewHandler> },

@ -152,6 +152,7 @@
<Compile Include="handlers\response\AvatarsSettingsHandler.cs" />
<Compile Include="handlers\response\PollsListHandler.cs" />
<Compile Include="handlers\response\SkipXsltTransformException.cs" />
<Compile Include="handlers\response\UploadInfoHandler.cs" />
<Compile Include="handlers\response\UserDataHandler.cs" />
<Compile Include="handlers\response\UserThreadsHandler.cs" />
</ItemGroup>

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FLocal.Core;
using FLocal.Common;
using System.Xml.Linq;
using FLocal.Common.dataobjects;
using FLocal.Core.DB;
using FLocal.Core.DB.conditions;
namespace FLocal.IISHandler.handlers.response {
class UploadInfoHandler : AbstractGetHandler<FLocal.Common.URL.upload.Info> {
protected override string templateName {
get {
return "UploadInfo.xslt";
}
}
protected override IEnumerable<XElement> getSpecificData(WebContext context) {
return new XElement[] {
this.url.upload.exportToXml(context),
};
}
}
}

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="Windows-1251"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:import href="elems\Main.xslt"/>
<xsl:import href="elems\UploadInfo.xslt"/>
<xsl:template name="specificTitle">Àïëîàä</xsl:template>
<xsl:template name="specific">
<table width="95%" align="center" cellpadding="1" cellspacing="1" class="tablesurround">
<tr>
<td>
<table cellpadding="0" cellspacing="1" width="100%" class="tableborders">
<xsl:apply-templates select="upload"/>
</table>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>

@ -12,7 +12,7 @@
</td>
<td class="subjecttable">
<a target="_blank" class="separate">
<xsl:attribute name="href">/Upload/Item/<xsl:value-of select="id"/>/</xsl:attribute>
<xsl:attribute name="href">/Upload/Info/<xsl:value-of select="id"/>/</xsl:attribute>
<img border="0" src="/static/images/message-normal-read.gif" alt="" style="vertical-align: text-bottom" />
</a>
<b class="separate"><xsl:value-of select="filename"/></b>

Loading…
Cancel
Save