Kawai Wiki

Rev

Rev 154 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
147 soliveira 1
-- MySQL dump 10.13  Distrib 5.1.40, for apple-darwin9.5.0 (i386)
5 soliveira 2
--
224 soliveira 3
-- Host: localhost    Database: kawai
5 soliveira 4
-- ------------------------------------------------------
147 soliveira 5
-- Server version       5.1.40
5 soliveira 6
 
7
 
8
 
9
 
10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
--
224 soliveira 19
-- Current Database: `kawai`
5 soliveira 20
--
21
 
22
 
23
 
24
--
53 soliveira 25
-- Table structure for table `Pages`
5 soliveira 26
--
27
 
53 soliveira 28
DROP TABLE IF EXISTS `Pages`;
5 soliveira 29
 
30
 
53 soliveira 31
CREATE TABLE `Pages` (
32
  `id` INT(11) NOT NULL AUTO_INCREMENT,
33
  `name` VARCHAR(100) NOT NULL,
34
  `language_id` INT(11) NOT NULL,
35
  `front_page` enum('T','F') NOT NULL DEFAULT 'F',
36
  `system_page` enum('T','F') NOT NULL DEFAULT 'F',
37
  `title` VARCHAR(255) DEFAULT NULL,
38
  `body` text NOT NULL,
39
  `modified_by` INT(11) DEFAULT NULL,
40
  `modified_on` TIMESTAMP NULL DEFAULT NULL,
41
  `created_by` INT(11) NOT NULL,
42
  `created_on` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
57 soliveira 43
  `deleted` enum('T','F') NOT NULL DEFAULT 'F',
53 soliveira 44
  PRIMARY KEY (`id`),
147 soliveira 45
  UNIQUE KEY `indx_name_lang` (`name`,`language_id`),
46
  KEY `indx_deleted` (`deleted`),
47
  KEY `indx_front_page` (`front_page`),
48
  KEY `indx_language_id` (`language_id`)
5 soliveira 49
);
50
 
51
 
52
--
53 soliveira 53
-- Dumping data for table `Pages`
5 soliveira 54
--
55
 
56
 
