forum.bitel.ru http://forum.bitel.ru/ |
|
Карточка регистрации договора http://forum.bitel.ru/viewtopic.php?f=22&t=799 |
Страница 1 из 1 |
Автор: | Mike [ 06 мар 2008, 16:16 ] |
Заголовок сообщения: | Карточка регистрации договора |
Не могли бы Вы помочь сделать удобную нам карточку договора. Основная цель - сделать в ней не только LOGIN (id номер), но и алиас (символьный login). Пытались сделать шаблон сами, но опыта и мозгов не хватает. Вот что наваяли (только шаблон таблицы из стандартной card_inet.xsl). <xsl:template name="login_table"> <xsl:param name="inet_mid"/> <xsl:param name="inet_title"/> <xsl:param name="email_mid"/> <xsl:param name="email_title"/> <fo:table table-layout="fixed" space-before="0.4cm" space-after="0.5cm"> <fo:table-column column-width="4cm"/> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-header> <fo:table-row> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block/> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border" start-indent="1cm"> <fo:block xsl:use-attribute-sets="text" text-align="center"> ID </fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border" start-indent="1cm"> <fo:block xsl:use-attribute-sets="text" text-align="center"> LOGIN </fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="text" text-align="center"> PASS </fo:block> </fo:table-cell> </fo:table-row> </fo:table-header> <fo:table-body> <xsl:for-each select="module/*[name()=concat( 'user_login_', $inet_mid )]"> <xsl:call-template name="login_row"> <xsl:with-param name="title" select="$inet_title"/> <xsl:with-param name="id" select="@login"/> <xsl:with-param name="login" select="module/*[name()=concat( 'user_alias_', $inet_mid )]/@login_alias"/> <xsl:with-param name="pswd" select="@pswd"/> </xsl:call-template> </xsl:for-each> <xsl:for-each select="module/*[name()=concat( 'email_account_', $email_mid )]"> <xsl:call-template name="login_row"> <xsl:with-param name="title" select="$email_title"/> <xsl:with-param name="id" select="@object_id"/> <xsl:with-param name="login" select="@account"/> <xsl:with-param name="pswd" select="@password"/> </xsl:call-template> </xsl:for-each> </fo:table-body> </fo:table> </xsl:template> С уважение и благодарностью. |
Автор: | Администратор [ 08 мар 2008, 02:22 ] |
Заголовок сообщения: | |
Посмотрите шаблон contract.xsl, который формирует полную карту договора. Там выбираются алиасы. Тот шаблон только генерирует HTML, но элементы оформления можете взять из card_inet.xsl. Если не получится - напишите снова. |
Автор: | snark [ 25 мар 2008, 02:22 ] |
Заголовок сообщения: | Re: Карточка регистрации договора |
Mike писал(а): Основная цель - сделать в ней не только LOGIN (id номер), но и алиас (символьный login). наиглухая бета версия файлика card_inet.xsl, но делает в аккурат то что Вам надо, а именно - выводит все алиасы с их паролями в одной табличке:
Код: <?xml version="1.0" encoding="windows-1251"?>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> <!ENTITY copy "©"> <!ENTITY reg "®"> <!ENTITY trade "™"> <!ENTITY mdash "—"> <!ENTITY ldquo "“"> <!ENTITY rdquo "”"> <!ENTITY pound "£"> <!ENTITY yen "¥"> <!ENTITY euro "€"> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg" version="1.0"> <xsl:output method="xml" encoding="windows-1251"/> <xsl:attribute-set name="text"> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-size">12pt</xsl:attribute> <xsl:attribute name="start-indent">0.1cm</xsl:attribute> <xsl:attribute name="end-indent">0.1cm</xsl:attribute> <xsl:attribute name="text-decoration">none</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="text11_bold"> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-size">11pt</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="text_underlined"> <xsl:attribute name="text-decoration">underline</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="text_ban"> <xsl:attribute name="text-align">right</xsl:attribute> <xsl:attribute name="font-size">6pt</xsl:attribute> <xsl:attribute name="start-indent">0.1cm</xsl:attribute> <xsl:attribute name="end-indent">0.1cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="text_bold"> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-family">arial</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="font-size">12pt</xsl:attribute> <xsl:attribute name="start-indent">0.1cm</xsl:attribute> <xsl:attribute name="end-indent">0.1cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="text_title"> <xsl:attribute name="text-align">center</xsl:attribute> <xsl:attribute name="font-size">14pt</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="start-indent">0.1cm</xsl:attribute> <xsl:attribute name="end-indent">0.1cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="text_italic"> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="font-size">12pt</xsl:attribute> <xsl:attribute name="start-indent">0.1cm</xsl:attribute> <xsl:attribute name="end-indent">0.1cm</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="cell_border"> <xsl:attribute name="border-width">0.7pt</xsl:attribute> <xsl:attribute name="border-top-style">solid</xsl:attribute> <xsl:attribute name="border-bottom-style">solid</xsl:attribute> <xsl:attribute name="border-left-style">solid</xsl:attribute> <xsl:attribute name="border-right-style">solid</xsl:attribute> <xsl:attribute name="padding-top">0.1cm</xsl:attribute> <xsl:attribute name="padding-top">0.1cm</xsl:attribute> </xsl:attribute-set> <xsl:template match="/card"> <xsl:variable name="familija" select="parameters/parameter[@pid=2]/@value" /> <xsl:variable name="imja" select="parameters/parameter[@pid=3]/@value" /> <xsl:variable name="otchestvo" select="parameters/parameter[@pid=4]/@value" /> <xsl:variable name="inet_mid" select="'1'" /> <fo:root> <fo:layout-master-set> <fo:simple-page-master master-name="first" page-width="21cm" page-height="29.7cm" margin-top="1cm" margin-right="1cm" margin-bottom="1cm" margin-left="1cm"> <fo:region-body margin-top="0.0cm" margin-bottom="0.0cm" /> <fo:region-before extent="0.0cm" /> <fo:region-after extent="0.0cm" /> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="first"> <!-- footer --> <!-- <fo:static-content flow-name="xsl-region-after"> <fo:block font-size="10pt" text-align="end" xsl:use-attribute-sets="text"> Страница <fo:page-number /> </fo:block> </fo:static-content> --> <!-- footer --> <fo:flow flow-name="xsl-region-body"> <!-- заголовок --> <fo:block xsl:use-attribute-sets="text_title" space-after="0.5cm">Карта регистрации</fo:block> <!-- заголовок --> <fo:table table-layout="fixed"> <fo:table-column column-width="6.5cm"/> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block xsl:use-attribute-sets="text">Фамилия:</fo:block> </fo:table-cell> <fo:table-cell> <fo:block xsl:use-attribute-sets="text_bold" text-align="left"> <xsl:value-of select="$familija"/> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block xsl:use-attribute-sets="text">Имя:</fo:block> </fo:table-cell> <fo:table-cell> <fo:block xsl:use-attribute-sets="text_bold" text-align="left"> <xsl:value-of select="$imja"/> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block xsl:use-attribute-sets="text">Отчество:</fo:block> </fo:table-cell> <fo:table-cell> <fo:block xsl:use-attribute-sets="text_bold" text-align="left"> <xsl:value-of select="$otchestvo"/> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <!-- таблица логинов / --> <xsl:call-template name="access_table"></xsl:call-template> <!-- / таблица логинов --> <!-- примечание --> <fo:block xsl:use-attribute-sets="text_bold"> Примечание: _______________________________________________________ </fo:block> <!-- примечание --> <!-- печать --> <xsl:call-template name="stamp"/> <!-- печать --> <!-- линия отреза --> <fo:table table-layout="fixed" space-before="0.7cm" space-after="0.7cm"> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body> <fo:table-row> <fo:table-cell border-bottom-style="solid" border-bottom-width="0.02cm"> <fo:block/> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <!-- линия отреза --> <!-- заголовок --> <fo:block xsl:use-attribute-sets="text_title">Карта регистрации</fo:block> <!-- заголовок --> <fo:table table-layout="fixed"> <fo:table-column column-width="6.5cm"/> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block xsl:use-attribute-sets="text">Фамилия:</fo:block> </fo:table-cell> <fo:table-cell> <fo:block xsl:use-attribute-sets="text_bold" text-align="left"> <xsl:value-of select="$familija"/> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block xsl:use-attribute-sets="text">Имя:</fo:block> </fo:table-cell> <fo:table-cell> <fo:block xsl:use-attribute-sets="text_bold" text-align="left"> <xsl:value-of select="$imja"/> </fo:block> </fo:table-cell> </fo:table-row> <fo:table-row> <fo:table-cell> <fo:block xsl:use-attribute-sets="text">Отчество:</fo:block> </fo:table-cell> <fo:table-cell> <fo:block xsl:use-attribute-sets="text_bold" text-align="left"> <xsl:value-of select="$otchestvo"/> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> <!-- таблица логинов / --> <xsl:call-template name="access_table"></xsl:call-template> <!-- / таблица логинов --> <fo:block xsl:use-attribute-sets="text" space-after="0.5cm">Электронный адрес (e-mail) <fo:inline xsl:use-attribute-sets="text_bold">blah@example.net</fo:inline></fo:block> <!-- примечание --> <fo:block xsl:use-attribute-sets="text" space-after="0.3cm"><fo:inline xsl:use-attribute-sets="text_underlined">Техническая поддержка (круглосуточно)</fo:inline>: 322-223-322, <fo:inline xsl:use-attribute-sets="text_underlined">support@example.net</fo:inline></fo:block> <fo:block xsl:use-attribute-sets="text">Информация о наработке и состоянии Вашего лицевого счета, статистика подключений</fo:block> <!-- примечание --> <!-- печать --> <xsl:call-template name="stamp"/> <!-- печать --> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <!-- таблица логинов / --> <xsl:template name="access_table"> <xsl:for-each select="module"> <xsl:variable name="mid"><xsl:value-of select="@id"/></xsl:variable> <!-- Dial-UP / --> <xsl:if test="@name='dialup'"> <fo:table table-layout="fixed" space-before="0.5cm" space-after="0.5cm"> <fo:table-column column-width="proportional-column-width(1)" /> <fo:table-column column-width="proportional-column-width(1)" /> <fo:table-header> <fo:table-row> <fo:table-cell xsl:use-attribute-sets="cell_border" start-indent="1cm"> <fo:block xsl:use-attribute-sets="text" text-align="center">Логин:</fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="text" text-align="center">Пароль:</fo:block> </fo:table-cell> </fo:table-row> </fo:table-header> <fo:table-body> <xsl:for-each select="./*[name()=concat('user_login_', $mid)]"> <xsl:variable name="lid" select="@id" /> <fo:table-row> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="text_bold" text-align="center"> <xsl:for-each select="../*[name()=concat('user_alias_', $mid) and @login_id=$lid]"> <xsl:value-of select="@login_alias" /> </xsl:for-each> </fo:block> </fo:table-cell> <fo:table-cell xsl:use-attribute-sets="cell_border"> <fo:block xsl:use-attribute-sets="text_bold" text-align="center"> <xsl:value-of select="@pswd" /> </fo:block> </fo:table-cell> </fo:table-row> </xsl:for-each> </fo:table-body> </fo:table> </xsl:if> <!-- / Dial-UP --> <!-- IPN / --> <!-- / IPN / --> </xsl:for-each> </xsl:template> <!-- / таблица логинов --> <!-- печать / --> <xsl:template name="stamp"> <fo:table table-layout="fixed" space-before="0.5cm" start-indent="0.5cm"> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-column column-width="proportional-column-width(1)"/> <fo:table-body> <fo:table-row> <fo:table-cell> <fo:block xsl:use-attribute-sets="text11_bold">Оператор</fo:block> <fo:block xsl:use-attribute-sets="text11_bold" space-before="0.3cm">Директор</fo:block> <fo:block xsl:use-attribute-sets="text11_bold">«мега-пупер-оператор»</fo:block> <fo:block space-before="0.25cm" space-after="0.25cm"/> <fo:block xsl:use-attribute-sets="text11_bold">______________ / И.И. Иванов</fo:block> <fo:block space-before="0.25cm" space-after="0.25cm"/> <fo:block xsl:use-attribute-sets="text11_bold">«____» _______________ 200__г.</fo:block> </fo:table-cell> <fo:table-cell> <fo:block xsl:use-attribute-sets="text11_bold">Абонент</fo:block> <fo:block xsl:use-attribute-sets="text11_bold" space-before="0.3cm"> </fo:block> <fo:block xsl:use-attribute-sets="text11_bold">______________________________</fo:block> <fo:block space-before="0.25cm" space-after="0.25cm"/> <fo:block xsl:use-attribute-sets="text11_bold">__________ / _________________</fo:block> <fo:block space-before="0.25cm" space-after="0.25cm"/> <fo:block xsl:use-attribute-sets="text11_bold">«____» _______________ 200__г.</fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:template> <!-- / печать --> </xsl:stylesheet> |
Страница 1 из 1 | Часовой пояс: UTC + 5 часов [ Летнее время ] |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |