PageRenderTime 45ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 1ms

/templates/IWforums_user_forum.htm

https://github.com/intraweb-modules13/IWforums
HTML | 258 lines | 251 code | 7 blank | 0 comment | 0 complexity | bf2a369060dd9faf011b8f6bc9c93d7b MD5 | raw file
  1. {include file="IWforums_user_menu.htm" m1=1 m2=1 m3=1 m9=1 fid=$fid ftid=$ftid u=$u inici=$inici}
  2. {userloggedin assign=userid}
  3. <div class="usercontainer">
  4. {if $hi_ha_temes}
  5. <div class="userpageicon">{img modname='core' src='windowlist.png' set='icons/large'}</div>
  6. <h2>{$name} {if $u > 0}({$users[$u]|trim}){/if}</h2>
  7. <strong>{gt text="List of topics"}</strong>
  8. <table class="z-datatable">
  9. <tbody>
  10. {foreach item=tema from=$temes name="temes"}
  11. <tr bgcolor='{cycle values="#ffffff, #eeeeee"}'>
  12. {if $userid neq ''}
  13. <td align="center" width="2%" valign="top" class="topic">
  14. <a href="{modurl modname='IWforums' type='user' func='llista_msg' ftid=$tema.ftid fid=$fid u=$u}">
  15. {if $tema.n_msg_no_llegits eq 0}
  16. {img modname='IWforums' src='msg.gif'}
  17. {else}
  18. {img modname='IWforums' src='msgNo.gif'}
  19. {/if}
  20. </a>
  21. <div>
  22. <a href="{modurl modname='IWforums' type='user' func='llista_msg' ftid=$tema.ftid fid=$fid u=$u}">
  23. {if $tema.marcats neq 0}
  24. {img modname='IWforums' src='marcat.gif'}
  25. {/if}
  26. </a>
  27. </div>
  28. </td>
  29. {/if}
  30. <td valign="top" class="topic">
  31. <div>
  32. <a href="{modurl modname='IWforums' type='user' func='llista_msg' ftid=$tema.ftid fid=$fid u=$u}">
  33. {$tema.titol}
  34. </a>
  35. </div>
  36. <div>
  37. {$tema.descriu|nl2br}
  38. </div>
  39. <div style="padding-top:10px; font-size:0.9em; font-style:italic;">
  40. <div class="photo">
  41. {if $tema.photo neq '' AND ($userid neq '' OR $avatarsVisible eq 1)}
  42. <img src="index.php?module=IWmain&type=user&func=getPhoto&fileName={$tema.photo}" class="photoImg" />
  43. {else}
  44. <img src="modules/IWforums/images/avatar.jpg" class="photoImg"/>
  45. {/if}
  46. </div>
  47. {gt text="topic created by:"}&nbsp;<span style="color:green; font-weight:bold;">{$users[$tema.usuari]}</span>&nbsp;{gt text="on"}&nbsp;{$tema.data}&nbsp;{gt text="at"}&nbsp;{$tema.hora}
  48. </div>
  49. </td>
  50. <td width="27%" valign="top" class="topic">
  51. <div>
  52. {gt text="Messages:"}&nbsp;<strong>{$tema.n_msg}</strong>
  53. </div>
  54. {if $userid neq ''}
  55. <div>
  56. {gt text=" Unread messages:"}&nbsp;{if $tema.n_msg_no_llegits neq 0}<font color="#FF0000">{else}<font color="#000000">{/if}<strong>{$tema.n_msg_no_llegits}</strong></font>
  57. </div>
  58. {/if}
  59. {if $tema.last_post_exists}
  60. <div class="lastPost">
  61. {gt text="Last post by"}&nbsp;{$users[$tema.lastuser]}&nbsp;{gt text="on"}&nbsp;{$tema.lastdate}&nbsp;{gt text="at"}&nbsp;{$tema.lasttime}
  62. </div>
  63. {/if}
  64. </td>
  65. {if $moderator}
  66. <td align="center" width="40px" valign="top" class="topic">
  67. <div>
  68. <a href="{modurl modname='IWforums' type='user' func='deltema' ftid=$tema.ftid fid=$fid u=$u}" title="{gt text="Delete the topic"}">
  69. {img modname='IWforums' src='deltema.gif' __alt="Topic and messages deletion" __title="Topic and messages deletion"}
  70. </a>
  71. </div>
  72. {if not $smarty.foreach.temes.first}
  73. <a href="{modurl modname='IWforums' type='user' func='order' ftid=$tema.ftid fid=$fid puts=1}" title="{gt text="Up"}">
  74. {img modname='IWforums' src='up.gif' __alt="Up" __title="Up"}
  75. </a>
  76. {/if}
  77. {if not $smarty.foreach.temes.last}
  78. <a href="{modurl modname='IWforums' type='user' func='order' ftid=$tema.ftid fid=$fid puts=-1}" title="{gt text="Down"}">
  79. {img modname='IWforums' src='down.gif' __alt="Down" __title="Down"}
  80. </a>
  81. {/if}
  82. </td>
  83. {/if}
  84. </tr>
  85. {/foreach}
  86. </tbody>
  87. </table>
  88. {/if}
  89. {if $hi_ha_missatges}
  90. {if !$hi_ha_temes}
  91. <div class="userpageicon">{img modname='core' src='windowlist.png' set='icons/large'}</div>
  92. {/if}
  93. {if $ftid eq 0}
  94. {if $hi_ha_temes}
  95. <strong>{gt text="List of messages"}</strong>
  96. {else}
  97. <h2>{$name} - {gt text="List of messages"} {if $u > 0}({$users[$u]|trim}){/if}</h2>
  98. {/if}
  99. {else}
  100. <h2>{$name} => {$topicName} {if $u > 0}({$users[$u]|trim}){/if}</h2>
  101. {/if}
  102. <div style="clear: both;"></div>
  103. <div style="float: left;">
  104. {if $usuaris|@count gt 2}
  105. <form name="filtre" id="filtre" method="get" action="">
  106. <input type="hidden" name="fid" value="{$fid}">
  107. <input type="hidden" name="ftid" value="{$ftid}">
  108. <input type="hidden" name="inici" value="1">
  109. <input type="hidden" name="module" value="IWforums">
  110. {if $ftid eq 0}
  111. <input type="hidden" name="func" value="forum">
  112. {else}
  113. <input type="hidden" name="func" value="llista_msg">
  114. {/if}
  115. <select name="u" onChange="this.form.submit()">
  116. {section name=usuaris loop=$usuaris}
  117. <option {if $u eq $usuaris[usuaris].id}selected{/if} value="{$usuaris[usuaris].id}">{$usuaris[usuaris].name}</option>
  118. {/section}
  119. </select>
  120. </form>
  121. {/if}
  122. </div>
  123. <div style="float: right;">
  124. <a href="{modurl modname='IWforums' type='user' func='allmsg' ftid=$ftid fid=$fid u=$u inici=$inici}">
  125. {gt text="All the messages of the list"}
  126. </a>
  127. </div>
  128. <table class="z-datatable">
  129. <thead>
  130. <tr>
  131. {if $userid neq ''}
  132. <th>{img modname='IWforums' src='marcat.gif'}</th>
  133. {/if}
  134. {if $icons}<th>&nbsp;</th>{/if}
  135. {if $adjunts}<th>{img modname='IWforums' src='file.gif'}</th>{/if}
  136. {if $userid neq ''}
  137. <th>{img modname='IWforums' src='MsgNoMsg.gif'}</th>
  138. {/if}
  139. <th style="text-align:left;">{gt text="Title"}</th>
  140. <th style="text-align:left;">{gt text="Sender"}</th>
  141. <th>{gt text="Date"}</th>
  142. <th>{gt text="Time"}</th>
  143. {if $access gt 1}
  144. <th>{gt text="Actions"}</th>
  145. {/if}
  146. </tr>
  147. </thead
  148. <tbody>
  149. {foreach item=message from=$messages}
  150. <tr bgcolor="{cycle values="#ffffff, #eeeeee"}">
  151. {if $userid neq ''}
  152. <td align="center" width="10" onclick="javascript:mark({$fid}, {$message.fmid})">
  153. {img modname='IWforums' src=$message.marcat alt=$message.textmarca title=$message.textmarca id=$message.fmid}
  154. </td>
  155. {/if}
  156. {if $icons}
  157. <td align="center" width="10">
  158. {if $message.icon neq ""}
  159. {img modname='IWmain' src=$message.icon set='smilies'}
  160. {/if}
  161. </td>
  162. {/if}
  163. {if $adjunts}
  164. <td align="center" width="10">
  165. {if $message.adjunt neq ""}
  166. <a title="{$message.adjunt}">
  167. {img modname='IWforums' src='file.gif' __alt=$message.adjunt __title=$message.adjunt}
  168. </a>
  169. {/if}
  170. </td>
  171. {/if}
  172. {if $userid neq ''}
  173. <td style="text-align:center;" width="10">
  174. <a href="{modurl modname='IWforums' type='user' func='msg' fmid=$message.fmid ftid=$ftid fid=$fid u=$u oid=$message.oid inici=$inici}">
  175. <img src="modules/IWforums/images/{$message.imatge}" id="msgImage_{$message.fmid}" />
  176. </a>
  177. </td>
  178. {/if}
  179. <td style="padding-left:{$message.indent}px;">
  180. <div class="titleRowTitle">
  181. {if $message.onTop eq 1}
  182. <img src="modules/IWforums/images/onTop.gif" style="vertical-align: middle;" alt="{gt text='Main message'}" title="{gt text='Main message'}" />
  183. {/if}
  184. <a href="{modurl modname='IWforums' type='user' func='msg' fmid=$message.fmid ftid=$ftid fid=$fid u=$u oid=$message.oid inici=$inici}">
  185. {$message.title}
  186. </a>
  187. </div>
  188. <div class="titleRowIcon">
  189. <img src="modules/IWforums/images/msgopen.gif" onClick="javascript:openMsg({$message.fmid}, {$fid}, {$ftid}, {$u}, {$message.oid}, {$inici})" id="openMsgIcon_{$message.fmid}" name="openMsgIcon_{$message.fmid}">
  190. </div>
  191. </td>
  192. <td style="color:green;"><strong>{$users[$message.user]}</strong></td>
  193. <td style="color:#777; text-align:center;"><strong>{$message.date}</strong></td>
  194. <td style="color:#777; text-align:center;"><strong>{$message.time}</strong></td>
  195. {if $access gt 1}
  196. <td {if $moderator}style="width:100px; text-align:center;"{/if}>
  197. {if $moderator or $message.esborrable}
  198. <a href="{modurl modname='IWforums' type='user' func='del' fmid=$message.fmid ftid=$ftid fid=$fid u=$u inici=$inici}" title="{gt text='Delete the message'}">
  199. {img modname='IWforums' src='del.gif' __alt="Delete the message" __title="Delete the message"}
  200. </a>
  201. {/if}
  202. {if $moderator or $message.editable}
  203. <a href="{modurl modname='IWforums' type='user' func='edit_msg' fmid=$message.fmid ftid=$ftid fid=$fid u=$u inici=$inici}" title="{gt text='Edit the message'}">
  204. {img modname='IWforums' src='editar.gif' __alt="Edit the message" __title="Edit the message"}
  205. </a>
  206. {/if}
  207. {if $moderator}
  208. <a href="{modurl modname='IWforums' type='user' func='mou' fmid=$message.fmid ftid=$ftid fid=$fid u=$u inici=$inici}" title="{gt text='Move the message'}">
  209. {img modname='IWforums' src='moumsg.gif' __alt="Move the message" __title="Move the message"}
  210. </a>
  211. {if $message.fmid eq $message.oid}
  212. <a href="{modurl modname='IWforums' type='user' func='onTop' fmid=$message.fmid ftid=$ftid fid=$fid u=$u inici=$inici}" title="{if $message.onTop eq 0}{gt text='Set as main message'}{else}{gt text='Set as not main message'}{/if}">
  213. {if $message.onTop eq 1}
  214. {img modname='IWforums' src='onTop.gif' __alt="Move the message" __title="Set as not main message"}
  215. {else}
  216. {img modname='IWforums' src='noOnTop.gif' __alt="Move the message" __title="Set as main message"}
  217. {/if}
  218. </a>
  219. {else}
  220. {img modname='IWforums' src='blank.gif' __alt="Move the message" __title="Move the message"}
  221. {/if}
  222. {/if}
  223. </td>
  224. {/if}
  225. </tr>
  226. <tr style="margin:0px; padding:0px;">
  227. <td colspan="10" style="margin:0px; padding:0px;">
  228. <div class="openMsg" id="openMsgRow_{$message.fmid}" name="openMsgRow_{$message.fmid}"></div>
  229. </td>
  230. </tr>
  231. {/foreach}
  232. </tbody>
  233. </table>
  234. <div style="margin-left:20px;">{$pager}</div>
  235. {else}
  236. {if $u eq 0}
  237. {if $ftid neq 0}
  238. <div style="height:15px;">&nbsp;</div>
  239. <div>{gt text="This subjet has no messages."}</div>
  240. {/if}
  241. {else}
  242. {if $ftid neq 0}
  243. <div>{gt text="The user "}<strong>{$uname}</strong>{gt text=" you haven't sent any message to this topic"}</div>
  244. {/if}
  245. {/if}
  246. {/if}
  247. {if not $hi_ha_temes and not $hi_ha_missatges and $ftid eq 0}
  248. <div style="height:15px;">&nbsp;</div>
  249. <div>{gt text="This forum has no messages."}</div>
  250. {/if}
  251. </div>