Commit fd1df4ceb69acb6a58228d995356cba67b5956e6
1 parent
61a15460
Exists in
master
Ajustes para OTRS 5.0.x
Showing
8 changed files
with
162 additions
and
138 deletions
Show diff stats
... | ... | @@ -0,0 +1,18 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<projectDescription> | |
3 | + <name>otrs-faqtag</name> | |
4 | + <comment></comment> | |
5 | + <projects> | |
6 | + <project>otrs</project> | |
7 | + </projects> | |
8 | + <buildSpec> | |
9 | + <buildCommand> | |
10 | + <name>org.epic.perleditor.perlbuilder</name> | |
11 | + <arguments> | |
12 | + </arguments> | |
13 | + </buildCommand> | |
14 | + </buildSpec> | |
15 | + <natures> | |
16 | + <nature>org.epic.perleditor.perlnature</nature> | |
17 | + </natures> | |
18 | +</projectDescription> | ... | ... |
FAQTag.sopm
1 | 1 | <?xml version="1.0" encoding="utf-8" ?> |
2 | 2 | <otrs_package version="1.0"> |
3 | 3 | <Name>FAQTag</Name> |
4 | - <Version>1.3</Version> | |
4 | + <Version>1.4.0</Version> | |
5 | 5 | <Vendor>SeTIC</Vendor> |
6 | 6 | <URL>http://setic.ufsc.br</URL> |
7 | 7 | <License>GNU GENERAL PUBLIC LICENSE Version 2, June 1991</License> |
8 | 8 | <ChangeLog Date="2013-03-19 9:17:53" Version="1.0">First version</ChangeLog> |
9 | 9 | <ChangeLog Date="2013-03-19 9:17:53" Version="1.2">Adjustments for OTRS 4.0.4.</ChangeLog> |
10 | 10 | <ChangeLog Date="2015-03-05" Version="1.3">Missing file.</ChangeLog> |
11 | + <ChangeLog Date="2016-01-19" Version="1.4.0">Adjustments for OTRS 5.0.x.</ChangeLog> | |
11 | 12 | <Description>Tags for FAQ sections.</Description> |
12 | - <Framework>4.0.x</Framework> | |
13 | + <Framework>5.0.x</Framework> | |
13 | 14 | <IntroInstall Title="Installed!" Type="post">Módulo installed successfully.</IntroInstall> |
14 | 15 | <BuildDate>?</BuildDate> |
15 | 16 | <BuildHost>?</BuildHost> |
... | ... | @@ -17,8 +18,8 @@ |
17 | 18 | <File Location="Kernel/Modules/AgentFAQTagOverview.pm" Permission="644"/> |
18 | 19 | <File Location="Kernel/Modules/RedirectFAQ.pm" Permission="644"/> |
19 | 20 | <File Location="Kernel/Modules/PublicRedirectFAQ.pm" Permission="644"/> |
20 | - <File Location="Kernel/Output/HTML/Standard/AgentFAQTagOverview.tt" Permission="644"/> | |
21 | - <File Location="Kernel/Output/HTML/Standard/AgentFAQTagAdd.tt" Permission="644"/> | |
21 | + <File Location="Kernel/Output/HTML/Templates/Standard/AgentFAQTagOverview.tt" Permission="644"/> | |
22 | + <File Location="Kernel/Output/HTML/Templates/Standard/AgentFAQTagAdd.tt" Permission="644"/> | |
22 | 23 | <File Location="Kernel/Config/Files/FAQTag.xml" Permission="644"/> |
23 | 24 | <File Location="Kernel/System/FAQTag.pm" Permission="644"/> |
24 | 25 | </Filelist> | ... | ... |
GeraOpm.sh
Kernel/Output/HTML/Standard/AgentFAQTagAdd.tt
... | ... | @@ -1,71 +0,0 @@ |
1 | -<style type="text/css"> | |
2 | - fieldset { | |
3 | - background: none; | |
4 | - border: none; | |
5 | - } | |
6 | -</style> | |
7 | - | |
8 | -<div class="Content"> | |
9 | - <form name="input" action="[% Env("CGIHandle") %]" method="post"> | |
10 | - <input type="hidden" name="Action" value="[% Env("Action") %]" /> | |
11 | - <input type="hidden" name="Subaction" value="AddUpdate" /> | |
12 | - <div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst"> | |
13 | - <h1>[% Translate("Gerenciamento de Tags") | html %]</h1> | |
14 | - <div class="SidebarColumn"> | |
15 | - <div class="WidgetSimple"> | |
16 | - <div class="Header"> | |
17 | - <h2>[% Translate("Actions") | html %]</h2> | |
18 | - </div> | |
19 | - <div class="Content"> | |
20 | - <ul class="ActionList"> | |
21 | - <li> | |
22 | - <a href="[% Env("Baselink") %]Action=AgentFAQTagOverview&Subaction=overview" class="CallForAction"><span>[% Translate("Go to overview") | html %]</span></a> | |
23 | - </li> | |
24 | - </ul> | |
25 | - </div> | |
26 | - </div> | |
27 | - </div> | |
28 | - <div class="ContentColumn"> | |
29 | - <div class="WidgetSimple"> | |
30 | - <div class="Header"> | |
31 | - <h2>Editar Tag: [% Data.CategoryName | html %]</h2> | |
32 | - </div> | |
33 | - <div class="Content SpacingBottom"> | |
34 | - <fieldset class="TableLike"> | |
35 | - | |
36 | - <label class="Mandatory" for="tag" ><span class="Marker">*</span> Tag:</label> | |
37 | - <div class="Field"> | |
38 | - <input type="hidden" id="CategoryID" name="CategoryID" value="[% Data.CategoryID | html %]"/> | |
39 | - <input type="hidden" id="Update" name="Update" value="[% Data.Update | html %]"/> | |
40 | - <input type="text" id="Tag" name="Tag" class="W50pc Validate_Required " length="15" value="[% Data.Tag | html %]"/> | |
41 | - </div> | |
42 | - [% Data.MensagemErro | html %] | |
43 | - <div class="Clear"></div> | |
44 | - <div class="Field SpacingTop"> | |
45 | - <button class="Primary" type="submit" id="cadastrar" value="Cadastrar">[% Translate("Submit") | html %]</button> | |
46 | - [% Translate("or") | html %] | |
47 | - <a href="/otrs/index.pl?Action=AgentFAQTagOverview">Cancelar</a> | |
48 | - </div> | |
49 | - <div class="Clear"></div> | |
50 | - | |
51 | - </fieldset> | |
52 | - </div> | |
53 | - </div> | |
54 | - </div> | |
55 | - </div> | |
56 | - </form> | |
57 | -</div> | |
58 | - | |
59 | -<script language="javascript"> | |
60 | -// Torna os campos obrigatórios | |
61 | -function valida_dados (nomeform) { | |
62 | - if (nomeform.tag.value=="") { | |
63 | - alert ("Por favor digite o nome para a tag."); | |
64 | - return false; | |
65 | - } else { | |
66 | - return true; | |
67 | - } | |
68 | -} | |
69 | - | |
70 | -</script> | |
71 | - |
Kernel/Output/HTML/Standard/AgentFAQTagOverview.tt
... | ... | @@ -1,61 +0,0 @@ |
1 | - | |
2 | -<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst"> | |
3 | - <h1>[% Translate("Gerenciamento de Tags") | html %]</h1> | |
4 | - <div class="SidebarColumn"> | |
5 | - <div class="WidgetSimple"> | |
6 | - <div class="Header"> | |
7 | - <h2>[% Translate("Hint") | html %]</h2> | |
8 | - </div> | |
9 | - <div class="Content"> | |
10 | - <p class="FieldExplanation">Tabela de todas as categorias da FAQ com suas respectivas tags.</p> | |
11 | - <p class="FieldExplanation">Adicione uma tag para gerar um endereço mais simples a determinada categoria.</p> | |
12 | - </div> | |
13 | - </div> | |
14 | - </div> | |
15 | - <div class="ContentColumn"> | |
16 | - <div class="WidgetSimple"> | |
17 | - <div class="Header"> | |
18 | - <h2>Lista</h2> | |
19 | - </div> | |
20 | - <div class="Content SpacingBottom"> | |
21 | - <table class="DataTable SpacingTop"> | |
22 | - <thead> | |
23 | - <tr> | |
24 | - <th><center>Categoria</center></th> | |
25 | - <th><center>Tag</center></th> | |
26 | - <th><center>Opções</center></th> | |
27 | - </tr> | |
28 | - </thead> | |
29 | - <tbody> | |
30 | -[% RenderBlockStart("OverviewResultRow") %] | |
31 | - <tr> | |
32 | - <td>[% Data.Name | html %]</td> | |
33 | - <td><center>[% Data.Tag | html %]</center></td> | |
34 | - <td> | |
35 | - <center> | |
36 | - <a style="[% Data.ShowDelete | html %]" class="TrashCan" onClick="remover('[% Data.Name | html %]','[% Data.CategoryID | html %]')"> | |
37 | - <i class="fa fa-trash-o"></i> | |
38 | - </a> | |
39 | - <a href='[% Env("Baselink") %]Action=AgentFAQTagOverview&Subaction=CreateUpdate&CategoryID=[% Data.CategoryID | html %]' class="CallForAction"><span>[% Translate("Alterar Tag") | html %]</span></a> | |
40 | - </center> | |
41 | - </td> | |
42 | - </tr> | |
43 | -[% RenderBlockEnd("OverviewResultRow") %] | |
44 | - </tbody> | |
45 | - </table> | |
46 | - </div> | |
47 | - </div> | |
48 | - </div> | |
49 | -</div> | |
50 | - | |
51 | -<script type="text/javascript" charset="utf-8">//<![CDATA[ | |
52 | -function remover(CategoryName, CategoryID){ | |
53 | - if(CategoryID){ | |
54 | - var confirma = confirm("Tem certeza de que deseja remover a tag da categoria '" + CategoryName +"' ?"); | |
55 | - if(confirma){ | |
56 | - window.location.href = "index.pl?Action=AgentFAQTagOverview&Subaction=delete&CategoryID="+CategoryID; | |
57 | - } | |
58 | - } | |
59 | -} | |
60 | - | |
61 | -</script> |
... | ... | @@ -0,0 +1,71 @@ |
1 | +<style type="text/css"> | |
2 | + fieldset { | |
3 | + background: none; | |
4 | + border: none; | |
5 | + } | |
6 | +</style> | |
7 | + | |
8 | +<div class="Content"> | |
9 | + <form name="input" action="[% Env("CGIHandle") %]" method="post"> | |
10 | + <input type="hidden" name="Action" value="[% Env("Action") %]" /> | |
11 | + <input type="hidden" name="Subaction" value="AddUpdate" /> | |
12 | + <div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst"> | |
13 | + <h1>[% Translate("Gerenciamento de Tags") | html %]</h1> | |
14 | + <div class="SidebarColumn"> | |
15 | + <div class="WidgetSimple"> | |
16 | + <div class="Header"> | |
17 | + <h2>[% Translate("Actions") | html %]</h2> | |
18 | + </div> | |
19 | + <div class="Content"> | |
20 | + <ul class="ActionList"> | |
21 | + <li> | |
22 | + <a href="[% Env("Baselink") %]Action=AgentFAQTagOverview&Subaction=overview" class="CallForAction"><span>[% Translate("Go to overview") | html %]</span></a> | |
23 | + </li> | |
24 | + </ul> | |
25 | + </div> | |
26 | + </div> | |
27 | + </div> | |
28 | + <div class="ContentColumn"> | |
29 | + <div class="WidgetSimple"> | |
30 | + <div class="Header"> | |
31 | + <h2>Editar Tag: [% Data.CategoryName | html %]</h2> | |
32 | + </div> | |
33 | + <div class="Content SpacingBottom"> | |
34 | + <fieldset class="TableLike"> | |
35 | + | |
36 | + <label class="Mandatory" for="tag" ><span class="Marker">*</span> Tag:</label> | |
37 | + <div class="Field"> | |
38 | + <input type="hidden" id="CategoryID" name="CategoryID" value="[% Data.CategoryID | html %]"/> | |
39 | + <input type="hidden" id="Update" name="Update" value="[% Data.Update | html %]"/> | |
40 | + <input type="text" id="Tag" name="Tag" class="W50pc Validate_Required " length="15" value="[% Data.Tag | html %]"/> | |
41 | + </div> | |
42 | + [% Data.MensagemErro | html %] | |
43 | + <div class="Clear"></div> | |
44 | + <div class="Field SpacingTop"> | |
45 | + <button class="Primary" type="submit" id="cadastrar" value="Cadastrar">[% Translate("Submit") | html %]</button> | |
46 | + [% Translate("or") | html %] | |
47 | + <a href="/otrs/index.pl?Action=AgentFAQTagOverview">Cancelar</a> | |
48 | + </div> | |
49 | + <div class="Clear"></div> | |
50 | + | |
51 | + </fieldset> | |
52 | + </div> | |
53 | + </div> | |
54 | + </div> | |
55 | + </div> | |
56 | + </form> | |
57 | +</div> | |
58 | + | |
59 | +<script language="javascript"> | |
60 | +// Torna os campos obrigatórios | |
61 | +function valida_dados (nomeform) { | |
62 | + if (nomeform.tag.value=="") { | |
63 | + alert ("Por favor digite o nome para a tag."); | |
64 | + return false; | |
65 | + } else { | |
66 | + return true; | |
67 | + } | |
68 | +} | |
69 | + | |
70 | +</script> | |
71 | + | ... | ... |
Kernel/Output/HTML/Templates/Standard/AgentFAQTagOverview.tt
0 → 100644
... | ... | @@ -0,0 +1,61 @@ |
1 | + | |
2 | +<div class="MainBox ARIARoleMain LayoutFixedSidebar SidebarFirst"> | |
3 | + <h1>[% Translate("Gerenciamento de Tags") | html %]</h1> | |
4 | + <div class="SidebarColumn"> | |
5 | + <div class="WidgetSimple"> | |
6 | + <div class="Header"> | |
7 | + <h2>[% Translate("Hint") | html %]</h2> | |
8 | + </div> | |
9 | + <div class="Content"> | |
10 | + <p class="FieldExplanation">Tabela de todas as categorias da FAQ com suas respectivas tags.</p> | |
11 | + <p class="FieldExplanation">Adicione uma tag para gerar um endereço mais simples a determinada categoria.</p> | |
12 | + </div> | |
13 | + </div> | |
14 | + </div> | |
15 | + <div class="ContentColumn"> | |
16 | + <div class="WidgetSimple"> | |
17 | + <div class="Header"> | |
18 | + <h2>Lista</h2> | |
19 | + </div> | |
20 | + <div class="Content SpacingBottom"> | |
21 | + <table class="DataTable SpacingTop"> | |
22 | + <thead> | |
23 | + <tr> | |
24 | + <th><center>Categoria</center></th> | |
25 | + <th><center>Tag</center></th> | |
26 | + <th><center>Opções</center></th> | |
27 | + </tr> | |
28 | + </thead> | |
29 | + <tbody> | |
30 | +[% RenderBlockStart("OverviewResultRow") %] | |
31 | + <tr> | |
32 | + <td>[% Data.Name | html %]</td> | |
33 | + <td><center>[% Data.Tag | html %]</center></td> | |
34 | + <td> | |
35 | + <center> | |
36 | + <a style="[% Data.ShowDelete | html %]" class="TrashCan" onClick="remover('[% Data.Name | html %]','[% Data.CategoryID | html %]')"> | |
37 | + <i class="fa fa-trash-o"></i> | |
38 | + </a> | |
39 | + <a href='[% Env("Baselink") %]Action=AgentFAQTagOverview&Subaction=CreateUpdate&CategoryID=[% Data.CategoryID | html %]' class="CallForAction"><span>[% Translate("Alterar Tag") | html %]</span></a> | |
40 | + </center> | |
41 | + </td> | |
42 | + </tr> | |
43 | +[% RenderBlockEnd("OverviewResultRow") %] | |
44 | + </tbody> | |
45 | + </table> | |
46 | + </div> | |
47 | + </div> | |
48 | + </div> | |
49 | +</div> | |
50 | + | |
51 | +<script type="text/javascript" charset="utf-8">//<![CDATA[ | |
52 | +function remover(CategoryName, CategoryID){ | |
53 | + if(CategoryID){ | |
54 | + var confirma = confirm("Tem certeza de que deseja remover a tag da categoria '" + CategoryName +"' ?"); | |
55 | + if(confirma){ | |
56 | + window.location.href = "index.pl?Action=AgentFAQTagOverview&Subaction=delete&CategoryID="+CategoryID; | |
57 | + } | |
58 | + } | |
59 | +} | |
60 | + | |
61 | +</script> | ... | ... |