154 soliveira 57
INSERT INTO `Pages` VALUES (1,'LeftColumn',1,'F','T','','<h3>Section H3</h3>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"My Page One\"  /]</li>\r\n<li>[pageLink name=\"Page2\" text=\"My Page Two\" class=\"large\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"small\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"large\">Google</a></li>\r\n</ul>\r\n\r\n<h3>Section H3</h3>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"My Page One\" class=\"large\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"large\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"large\">Google</a></li>\r\n</ul>\r\n\r\n<h4>Section H4</h4>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"My Page One\" class=\"medium\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"medium\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"medium\">Google</a></li>\r\n</ul>\r\n<br/>\r\n\r\n<h5>Section H5</h5>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"My Page One\" class=\"small\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"small\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"small\">Google</a></li>\r\n</ul>\r\n',2,'2011-11-06 19:18:29',1,'2011-10-25 21:32:07','F'),(2,'LeftColumn',2,'F','T','','<h3>Seção H3</h3>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"Página Um\"  /]</li>\r\n<li>[pageLink name=\"Page2\" text=\"Página Dois\" class=\"large\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"small\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"large\">Google</a></li>\r\n</ul>\r\n\r\n<h3>Seção H3</h3>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"Página Um\" class=\"large\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"large\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"large\">Google</a></li>\r\n</ul>\r\n\r\n<h4>Seção H4</h4>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"Página Um\" class=\"medium\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"medium\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"medium\">Google</a></li>\r\n</ul>\r\n<br/>\r\n\r\n<h5>Seção H5</h5>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"Página Um\" class=\"small\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"small\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"small\">Google</a></li>\r\n</ul>\r\n\r\n',2,'2011-11-06 19:16:38',1,'2011-10-25 21:32:07','F'),(26,'Page1',1,'F','F','My Page One','<h2>My Page One</h2>\r\nWrite whatever you want here:\r\n<ul>\r\n<li>\r\nBlah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah\r\n</li>\r\n</ul>\r\n<br/>\r\n[code]\r\n\r\npackage org.kawai.model;\r\n\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport java.util.Locale;\r\n\r\nimport org.mentawai.list.ListData;\r\nimport org.mentawai.list.SimpleListData;\r\n\r\npublic class Language {\r\n\r\n       private static final List<Language> LANGUAGES = new ArrayList<Language>(16);\r\n        \r\n    private final int id;\r\n       private final String name;\r\n  private final Locale loc;\r\n   private final String imageFile;\r\n\r\n    public Language(int code, String name, String locale, String imageFile) {\r\n        this.id = code;\r\n     this.name = name;\r\n           this.loc = getLocaleFromString(locale);\r\n     this.imageFile = imageFile;\r\n    }\r\n    \r\n    public Language(int code, String name, String locale) {\r\n         this(code, name, locale, null);\r\n    }\r\n    \r\n    public static void add(Language language) {\r\n         LANGUAGES.add(language);\r\n    }\r\n    \r\n    public static Language getDefault() {\r\n      if (LANGUAGES.isEmpty()) throw new IllegalStateException(\"No languages were defined!\");\r\n           return LANGUAGES.get(0);\r\n    }\r\n\r\n    public int getId() {\r\n           return id;\r\n    }\r\n    \r\n    public String getName() {\r\n        return name;\r\n    }\r\n    \r\n    public Locale getLocale() {\r\n            return loc;\r\n    }\r\n    \r\n    public String getImageFile() {\r\n          return imageFile;\r\n    }\r\n    \r\n    @Override\r\n    public String toString() {\r\n       return name;\r\n    }\r\n    \r\n    public static ListData getListData() {\r\n         SimpleListData list = new SimpleListData(\"languages\");\r\n            for(Language l : LANGUAGES) {\r\n               list.add(l.getId(), l.getName());\r\n           }\r\n           return list;\r\n    }\r\n    \r\n    public static Language fromId(int id) {\r\n        for(Language l : LANGUAGES) {\r\n               if (l.getId() == id) return l;\r\n      }\r\n           return null;\r\n    }\r\n    \r\n    public static Language fromLocale(Locale loc) {\r\n        if (loc == null) return null;\r\n       for(Language l : LANGUAGES) {\r\n               if (l.getLocale().equals(loc)) return l;\r\n            }\r\n           for(Language l : LANGUAGES) {\r\n               if (l.getLocale().getLanguage().equals(loc.getLanguage())) {\r\n                        return l;\r\n                   }\r\n           }\r\n           return null;\r\n    }\r\n    \r\n    public static Language fromLocale(String s) {\r\n          if (s == null) return null;\r\n         Locale loc = getLocaleFromString(s);\r\n        return fromLocale(loc);\r\n    }\r\n    \r\n    public static Language fromName(String name) {\r\n      if (name == null) return null;\r\n      for(Language l : LANGUAGES) {\r\n               if (l.getName().equalsIgnoreCase(name)) return l;\r\n           }\r\n           return null;\r\n    }\r\n    \r\n    public static Locale getLocaleFromString(String s) {\r\n           if (s == null) return null;\r\n        String[] temp = s.split(\"_\");\r\n        if (temp.length == 1) {\r\n            return new Locale(temp[0]);\r\n        } else if (temp.length == 2) {\r\n            return new Locale(temp[0], temp[1]);\r\n        } else if (temp.length == 3) {\r\n            return new Locale(temp[0], temp[1], temp[2]);\r\n        }\r\n        return null;\r\n    }\r\n    \r\n    public static List<Language> all() {\r\n         return LANGUAGES;\r\n    }\r\n    \r\n    public static void clear() {\r\n      LANGUAGES.clear();\r\n    }\r\n}\r\n[/code]\r\n',2,'2011-11-06 18:48:54',1,'2011-11-06 18:48:20','F'),(3,'Intro',1,'T','F','Welcome to Kawai, the Wiki for Open Source projects!','<h1>Header H1</h1>\r\n<ul>\r\n    <li>Test 1</li>\r\n    <li>Test 2</li>\r\n    <li>Test 3</li>\r\n</ul>\r\n<br />\r\n\r\n<h2>Header H2</h2>\r\nSome content goes here. Some content goes here. Some content goes here. Some content goes here. Some content goes here. Some content goes here. Some content goes here. Some content goes here. Some content goes here. Some content goes here. Some content goes here. Some content goes here. Some content goes here. Some content goes here. Some content goes here. \r\n<br /><br/>\r\n\r\n<h3>Header H3</h3>\r\nYou can use the &#91;code&#93; tag to format source code:\r\n<br/><br/>\r\n[code]\r\npackage org.kawai.tag.kcode;\r\n\r\nimport java.util.Map;\r\n\r\nimport javax.servlet.jsp.JspException;\r\nimport javax.servlet.jsp.PageContext;\r\n\r\npublic interface KCode {\r\n       \r\n    public String getTag();\r\n     \r\n    public boolean hasBody();\r\n   \r\n    public String process(PageContext pageContext, Map<String, String> attributes, String body) throws JspException;\r\n}\r\n[/code]\r\n<p>\r\nAnd simple HTML to write your technical content. There are also many kawai tags that you can use and you can even create your own tags to help you.\r\n</p>\r\n<h4>Header H4</h4>\r\n<ul>\r\n    <li>Test 1</li>\r\n    <li>Test 2</li>\r\n    <li>Test 3</li>\r\n    <li>Test 4</li>\r\n</ul>\r\n<h5>Header H5</h5>\r\n<ul>\r\n    <li>Test 1</li>\r\n    <li>Test 2</li>\r\n    <li>Test 3</li>\r\n    <li>Test 4</li>\r\n</ul>\r\n<br />\r\n',2,'2011-11-06 18:44:11',1,'2011-10-25 21:32:07','F'),(4,'Intro',2,'T','F','Bem-vindo ao Kawai, o Wiki para Open Source','<h1>Cabeçalho H1</h1>\r\n<ul>\r\n    <li>Teste 1</li>\r\n    <li>Teste 2</li>\r\n    <li>Teste 3</li>\r\n</ul>\r\n<br />\r\n\r\n<h2>Cabeçalho H2</h2>\r\nAlgum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. \r\n<br /><br/>\r\n\r\n<h3>Header H3</h3>\r\nVocê também pode formatar código facilmente com a tag &#91;code&#93;:\r\n<br/><br/>\r\n[code]\r\npackage org.kawai.tag.kcode;\r\n\r\nimport java.util.Map;\r\n\r\nimport javax.servlet.jsp.JspException;\r\nimport javax.servlet.jsp.PageContext;\r\n\r\npublic interface KCode {\r\n   \r\n    public String getTag();\r\n     \r\n    public boolean hasBody();\r\n   \r\n    public String process(PageContext pageContext, Map<String, String> attributes, String body) throws JspException;\r\n}\r\n[/code]\r\n<p>\r\nPara publicar conteúdo você pode usar tags simples de HTML ou as tags do Kawai. E você pode criar suas próprias tags.\r\n</p>\r\n<h4>Cabeçalho H4</h4>\r\n<ul>\r\n    <li>Teste 1</li>\r\n    <li>Teste 2</li>\r\n    <li>Teste 3</li>\r\n    <li>Teste 4</li>\r\n</ul>\r\n<h5>Cabeçalho H5</h5>\r\n<ul>\r\n    <li>Teste 1</li>\r\n    <li>Teste 2</li>\r\n    <li>Teste 3</li>\r\n    <li>Teste 4</li>\r\n</ul>\r\n<br />\r\n',2,'2011-11-06 19:19:10',1,'2011-10-25 21:32:07','F'),(5,'CSS',1,'F','T','','/************************/\r\n/* CSS BASE SddddddTARTS         */\r\n/************************/\r\nbody {\r\n  margin: 0px;\r\n  padding: 0px 0px 10px 0px;\r\n}\r\nimg {\r\n  border:none;\r\n}\r\ntable {\r\n  padding:0px;\r\n  width: 100%;\r\n  margin-left: -2px;\r\n  margin-right: -2px;\r\n}\r\nacronym {\r\n  cursor: help;\r\n  border-bottom: 1px dotted #feb;\r\n}\r\ntable.bodyTable th, table.bodyTable td {\r\n  padding: 2px 4px 2px 4px;\r\n  vertical-align: top;\r\n}\r\ndiv.clear{\r\n  clear:both;\r\n  visibility: hidden;\r\n}\r\ndiv.clear hr{\r\n  display: none;\r\n}\r\n\r\niframe { \r\nwidth: 100%;\r\n_width: 80%; /* IE 6 */\r\n}\r\n\r\n#projectLogo {\r\n  font-size: xx-large; \r\n  font-weight: bold;\r\n}\r\n#organizationLogo img, #projectLogo img, #projectLogo span{\r\n  margin: 8px;\r\n}\r\n#projectLogo span{\r\n    border: 1px solid;\r\n    padding: 4px 10px 4px 10px;\r\n    background-color: #eee;\r\n    cursor: pointer;\r\n}\r\n.xleft, #organizationLogo img{\r\n  float:left;\r\n} \r\n.xright, #projectLogo img, #projectLogo span{\r\n  float:right;\r\n  text-shadow: #7CFC00;\r\n}\r\n#banner {\r\n  border-bottom: 1px solid #fff;\r\n}\r\n#banner img {\r\n  border: none;\r\n}\r\n#footer, #breadcrumbs {\r\n  padding: 3px 10px 3px 10px;\r\n}\r\n#leftColumn {\r\n width: 18%;\r\n float:left;\r\n}\r\n#bodyColumn {\r\n  margin-left: 20%;\r\n  margin-right: 1%;\r\n}\r\n#navcolumn {\r\n  padding: 8px 4px 0 8px;\r\n}\r\n#navcolumn h5, #navcolumn ul {\r\n  margin: 0;\r\n  padding: 0;\r\n  font-size: small;\r\n}\r\n#navcolumn li {\r\n  list-style-type: none;\r\n  background-image: none;\r\n  background-repeat: no-repeat;\r\n  background-position: 0 0.4em;\r\n  padding-left: 16px;\r\n  list-style-position: ouside;\r\n  line-height: 1.2em;\r\n  font-size: smaller;\r\n}\r\n#navcolumn li.expanded {\r\n  background-image: url(../images/expanded.gif);\r\n}\r\n#navcolumn li.collapsed {\r\n  background-image: url(../images/collapsed.gif);\r\n}\r\n#poweredBy {\r\n  text-align: center;\r\n}\r\n#navcolumn img {\r\n  margin-top: 10px;\r\n  margin-bottom: 3px;\r\n}\r\n#poweredBy img {\r\n  display:block;\r\n  margin: 20px 0 20px 17px;\r\n  border: 1px solid black;\r\n  width: 90px;\r\n  height: 30px;\r\n}\r\n#search img {\r\n    margin: 0px;\r\n    display: block;\r\n}\r\n#search #q, #search #btnG {\r\n    border: 1px solid #999;\r\n    margin-bottom:10px;\r\n}\r\n#search form {\r\n    margin: 0px;\r\n}\r\n#lastPublished {\r\n  font-size: x-small;\r\n}\r\n.navSection {\r\n  margin-bottom: 2px;\r\n  padding: 8px;\r\n}\r\n.navSectionHead {\r\n  font-weight: bold;\r\n  font-size: x-small;\r\n}\r\n.section {\r\n  padding: 4px;\r\n}\r\n#footer {\r\n  font-size: x-small;\r\n}\r\n#breadcrumbs {\r\n  font-size: x-small;\r\n  margin: 0pt;\r\n}\r\n.source {\r\n  padding: 12px;\r\n  margin: 1em 7px 1em 7px;\r\n}\r\n.source pre {\r\n  margin: 0px;\r\n  padding: 0px;\r\n}\r\n\r\n/****************************/\r\n/* CSS OVERRIDE STARTS HERE */\r\n/****************************/\r\n\r\nbody, td, select, input, li{\r\n  font-family: Verdana, Helvetica, Arial, sans-serif;\r\n  font-size: 13px;\r\n}\r\na {\r\n  text-decoration: none;\r\n}\r\na:link {\r\n  color:#36a;\r\n}\r\na:visited  {\r\n  color:#47a;\r\n}\r\na:active, a:hover {\r\n  color:#69c;\r\n}\r\na.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {\r\n  background: url(../images/external.png) right center no-repeat;\r\n  padding-right: 15px;\r\n}\r\na.newWindow, a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {\r\n  background: url(../images/newwindow.png) right center no-repeat;\r\n  padding-right: 18px;\r\n}\r\n\r\n#bodyColumn h1 {\r\n  padding: 4px 4px 4px 6px;\r\n  border: 1px solid #999;\r\n  color: #900;\r\n  background-color: #ccc;\r\n  font-weight:900;\r\n  font-size: 28px;\r\n}\r\n\r\n#bodyColumn h2 {\r\n  padding: 4px 4px 4px 6px;\r\n  border: 1px solid #999;\r\n  color: #900;\r\n  background-color: #ddd;\r\n  font-weight:900;\r\n  font-size: 24px;\r\n}\r\n\r\n#bodyColumn h3 {\r\n  padding: 4px 4px 4px 6px;\r\n  border: 1px solid #aaa;\r\n  color: #900;\r\n  background-color: #eee;\r\n  font-weight: normal;\r\n  font-size: 20px;\r\n}\r\n#bodyColumn h4 {\r\n  padding: 4px 4px 4px 6px;\r\n  border: 1px solid #aaa;\r\n  color: #900;\r\n  background-color: #eee;\r\n  font-weight: normal;\r\n  font-size: 16px;\r\n}\r\n#bodyColumn h5 {\r\n  padding: 4px 4px 4px 6px;\r\n  border: 1px solid #aaa;\r\n  color: #900;\r\n  background-color: #fff;\r\n  font-weight: normal;\r\n  font-size: 14px;\r\n}\r\n\r\n\r\np {\r\n  line-height: 1.3em;\r\n  font-size: small;\r\n}\r\n#breadcrumbs {\r\n  border-top: 1px solid #aaa;\r\n  border-bottom: 1px solid #aaa;\r\n  background-color: #ccc;\r\n}\r\n#leftColumn {\r\n  margin: 10px 0 0 5px;\r\n  border: 1px solid #999;\r\n  background-color: #eee;\r\n}\r\n#navcolumn h3 {\r\n  font-size: 14px;\r\n  border-bottom: 1px solid #aaaaaa;\r\n  padding-left: 4px;\r\n}\r\n#navcolumn h4 {\r\n  font-size: 12px;\r\n  border-bottom: 1px solid #aaaaaa;\r\n  padding-left: 4px;\r\n}\r\n\r\n#navcolumn h5 {\r\n  font-size: smaller;\r\n  border-bottom: 1px solid #aaaaaa;\r\n  padding-left: 4px;\r\n  margin-bottom: 15px;\r\n}\r\n\r\n#navcolumn .large {\r\n  font-size: 14px;\r\n  padding-bottom: 2px;\r\n}\r\n\r\n#navcolumn .largeClicked {\r\n  font-size: 14px;\r\n  padding-bottom: 2px;\r\n  color: #451D29;\r\n}\r\n\r\n\r\n#navcolumn .medium {\r\n  font-size: 13px;\r\n  padding-bottom: 2px;\r\n}\r\n\r\n#navcolumn .small {\r\n  font-size: 12px;\r\n  padding-bottom: 2px;\r\n}\r\n#navcolumn li {\r\n  padding-bottom: 2px;\r\n}\r\ntable.bodyTable th {\r\n  color: white;\r\n  background-color: #bbb;\r\n  text-align: left;\r\n  font-weight: bold;\r\n}\r\n\r\ntable.bodyTable th, table.bodyTable td {\r\n  font-size: 1em;\r\n}\r\n\r\ntable.bodyTable tr.a {\r\n  background-color: #ddd;\r\n}\r\n\r\ntable.bodyTable tr.b {\r\n  background-color: #eee;\r\n}\r\n\r\n.source {\r\n  border: 1px solid #999;\r\n}\r\n\r\n/* For the list all pages table */\r\n\r\n#listAllPagesTable\r\n{\r\n        font-family: \"Lucida Sans Unicode\", \"Lucida Grande\", Sans-Serif;\r\n        font-size: 12px;\r\n    background: #fff;\r\n   margin: 25px;\r\n       width: 90%;\r\n border-collapse: collapse;\r\n  text-align: center;\r\n}\r\n#listAllPagesTable th\r\n{\r\n      font-size: 14px;\r\n    font-weight: normal;\r\n        color: #039;\r\n        padding: 10px 8px;\r\n  border-bottom: 2px solid #6678b1;\r\n}\r\n#listAllPagesTable td\r\n{\r\n        border-bottom: 1px solid #ccc;\r\n      color: #669;\r\n        padding: 6px 8px;\r\n        height: 30px; overflow-y: hidden;\r\n}\r\n#listAllPagesTable tbody tr:hover td\r\n{\r\n    color: #009;\r\n}\r\n\r\n/* for list revisions */\r\n\r\n.revisionsTable\r\n{\r\n       font-family: \"Lucida Sans Unicode\", \"Lucida Grande\", Sans-Serif;\r\n        font-size: 12px;\r\n    background: #fff;\r\n   margin: 25px;\r\n       width: 90%;\r\n border-collapse: collapse;\r\n  text-align: center;\r\n}\r\n.revisionsTable th\r\n{\r\n font-size: 14px;\r\n    font-weight: normal;\r\n        color: #039;\r\n        padding: 10px 8px;\r\n  border-bottom: 2px solid #6678b1;\r\n}\r\n.revisionsTable td\r\n{\r\n   border-bottom: 1px solid #ccc;\r\n      color: #669;\r\n        padding: 6px 8px;\r\n        height: 30px; overflow-y: hidden;\r\n}\r\n.revisionsTable tbody tr:hover td\r\n{\r\n       color: #009;\r\n}\r\n',2,'2011-11-06 00:13:38',1,'2011-10-25 21:32:07','F'),(6,'PrintCSS',1,'F','T',NULL,'/* For printing */\n\n#banner, #footer, #leftcol, #breadcrumbs, .docs #toc, .docs .courtesylinks, #leftColumn, #navColumn {\n display: none;\n}\n#bodyColumn, body.docs div.docs {\n  margin: 0 !important;\n border: none !important\n}',NULL,NULL,1,'2011-10-25 21:32:07','F'),(17,'Logo',1,'F','T','','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"[contextPath/]\"><img src=\"[contextPath /]/images/kawai-logo2.png\" border=\"0\" /></a>',2,'2011-11-05 23:21:51',1,'2011-10-29 12:47:06','F'),(18,'Logo',2,'F','T','','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"[contextPath/]\"><img src=\"[contextPath /]/images/kawai-logo2.png\" border=\"0\" /></a>',2,'2011-11-05 23:02:42',1,'2011-10-29 12:47:06','F'),(20,'JavaScript',1,'F','T','','function myJavaScriptFunction {\r\n\r\n   // put something here!!!!\r\n\r\n}\r\n',2,'2011-11-01 14:26:11',1,'2011-10-31 08:49:02','F'),(27,'Page1',2,'F','F','Minha Página Um','<h2>Minha Página Um</h2>\r\nPublique qualquer coisa aqui:\r\n<ul>\r\n<li>\r\nBlah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah\r\n</li>\r\n</ul>\r\n<br/>\r\n[code]\r\n\r\npackage org.kawai.model;\r\n\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport java.util.Locale;\r\n\r\nimport org.mentawai.list.ListData;\r\nimport org.mentawai.list.SimpleListData;\r\n\r\npublic class Language {\r\n\r\n      private static final List<Language> LANGUAGES = new ArrayList<Language>(16);\r\n        \r\n    private final int id;\r\n       private final String name;\r\n  private final Locale loc;\r\n   private final String imageFile;\r\n\r\n    public Language(int code, String name, String locale, String imageFile) {\r\n        this.id = code;\r\n     this.name = name;\r\n           this.loc = getLocaleFromString(locale);\r\n     this.imageFile = imageFile;\r\n    }\r\n    \r\n    public Language(int code, String name, String locale) {\r\n         this(code, name, locale, null);\r\n    }\r\n    \r\n    public static void add(Language language) {\r\n         LANGUAGES.add(language);\r\n    }\r\n    \r\n    public static Language getDefault() {\r\n      if (LANGUAGES.isEmpty()) throw new IllegalStateException(\"No languages were defined!\");\r\n           return LANGUAGES.get(0);\r\n    }\r\n\r\n    public int getId() {\r\n           return id;\r\n    }\r\n    \r\n    public String getName() {\r\n        return name;\r\n    }\r\n    \r\n    public Locale getLocale() {\r\n            return loc;\r\n    }\r\n    \r\n    public String getImageFile() {\r\n          return imageFile;\r\n    }\r\n    \r\n    @Override\r\n    public String toString() {\r\n       return name;\r\n    }\r\n    \r\n    public static ListData getListData() {\r\n         SimpleListData list = new SimpleListData(\"languages\");\r\n            for(Language l : LANGUAGES) {\r\n               list.add(l.getId(), l.getName());\r\n           }\r\n           return list;\r\n    }\r\n    \r\n    public static Language fromId(int id) {\r\n        for(Language l : LANGUAGES) {\r\n               if (l.getId() == id) return l;\r\n      }\r\n           return null;\r\n    }\r\n    \r\n    public static Language fromLocale(Locale loc) {\r\n        if (loc == null) return null;\r\n       for(Language l : LANGUAGES) {\r\n               if (l.getLocale().equals(loc)) return l;\r\n            }\r\n           for(Language l : LANGUAGES) {\r\n               if (l.getLocale().getLanguage().equals(loc.getLanguage())) {\r\n                        return l;\r\n                   }\r\n           }\r\n           return null;\r\n    }\r\n    \r\n    public static Language fromLocale(String s) {\r\n          if (s == null) return null;\r\n         Locale loc = getLocaleFromString(s);\r\n        return fromLocale(loc);\r\n    }\r\n    \r\n    public static Language fromName(String name) {\r\n      if (name == null) return null;\r\n      for(Language l : LANGUAGES) {\r\n               if (l.getName().equalsIgnoreCase(name)) return l;\r\n           }\r\n           return null;\r\n    }\r\n    \r\n    public static Locale getLocaleFromString(String s) {\r\n           if (s == null) return null;\r\n        String[] temp = s.split(\"_\");\r\n        if (temp.length == 1) {\r\n            return new Locale(temp[0]);\r\n        } else if (temp.length == 2) {\r\n            return new Locale(temp[0], temp[1]);\r\n        } else if (temp.length == 3) {\r\n            return new Locale(temp[0], temp[1], temp[2]);\r\n        }\r\n        return null;\r\n    }\r\n    \r\n    public static List<Language> all() {\r\n         return LANGUAGES;\r\n    }\r\n    \r\n    public static void clear() {\r\n      LANGUAGES.clear();\r\n    }\r\n}\r\n[/code]\r\n',0,NULL,1,'2011-11-06 18:50:17','F'),(28,'Page2',1,'F','F','My Page Two','<h2>My Page 2</h2>\r\nYou can also show the uploaded pictures with some kawai tags:\r\n<ul>\r\n<li>American flag: [img file=\"flag_usa.gif\" /]</li>\r\n<br/>\r\n<li>Brazilian flag: [img file=\"flag_brazil.gif\" /]</li>\r\n</ul>\r\n\r\n',2,'2011-11-06 18:54:14',1,'2011-11-06 18:53:01','F'),(29,'Page2',2,'F','F','Minha Página Dois','<h2>Minha Página Dois</h2>\r\nVocê também pode exibir <i>uploaded images</i> com as tags do Kawai:\r\n<ul>\r\n<li>Bandeira americana: [img file=\"flag_usa.gif\" /]</li>\r\n<br/>\r\n<li>Bandeira brasileira: [img file=\"flag_brazil.gif\" /]</li>\r\n</ul>\r\n',0,NULL,1,'2011-11-06 18:56:02','F');
5 soliveira 58
 
