Threads read indicators fixed

main
Inga 🏳‍🌈 14 years ago
parent 0fc0a808e8
commit a29d9ca2c1
  1. 2
      Builder/IISMainHandler/build.txt
  2. 21
      Common/dataobjects/User.cs
  3. 2
      IISMainHandler/HandlersFactory.cs
  4. 3
      IISMainHandler/IISMainHandler.csproj
  5. 4
      templates/Full/elems/ThreadInfo.xslt
  6. 5
      templates/Full/elems/UserHeader.xslt
  7. 4
      templates/Lite/elems/ThreadInfo.xslt

@ -255,5 +255,26 @@ namespace FLocal.Common.dataobjects {
); );
} }
public IEnumerable<Thread> getThreads(Diapasone diapasone) {
return Thread.LoadByIds(
from stringId in Config.instance.mainConnection.LoadIdsByConditions(
Thread.TableSpec.instance,
new ComparisonCondition(
Thread.TableSpec.instance.getColumnSpec(Thread.TableSpec.FIELD_TOPICSTARTERID),
ComparisonType.EQUAL,
this.id.ToString()
),
diapasone,
new JoinSpec[0],
new SortSpec[] {
new SortSpec(
Thread.TableSpec.instance.getColumnSpec(Thread.TableSpec.FIELD_LASTPOSTID),
false
),
}
) select int.Parse(stringId)
);
}
} }
} }

@ -139,6 +139,8 @@ namespace FLocal.IISHandler {
switch(context.requestParts[3].ToLower()) { switch(context.requestParts[3].ToLower()) {
case "info": case "info":
return new handlers.response.UserInfoHandler(); return new handlers.response.UserInfoHandler();
case "threads":
return new handlers.response.UserThreadsHandler();
case "posts": case "posts":
return new handlers.response.UserPostsHandler(); return new handlers.response.UserPostsHandler();
case "replies": case "replies":

@ -143,6 +143,9 @@
<Name>Importer</Name> <Name>Importer</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Include="handlers\response\UserThreadsHandler.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

@ -23,7 +23,7 @@
</xsl:if> </xsl:if>
<img alt="*" hspace="5" style="vertical-align: text-bottom"> <img alt="*" hspace="5" style="vertical-align: text-bottom">
<xsl:choose> <xsl:choose>
<xsl:when test="afterLastRead&lt;=lastPostId"> <xsl:when test="totalNewPosts and totalNewPosts!='0'">
<xsl:attribute name="src">/static/images/message-<xsl:value-of select="firstPost/post/layerName"/>-notread.gif</xsl:attribute> <xsl:attribute name="src">/static/images/message-<xsl:value-of select="firstPost/post/layerName"/>-notread.gif</xsl:attribute>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
@ -37,7 +37,7 @@
<xsl:text>/Thread/</xsl:text> <xsl:text>/Thread/</xsl:text>
<xsl:value-of select="id"/> <xsl:value-of select="id"/>
<xsl:text>/</xsl:text> <xsl:text>/</xsl:text>
<xsl:if test="afterLastRead&lt;=lastPostId"> <xsl:if test="totalNewPosts and totalNewPosts!='0'">
<xsl:text>p</xsl:text> <xsl:text>p</xsl:text>
<xsl:value-of select="afterLastRead"/> <xsl:value-of select="afterLastRead"/>
</xsl:if> </xsl:if>

@ -14,6 +14,11 @@
<xsl:with-param name="text">Èíôîðìàöèÿ</xsl:with-param> <xsl:with-param name="text">Èíôîðìàöèÿ</xsl:with-param>
</xsl:call-template> </xsl:call-template>
<xsl:text> | </xsl:text> <xsl:text> | </xsl:text>
<xsl:call-template name="headerLink">
<xsl:with-param name="url"><xsl:value-of select="$baseLink"/>Threads/</xsl:with-param>
<xsl:with-param name="text">Òåìû</xsl:with-param>
</xsl:call-template>
<xsl:text> | </xsl:text>
<xsl:call-template name="headerLink"> <xsl:call-template name="headerLink">
<xsl:with-param name="url"><xsl:value-of select="$baseLink"/>Posts/</xsl:with-param> <xsl:with-param name="url"><xsl:value-of select="$baseLink"/>Posts/</xsl:with-param>
<xsl:with-param name="text">Ñîîáùåíèÿ</xsl:with-param> <xsl:with-param name="text">Ñîîáùåíèÿ</xsl:with-param>

@ -21,7 +21,7 @@
<xsl:if test="firstPost/post/layerName='offtop'">{o}</xsl:if> <xsl:if test="firstPost/post/layerName='offtop'">{o}</xsl:if>
<xsl:if test="firstPost/post/layerName='garbage'">{g}</xsl:if> <xsl:if test="firstPost/post/layerName='garbage'">{g}</xsl:if>
<xsl:choose> <xsl:choose>
<xsl:when test="afterLastRead&lt;=lastPostId"> <xsl:when test="totalNewPosts and totalNewPosts!='0'">
<xsl:text>(*</xsl:text> <xsl:text>(*</xsl:text>
<xsl:value-of select="totalNewPosts"/> <xsl:value-of select="totalNewPosts"/>
<xsl:text>)</xsl:text> <xsl:text>)</xsl:text>
@ -35,7 +35,7 @@
<xsl:text>/Thread/</xsl:text> <xsl:text>/Thread/</xsl:text>
<xsl:value-of select="id"/> <xsl:value-of select="id"/>
<xsl:text>/</xsl:text> <xsl:text>/</xsl:text>
<xsl:if test="afterLastRead&lt;=lastPostId"> <xsl:if test="totalNewPosts and totalNewPosts!='0'">
<xsl:text>p</xsl:text> <xsl:text>p</xsl:text>
<xsl:value-of select="afterLastRead"/> <xsl:value-of select="afterLastRead"/>
</xsl:if> </xsl:if>

Loading…
Cancel
Save