59
 
60
--
60 soliveira 61
-- Table structure for table `Previews`
62
--
63
 
64
DROP TABLE IF EXISTS `Previews`;
65
 
66
 
67
CREATE TABLE `Previews` (
64 soliveira 68
  `id` INT(11) NOT NULL AUTO_INCREMENT,
69
  `name` VARCHAR(100) NOT NULL,
60 soliveira 70
  `language_id` INT(11) NOT NULL,
71
  `user_id` INT(11) NOT NULL,
72
  `created_on` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
73
  `title` VARCHAR(200) NOT NULL,
74
  `body` text NOT NULL,
108 soliveira 75
  `comment` VARCHAR(250) DEFAULT NULL,
60 soliveira 76
  PRIMARY KEY (`id`),
64 soliveira 77
  UNIQUE KEY `index_p_l_u` (`name`,`language_id`,`user_id`)
60 soliveira 78
);
79
 
80
 
81
--
82
-- Dumping data for table `Previews`
83
--
84
 
85
 
86
 
87
 
88
--
79 soliveira 89
-- Table structure for table `Revisions`
90
--
91
 
92
DROP TABLE IF EXISTS `Revisions`;
93
 
94
 
95
CREATE TABLE `Revisions` (
96
  `id` INT(11) NOT NULL AUTO_INCREMENT,
97
  `revision` INT(11) NOT NULL,
98
  `name` VARCHAR(100) NOT NULL,
99
  `language_id` INT(11) NOT NULL,
100
  `user_id` INT(11) NOT NULL,
101
  `created_on` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
89 soliveira 102
  `old_title` VARCHAR(250) DEFAULT NULL,
103
  `new_title` VARCHAR(250) DEFAULT NULL,
107 soliveira 104
  `old_body` text,
79 soliveira 105
  `new_body` text NOT NULL,
108 soliveira 106
  `comment` VARCHAR(250) DEFAULT NULL,
79 soliveira 107
  PRIMARY KEY (`id`),
147 soliveira 108
  KEY `index_n_l_r` (`name`,`language_id`,`revision`),
154 soliveira 109
  KEY `indx_language_id` (`language_id`),
110
  KEY `indx_created_on` (`created_on`)
79 soliveira 111
);
112
 
113
 
114
--
115
-- Dumping data for table `Revisions`
116
--
117
 
118
 
154 soliveira 119
INSERT INTO `Revisions` VALUES (84,0,'LeftColumn',1,2,'2011-11-06 19:18:29','','','<h3>Section H3</h3>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"My Page One\"  /]</li>\r\n<li>[pageLink name=\"Page2\" text=\"My Page Two\" class=\"large\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"small\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"large\">Google</a></li>\r\n</ul>\r\n\r\n<h3>Section H3</h3>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"My Page One\" class=\"large\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"large\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"large\">Google</a></li>\r\n</ul>\r\n\r\n<h4>Section H4</h4>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"My Page One\" class=\"medium\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"medium\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"medium\">Google</a></li>\r\n</ul>\r\n<br/>\r\n\r\n<h5>Section H5</h5> \r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"My Page One\" class=\"small\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"small\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"small\">Google</a></li>\r\n</ul>\r\n','<h3>Section H3</h3>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"My Page One\"  /]</li>\r\n<li>[pageLink name=\"Page2\" text=\"My Page Two\" class=\"large\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"small\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"large\">Google</a></li>\r\n</ul>\r\n\r\n<h3>Section H3</h3>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"My Page One\" class=\"large\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"large\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"large\">Google</a></li>\r\n</ul>\r\n\r\n<h4>Section H4</h4>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"My Page One\" class=\"medium\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"medium\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"medium\">Google</a></li>\r\n</ul>\r\n<br/>\r\n\r\n<h5>Section H5</h5>\r\n<ul>\r\n<li>[pageLink name=\"Page1\" text=\"My Page One\" class=\"small\"  /]</li>\r\n<li><a href=\"http://www.cnn.com\" target=\"_blank\" class=\"small\">CNN</a></li>\r\n<li><a href=\"http://www.google.com\" target=\"_blank\" class=\"small\">Google</a></li>\r\n</ul>\r\n','changed link'),(85,0,'Intro',2,2,'2011-11-06 19:19:10','Bem-vindo ao Kawai, o Wiki para Open Source','Bem-vindo ao Kawai, o Wiki para Open Source','<h1>Cabeçalho H1</h1>\r\n<ul>\r\n    <li>Teste 1</li>\r\n    <li>Teste 2</li>\r\n    <li>Teste 3</li>\r\n</ul>\r\n<br />\r\n\r\n<h2>Cabeçalho H2</h2>\r\nAlgum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. \r\n<br /><br/>\r\n\r\n<h3>Header H3</h3>\r\nVocê também pode formatar código facilmente com a tag &#91;code&#93;:\r\n<br/><br/>\r\n[code]\r\npackage org.kawai.tag.kcode;\r\n\r\nimport java.util.Map;\r\n\r\nimport javax.servlet.jsp.JspException;\r\nimport javax.servlet.jsp.PageContext;\r\n\r\npublic interface KCode {\r\n      \r\n    public String getTag();\r\n     \r\n    public boolean hasBody();\r\n   \r\n    public String process(PageContext pageContext, Map<String, String> attributes, String body) throws JspException;\r\n}\r\n[/code]\r\n<p>\r\nPara publicar conteúdo você pode usar tags simples de HTML ou as tags do Kawai. E você pode criar suas próprias tags.\r\n</p>\r\n<h4>Header H4</h4>\r\n<ul>\r\n    <li>Teste 1</li>\r\n    <li>Teste 2</li>\r\n    <li>Teste 3</li>\r\n    <li>Teste 4</li>\r\n</ul>\r\n<h5>Header H5</h5>\r\n<ul>\r\n    <li>Teste 1</li>\r\n    <li>Teste 2</li>\r\n    <li>Teste 3</li>\r\n    <li>Teste 4</li>\r\n</ul>\r\n<br />\r\n','<h1>Cabeçalho H1</h1>\r\n<ul>\r\n    <li>Teste 1</li>\r\n    <li>Teste 2</li>\r\n    <li>Teste 3</li>\r\n</ul>\r\n<br />\r\n\r\n<h2>Cabeçalho H2</h2>\r\nAlgum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. Algum conteúdo aqui. \r\n<br /><br/>\r\n\r\n<h3>Header H3</h3>\r\nVocê também pode formatar código facilmente com a tag &#91;code&#93;:\r\n<br/><br/>\r\n[code]\r\npackage org.kawai.tag.kcode;\r\n\r\nimport java.util.Map;\r\n\r\nimport javax.servlet.jsp.JspException;\r\nimport javax.servlet.jsp.PageContext;\r\n\r\npublic interface KCode {\r\n     \r\n    public String getTag();\r\n     \r\n    public boolean hasBody();\r\n   \r\n    public String process(PageContext pageContext, Map<String, String> attributes, String body) throws JspException;\r\n}\r\n[/code]\r\n<p>\r\nPara publicar conteúdo você pode usar tags simples de HTML ou as tags do Kawai. E você pode criar suas próprias tags.\r\n</p>\r\n<h4>Cabeçalho H4</h4>\r\n<ul>\r\n    <li>Teste 1</li>\r\n    <li>Teste 2</li>\r\n    <li>Teste 3</li>\r\n    <li>Teste 4</li>\r\n</ul>\r\n<h5>Cabeçalho H5</h5>\r\n<ul>\r\n    <li>Teste 1</li>\r\n    <li>Teste 2</li>\r\n    <li>Teste 3</li>\r\n    <li>Teste 4</li>\r\n</ul>\r\n<br />\r\n','tradução');
79 soliveira 120
 
121
 
122
--
53 soliveira 123
-- Table structure for table `Users`
5 soliveira 124
--
125
 
51 soliveira 126
DROP TABLE IF EXISTS `Users`;
5 soliveira 127
 
128
 
51 soliveira 129
CREATE TABLE `Users` (
5 soliveira 130
  `id` INT(11) NOT NULL AUTO_INCREMENT,
131
  `username` VARCHAR(100) DEFAULT NULL,
132
  `password` VARCHAR(100) DEFAULT NULL,
133
  `group_id` INT(11) DEFAULT NULL,
134
  PRIMARY KEY (`id`),
135
  UNIQUE KEY `users_username` (`username`)
136
);
137
 
138
 
139
--
53 soliveira 140
-- Dumping data for table `Users`
5 soliveira 141
--
142
 
143
 
154 soliveira 144
INSERT INTO `Users` VALUES (1,'admin','abc123',1),(2,'editor','abc123',2),(4,'helio.frota','abc123',1),(3,'saoj','abc123',1);
5 soliveira 145
 
146
 
147
 
148
 
149
 
11 soliveira 150
 
151
 
152
 
153
 
154
 
155
 
154 soliveira 156
-- Dump completed on 2011-11-06 13:20:16