Minor fixes
This commit is contained in:
@@ -1,73 +0,0 @@
|
|||||||
body { background-color: #fff; color: #333; }
|
|
||||||
|
|
||||||
body, p, ol, ul, td {
|
|
||||||
font-family: verdana, arial, helvetica, sans-serif;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
background-color: #eee;
|
|
||||||
padding: 10px;
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a { color: #000; }
|
|
||||||
a:visited { color: #666; }
|
|
||||||
a:hover { color: #fff; background-color:#000; }
|
|
||||||
|
|
||||||
.fieldWithErrors {
|
|
||||||
padding: 2px;
|
|
||||||
background-color: red;
|
|
||||||
display: table;
|
|
||||||
}
|
|
||||||
|
|
||||||
#errorExplanation {
|
|
||||||
width: 400px;
|
|
||||||
border: 2px solid red;
|
|
||||||
padding: 7px;
|
|
||||||
padding-bottom: 12px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
background-color: #f0f0f0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#errorExplanation h2 {
|
|
||||||
text-align: left;
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 5px 5px 5px 15px;
|
|
||||||
font-size: 12px;
|
|
||||||
margin: -7px;
|
|
||||||
background-color: #c00;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#errorExplanation p {
|
|
||||||
color: #333;
|
|
||||||
margin-bottom: 0;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#errorExplanation ul li {
|
|
||||||
font-size: 12px;
|
|
||||||
list-style: square;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.uploadStatus {
|
|
||||||
margin: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.progressBar {
|
|
||||||
margin: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.progressBar div.border {
|
|
||||||
background-color: #fff;
|
|
||||||
border: 1px solid grey;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.progressBar div.background {
|
|
||||||
background-color: #333;
|
|
||||||
height: 18px;
|
|
||||||
width: 0%;
|
|
||||||
}
|
|
||||||
@@ -1,918 +0,0 @@
|
|||||||
* { margin: 0px; padding: 0px; line-height: 18px; }
|
|
||||||
|
|
||||||
a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:focus {
|
|
||||||
-moz-outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
margin: 18px 0px;
|
|
||||||
line-height: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
margin: 18px 0px;
|
|
||||||
line-height: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3, h4 {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ol, dl, ul {
|
|
||||||
line-height: 18px;
|
|
||||||
margin: 18px 0px;
|
|
||||||
padding-left: 36px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul ul, ol ol {
|
|
||||||
margin: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box ul {
|
|
||||||
list-style: none;
|
|
||||||
padding-left: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box ul li {
|
|
||||||
background-image: url(<%= App.base_path %>/assets/bullet.gif);
|
|
||||||
background-position: 0px 7px;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
padding-left: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.content blockquote {
|
|
||||||
margin-left: 27px;
|
|
||||||
border-left: 3px solid #ccc;
|
|
||||||
padding-left: 12px;
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content pre {
|
|
||||||
margin-top: 18px;
|
|
||||||
padding: 9px 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content code, .content pre {
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content p img.insert_image {
|
|
||||||
}
|
|
||||||
|
|
||||||
dt {
|
|
||||||
margin-top: 9px;
|
|
||||||
margin-left: -27px;
|
|
||||||
}
|
|
||||||
|
|
||||||
table tr td {
|
|
||||||
line-height: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
border-spacing: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h2, h3, h4 {
|
|
||||||
font-weight: normal;
|
|
||||||
padding: 0px 18px;
|
|
||||||
margin: 18px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
font-size: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
line-height: 18px;
|
|
||||||
margin-top: 18px;
|
|
||||||
margin-bottom: 0px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.middle:first-letter {
|
|
||||||
padding-left: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.middle {
|
|
||||||
margin-top: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
color: #222;
|
|
||||||
margin: 0px; padding: 0px 9px;
|
|
||||||
|
|
||||||
font-size: 12px;
|
|
||||||
font-family: verdana, sans-serif;
|
|
||||||
font-weight: normal;
|
|
||||||
min-width: 780px;
|
|
||||||
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
#wrapper {
|
|
||||||
margin: 0em -9px;
|
|
||||||
padding: 0px 9px;
|
|
||||||
background-image: url(<%= App.base_path %>/assets/bg_body.png);
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header {
|
|
||||||
background-image: url(<%= App.base_path %>/assets/header_bg.png);
|
|
||||||
background-position: top;
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
color: #eee;
|
|
||||||
height: 50px;
|
|
||||||
margin: 0px -9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header h1 {
|
|
||||||
color: #eee;
|
|
||||||
font-size: 24px;
|
|
||||||
margin: 0px 30px;
|
|
||||||
display: inline;
|
|
||||||
line-height: 50px;
|
|
||||||
font-weight: normal;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header_menu {
|
|
||||||
font-size: 11px;
|
|
||||||
text-align: right;
|
|
||||||
height: 22px;
|
|
||||||
border-bottom: 3px solid #ddd;
|
|
||||||
margin: 0px -9px;
|
|
||||||
margin-top: -22px;
|
|
||||||
color: #eee;
|
|
||||||
background-color: transparent !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header_menu ul {
|
|
||||||
margin: 0px 0px;
|
|
||||||
float: right;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header_menu ul li {
|
|
||||||
float: left;
|
|
||||||
line-height: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header_menu a {
|
|
||||||
color: #ccc;
|
|
||||||
display: block;
|
|
||||||
padding: 0px 1.5em;
|
|
||||||
line-height: 18px;
|
|
||||||
border-bottom: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header_menu a:hover {
|
|
||||||
color: #fff;
|
|
||||||
text-decoration: none;
|
|
||||||
border-bottom: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header_menu ul li.last {
|
|
||||||
border-right: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#strip {
|
|
||||||
display: none;
|
|
||||||
border-bottom: 3px solid #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
#site {
|
|
||||||
padding: 0px;
|
|
||||||
margin-top: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#footer {
|
|
||||||
border-top: 3px solid #f0f0f0;
|
|
||||||
margin: 0px -9px;
|
|
||||||
padding: 18px 0px;
|
|
||||||
text-align: center;
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
#footer .fa {
|
|
||||||
font-size: 175% !important;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
#footer p {
|
|
||||||
margin-top: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.float_panel_left {
|
|
||||||
float: left;
|
|
||||||
margin: 3px 0px 0px 0px;
|
|
||||||
padding: 0em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.float_panel_right {
|
|
||||||
float: right;
|
|
||||||
margin: 3px 0px 0px 0px;
|
|
||||||
padding: 0em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu {
|
|
||||||
width: 177px;
|
|
||||||
margin: -3px 0px 15px 0px;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu ul {
|
|
||||||
margin: 0px 0px; padding: 0px;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu li, #shoutbox li {
|
|
||||||
border-top: 1px solid #eee;
|
|
||||||
margin-top: -1px;
|
|
||||||
padding: 9px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.menu h1 {
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: bold;
|
|
||||||
margin: 0px 0em; padding: 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
|
||||||
margin: -3px 0px 0px 0px;
|
|
||||||
padding: 0em;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content h1 {
|
|
||||||
margin: 18px 0px;
|
|
||||||
line-height: 36px;
|
|
||||||
font-size: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#innerwrapper_2column {
|
|
||||||
padding: 0em 0px 0em 208px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#innerwrapper_3column {
|
|
||||||
padding: 0em 208px 0em 208px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendario {
|
|
||||||
border-top: 1px solid #eee;
|
|
||||||
margin-top: -1px;
|
|
||||||
padding: 9px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendario tr td {
|
|
||||||
font-size: 11px;
|
|
||||||
text-align: center;
|
|
||||||
width: 25px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.calendario th {
|
|
||||||
font-weight: normal;
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.otherMonth {
|
|
||||||
color: #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.specialDay {
|
|
||||||
background-image: url(<%= App.base_path %>/assets/bg_day.gif);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.specialDay a, .specialDay a:hover {
|
|
||||||
border-bottom: 0px solid #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
.widget_users li {
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#shoutbox textarea {
|
|
||||||
font-family: sans-serif;
|
|
||||||
font-size: 11px;
|
|
||||||
width: 160px;
|
|
||||||
height: 35px;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
margin: 15px 0px 8px 0px;
|
|
||||||
padding: 0px 0px 0px 4px;
|
|
||||||
line-height: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#shoutbox input {
|
|
||||||
border-width: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.menu h3, .menu h4 {
|
|
||||||
margin: 0px; padding: 0px;
|
|
||||||
font-weight: normal;
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu h4 {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
#location {
|
|
||||||
margin: 9px 0px -12px 0px;
|
|
||||||
padding: 6px 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#location a {
|
|
||||||
margin: 0em 9px;
|
|
||||||
line-height: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#location a:first-child {
|
|
||||||
margin-left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.latex {
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: -5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wikicmd, .cmd {
|
|
||||||
font-size: 10px;
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wikicmd a, .cmd a {
|
|
||||||
margin: 0px 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.cmd a {
|
|
||||||
line-height: 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box .cmd a {
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#toc {
|
|
||||||
display: table;
|
|
||||||
margin: 16px 18px;
|
|
||||||
padding: 9px 0px 7px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#toc h1 {
|
|
||||||
text-align: center;
|
|
||||||
margin: 0px 18px 0px 18px;
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#toc ol {
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px 36px;
|
|
||||||
}
|
|
||||||
|
|
||||||
h4.title, h1.title {
|
|
||||||
margin: 0px 0px -9px 0px;
|
|
||||||
line-height: 36px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box {
|
|
||||||
margin: 18px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box h3 {
|
|
||||||
line-height: 34px;
|
|
||||||
margin: 0px;
|
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
font-weight: normal !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box ul {
|
|
||||||
margin-top: 0px;
|
|
||||||
margin-bottom: 0px;
|
|
||||||
padding-left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box li {
|
|
||||||
background-position: 16px 16px !important;
|
|
||||||
line-height: 18px;
|
|
||||||
padding: 9px 0px 8px 32px !important;
|
|
||||||
border-bottom: 1px solid #f4f4f4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.div_calendario table, .div_news table {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.div_calendario table tr td, .div_news table tr td {
|
|
||||||
padding-top: 9px;
|
|
||||||
padding-bottom: 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.div_calendario table tr td:first-child, .div_news table tr td:first-child {
|
|
||||||
padding-left: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.div_calendario .cmd, .div_news .cmd {
|
|
||||||
margin-top: -9px;
|
|
||||||
line-weigth: 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
||||||
* Repositorio *
|
|
||||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
||||||
|
|
||||||
.repositorio h1, .repositorio p {
|
|
||||||
padding: 0px;
|
|
||||||
margin: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.repositorio li h1 {
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.repositorio li {
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: 16px !important;
|
|
||||||
list-style: none;
|
|
||||||
padding: 9px 0px 8px 43px !important;
|
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
line-height: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.repositorio .mime_plain_text { background-image: url(<%= App.base_path %>/assets/tango/text-x-generic.png); }
|
|
||||||
.repositorio .mime_presentation { background-image: url(<%= App.base_path %>/assets/tango/x-office-presentation.png); }
|
|
||||||
.repositorio .mime_document { background-image: url(<%= App.base_path %>/assets/tango/x-office-document.png); }
|
|
||||||
.repositorio .mime_binary { background-image: url(<%= App.base_path %>/assets/tango/application-x-executable.png); }
|
|
||||||
.repositorio .mime_zip { background-image: url(<%= App.base_path %>/assets/tango/package-x-generic.png); }
|
|
||||||
.repositorio .mime_folder { background-image: url(<%= App.base_path %>/assets/tango/folder.png); }
|
|
||||||
|
|
||||||
.spinner {
|
|
||||||
float: right;
|
|
||||||
margin-top: 8px;
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
select {
|
|
||||||
min-width: 5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.validation {
|
|
||||||
float: right;
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.message, .notice, .warning {
|
|
||||||
color: #fff;
|
|
||||||
padding: 0px 10px;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.message, .notice {
|
|
||||||
background-color: #690
|
|
||||||
}
|
|
||||||
|
|
||||||
.warning {
|
|
||||||
background-color: #c00
|
|
||||||
}
|
|
||||||
|
|
||||||
.warning a {
|
|
||||||
color: #fff !important;
|
|
||||||
border-bottom: 1px dotted #fff !important
|
|
||||||
}
|
|
||||||
|
|
||||||
.message a, .notice a {
|
|
||||||
color: #fff !important;
|
|
||||||
border-bottom: 1px dotted #fff !important
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#errorExplanation {
|
|
||||||
border-bottom: 2px solid #fdd;
|
|
||||||
border-right: 2px solid #fdd;
|
|
||||||
background-color: #fee;
|
|
||||||
padding: 18px 9px;
|
|
||||||
color: #422;
|
|
||||||
}
|
|
||||||
|
|
||||||
#passmeter {
|
|
||||||
margin-left: 5px;
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#errorExplanation * {
|
|
||||||
margin: 0px;
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#errorExplanation h2 {
|
|
||||||
display: none;
|
|
||||||
color: #c00;
|
|
||||||
line-height: 36px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#errorExplanation p, #errorExplanation h2 {
|
|
||||||
padding-left: 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#errorExplanation ul {
|
|
||||||
margin-top: 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.history {
|
|
||||||
margin-top: 18px;
|
|
||||||
margin-left: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.history h4 {
|
|
||||||
margin-bottom: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.history pre {
|
|
||||||
background-color: #e0e0e0;
|
|
||||||
margin-left: 20px;
|
|
||||||
padding: 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tex_block {
|
|
||||||
text-align: center;
|
|
||||||
margin: 18px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
img {
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
input, button, textarea {
|
|
||||||
border-width: 1px;
|
|
||||||
padding: 2px 5px;
|
|
||||||
xmargin-bottom: 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no_itens, .see_all {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box .see_all {
|
|
||||||
font-size: 11px;
|
|
||||||
background-image: none;
|
|
||||||
border-bottom-width: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.history input {
|
|
||||||
margin: 0px 10px 0px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.history td {
|
|
||||||
line-height: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#wiki_preview {
|
|
||||||
background-image: url(<%= App.base_path %>/assets/rascunho.png);
|
|
||||||
border: 2px solid #e4e4e4;
|
|
||||||
padding: 10px;
|
|
||||||
overflow: auto;
|
|
||||||
margin: 18px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.diff {
|
|
||||||
font-family: monospace;
|
|
||||||
font-size: small;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.diff_add, .diff_del, .diff_line {
|
|
||||||
padding: 0px 9px 0px 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.diff_add {
|
|
||||||
background-color: #dfd;
|
|
||||||
border-left: 2px solid #0c0;
|
|
||||||
border-right: 1px solid #0c0;
|
|
||||||
color: #050;
|
|
||||||
}
|
|
||||||
|
|
||||||
.diff_line {
|
|
||||||
background-color: #f3f3f3;
|
|
||||||
border-left: 2px solid #bbb;
|
|
||||||
border-right: 1px solid #bbb;
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.diff_del {
|
|
||||||
background-color: #fdd;
|
|
||||||
border-left: 2px solid #c00;
|
|
||||||
border-right: 1px solid #c00;
|
|
||||||
color: #500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.diff_space {
|
|
||||||
height: 18px;
|
|
||||||
margin-top: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.diff_border_add {
|
|
||||||
border-top: 1px solid #0c0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.diff_border_del {
|
|
||||||
border-top: 1px solid #c00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.diff_border_line {
|
|
||||||
border-top: 1px solid #bbb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu, .content, #location {
|
|
||||||
box-shadow: 2px 2px 2px #d0d0d0;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menu { padding: 0px 9px; }
|
|
||||||
.content { padding: 9px 18px 36px 18px; }
|
|
||||||
#innerwrapper_2column .content {
|
|
||||||
padding: 9px 27px 36px 27px;
|
|
||||||
}
|
|
||||||
|
|
||||||
form dt, form dd {
|
|
||||||
margin-left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
form dl {
|
|
||||||
padding-left: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#header_menu .grey {
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content .grey {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.avatar {
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
padding: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card img.avatar {
|
|
||||||
float: left;
|
|
||||||
margin: 5px 18px 0px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user_list {
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user_list li {
|
|
||||||
background-image: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card h1 { margin-bottom: 0px; }
|
|
||||||
.card p { margin-top: 0px; }
|
|
||||||
|
|
||||||
.color_box {
|
|
||||||
width: 18px;
|
|
||||||
height: 18px;
|
|
||||||
margin: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.color_theme {
|
|
||||||
float: left;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
margin: 0px 2px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.color_theme {
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.color_theme input {
|
|
||||||
margin: 3px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.clear { clear:both; }
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
margin: 1px 1px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon img {
|
|
||||||
background-color: #bbb;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon:hover { border-bottom: 0px; }
|
|
||||||
.icon img { border: 0px solid #fff; }
|
|
||||||
.menu .cmd {
|
|
||||||
line-height: 12px !important;
|
|
||||||
margin-top: -1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*.box ul li {
|
|
||||||
border-top: 1px solid #eee;
|
|
||||||
padding: 9px 0px 9px 15px;
|
|
||||||
background-position: 0px 12px;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
.box table {
|
|
||||||
margin-bottom: 2px;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box table td {
|
|
||||||
border-top: 1px solid #eee;
|
|
||||||
padding: 4px 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box table th {
|
|
||||||
padding: 4px 12px;
|
|
||||||
border-top: 1px solid #eee;
|
|
||||||
font-weight: normal;
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box dl {
|
|
||||||
margin: 0px 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.top { vertical-align: top; }
|
|
||||||
.center { text-align: center !important; }
|
|
||||||
.left { float: left !important; }
|
|
||||||
.right { float: right !important; }
|
|
||||||
.aright { text-align: right !important; }
|
|
||||||
|
|
||||||
.pagination {
|
|
||||||
margin: 18px 0px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.fieldWithErrors input, .fieldWithErrors textarea {
|
|
||||||
border: 2px solid #c00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.insert_image {
|
|
||||||
display: block;
|
|
||||||
margin: 0px auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.narrow {
|
|
||||||
padding: 4px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#wiki_text h2, #wiki_text h3, #wiki_text h4 {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
#wiki_text h1 { font-size: 20px; }
|
|
||||||
#wiki_text h2 { font-size: 14px; }
|
|
||||||
#wiki_text h3 { font-size: 12px; }
|
|
||||||
#wiki_text h4, #wiki_text h5, #wiki_text h6 { font-size: 11px; }
|
|
||||||
|
|
||||||
/*.box h3. {*/
|
|
||||||
/*margin-bottom: -9px;*/
|
|
||||||
/*margin-top: 18px;*/
|
|
||||||
/*padding-top: 9px;*/
|
|
||||||
/*font-weight: normal;*/
|
|
||||||
/*}*/
|
|
||||||
|
|
||||||
.content ol li {
|
|
||||||
background-image: none;
|
|
||||||
padding: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul ul, ul ol, ol ul, ol ol {
|
|
||||||
margin: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
li p, td p {
|
|
||||||
margin-top: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard td:first-child {
|
|
||||||
padding-left: 27px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard table tr td {
|
|
||||||
padding-right: 9px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboard .box ul {
|
|
||||||
margin-bottom: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
form dt p {
|
|
||||||
margin: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#markup_help {
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
border-bottom: 2px solid #eee;
|
|
||||||
border-right: 2px solid #eee;
|
|
||||||
margin: 9px 0px;
|
|
||||||
padding: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#markup_help pre {
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px 9px;
|
|
||||||
margin: 0px 36px;
|
|
||||||
border: 1px dotted #aaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
#markup_help h3 {
|
|
||||||
margin: 18px 0px 9px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#markup_help ul {
|
|
||||||
margin: 9px 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.log_entries .date {
|
|
||||||
float: left;
|
|
||||||
width: 50px;
|
|
||||||
margin: 0px 15px 0px -90px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.log_entries .avatar {
|
|
||||||
float: left;
|
|
||||||
margin: 0px 0px 0px -40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.log_entries * {
|
|
||||||
vertical-align: top;
|
|
||||||
background-image: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.log_entries li {
|
|
||||||
padding-left: 110px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.nested {
|
|
||||||
padding-left: 36px;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul.nested li {
|
|
||||||
padding-top: 5px !important;
|
|
||||||
padding-bottom: 4px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contents {
|
|
||||||
margin-top: 18px;
|
|
||||||
padding: 0px 27px 9px 0px;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#contents h1 {
|
|
||||||
font-size: 12px;
|
|
||||||
margin: 0px;
|
|
||||||
text-align: center;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contents li {
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#contents ol {
|
|
||||||
margin: 0px;
|
|
||||||
padding: 0px 0px 0px 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.box li.show_all {
|
|
||||||
background-image: none;
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*body { background-image: url(<%= App.base_path %>/prototype/line.png); background-repeat: repeat; }
|
|
||||||
html * { background-color: transparent !important; }*/
|
|
||||||
@@ -42,7 +42,7 @@ module ApplicationHelper
|
|||||||
output << "</div>"
|
output << "</div>"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
output
|
output.html_safe
|
||||||
end
|
end
|
||||||
|
|
||||||
def logged_in?
|
def logged_in?
|
||||||
@@ -71,18 +71,19 @@ module ApplicationHelper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def markup_enabled_field
|
def markup_enabled_field
|
||||||
"<p class='grey'>Este campo aceita as linguagens Markdown, Latex e HTML. " +
|
("<p class='grey'>Este campo aceita as linguagens Markdown, Latex e HTML. " +
|
||||||
link_to('Saiba mais.', '#', id: 'show_markup_help') + spinner('help') + "</p>"
|
link_to('Saiba mais.', '#', id: 'show_markup_help') + spinner('help') +
|
||||||
|
"</p>").html_safe
|
||||||
end
|
end
|
||||||
|
|
||||||
def markup_help
|
def markup_help
|
||||||
"<div id='markup_help' style='display: none'>" +
|
("<div id='markup_help' style='display: none'>" +
|
||||||
File.read("#{Rails.root}/public/static/markup_help.mkd").format_wiki +
|
File.read("#{Rails.root}/public/static/markup_help.mkd").format_wiki +
|
||||||
"</div>"
|
"</div>").html_safe
|
||||||
end
|
end
|
||||||
|
|
||||||
def gravatar_url_for(email, size = 80)
|
def gravatar_url_for(email, size = 80)
|
||||||
"http://www.gravatar.com/avatar.php?gravatar_id=#{Digest::MD5.hexdigest(email)}&size=#{size}&default=#{u(App.default_avatar)}_#{size}.png"
|
"http://www.gravatar.com/avatar.php?gravatar_id=#{Digest::MD5.hexdigest(email)}&size=#{size}&d=retro"
|
||||||
end
|
end
|
||||||
|
|
||||||
def action_icon(action_name, description, options = {}, html_options = {})
|
def action_icon(action_name, description, options = {}, html_options = {})
|
||||||
|
|||||||
@@ -87,6 +87,10 @@ class Course < ActiveRecord::Base
|
|||||||
period == App.current_period ? short_name : id.to_s
|
period == App.current_period ? short_name : id.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.pluck_periods
|
||||||
|
Course.uniq.pluck(:period).reject!(&:blank?).sort.reverse
|
||||||
|
end
|
||||||
|
|
||||||
def self.from_param(param)
|
def self.from_param(param)
|
||||||
param.is_numeric? ? Course.find(param) : Course.find_by_short_name!(param)
|
param.is_numeric? ? Course.find(param) : Course.find_by_short_name!(param)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ class WikiPage < ActiveRecord::Base
|
|||||||
validates_uniqueness_of :title, scope: :course_id
|
validates_uniqueness_of :title, scope: :course_id
|
||||||
validates_uniqueness_of :canonical_title, scope: :course_id
|
validates_uniqueness_of :canonical_title, scope: :course_id
|
||||||
validates_format_of :title, with: /^[^0-9]/
|
validates_format_of :title, with: /^[^0-9]/
|
||||||
|
validate :check_wiki_syntax
|
||||||
|
|
||||||
|
|
||||||
before_validation :set_canonical_title
|
before_validation :set_canonical_title
|
||||||
before_save :set_position
|
before_save :set_position
|
||||||
@@ -68,11 +70,10 @@ class WikiPage < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate
|
def check_wiki_syntax
|
||||||
content.format_wiki
|
content.format_wiki
|
||||||
rescue
|
rescue
|
||||||
errors.add("content", "possui erro de sintaxe: " +
|
errors.add("content", "possui erro de sintaxe")
|
||||||
$ERROR_INFO.to_s.html_escape)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_param
|
def to_param
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
.box.repositorio
|
.box.repositorio
|
||||||
- if !@course.attachments.empty?
|
- if !@course.attachments.empty?
|
||||||
%ul
|
%ul
|
||||||
= nested_attachments_to_html(attachments_to_nested_hash(@course.attachments))
|
= raw nested_attachments_to_html(attachments_to_nested_hash(@course.attachments))
|
||||||
|
|
||||||
- else
|
- else
|
||||||
.box
|
.box
|
||||||
|
|||||||
@@ -33,5 +33,5 @@
|
|||||||
|
|
||||||
%h3
|
%h3
|
||||||
Outros Semestres
|
Outros Semestres
|
||||||
%li= link_to "2008.2", period: '2008.2'
|
- for period in Course.pluck_periods
|
||||||
%li= link_to "2008.1", period: '2008.1'
|
%li= link_to period.to_s, period: period
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
%h3= t(:repository)
|
%h3= t(:repository)
|
||||||
.repositorio
|
.repositorio
|
||||||
= nested_attachments_to_html(attachments_to_nested_hash(@course.attachments.find_front_page))
|
= raw nested_attachments_to_html(attachments_to_nested_hash(@course.attachments.find_front_page))
|
||||||
- if @course.attachments.empty?
|
- if @course.attachments.empty?
|
||||||
%ul.wiki
|
%ul.wiki
|
||||||
%li.no_itens= t(:no_attachments)
|
%li.no_itens= t(:no_attachments)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
%title= @title || App.title
|
%title= @title || App.title
|
||||||
%meta{'name' => 'robots', :content => 'noindex,nofollow'}
|
%meta{'name' => 'robots', :content => 'noindex,nofollow'}
|
||||||
%meta{'http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8'}
|
%meta{'http-equiv' => 'Content-Type', 'content' => 'text/html; charset=UTF-8'}
|
||||||
|
%meta{'name' => "viewport", 'content' => "width=device-width" }
|
||||||
|
|
||||||
= stylesheet_link_tag :wiki
|
= stylesheet_link_tag :wiki
|
||||||
%link{'href' => "#{App.base_path}/favicon.ico", 'rel' => 'icon', 'type' => 'image/vnd.microsoft.icon'}
|
%link{'href' => "#{App.base_path}/favicon.ico", 'rel' => 'icon', 'type' => 'image/vnd.microsoft.icon'}
|
||||||
@@ -26,44 +27,48 @@
|
|||||||
= csrf_meta_tag
|
= csrf_meta_tag
|
||||||
|
|
||||||
%body{'onload' => 'javascript: startup()'}
|
%body{'onload' => 'javascript: startup()'}
|
||||||
#wrapper
|
#header
|
||||||
#header
|
.wrapper2
|
||||||
%h1= "<strong>Wiki</strong> UFC"
|
%h1
|
||||||
|
%strong Wiki
|
||||||
#header_menu
|
UFC
|
||||||
|
#header_menu
|
||||||
|
.wrapper2
|
||||||
%ul
|
%ul
|
||||||
- if logged_in?
|
- if logged_in?
|
||||||
%li.grey= t(:logged_in_as, :u => h(@current_user.display_name))
|
%li.grey= h(@current_user.display_name)
|
||||||
%li.last= link_to 'Logout', logout_path, :accesskey => 'l'
|
%li.last= link_to 'Logout', logout_path, :accesskey => 'l'
|
||||||
- else
|
- else
|
||||||
%li= link_to 'Cadastrar', signup_path
|
%li= link_to 'Cadastrar', signup_path
|
||||||
%li.last= link_to 'Login', login_path, :accesskey => 'l'
|
%li.last= link_to 'Login', login_path, :accesskey => 'l'
|
||||||
|
#wrapper
|
||||||
|
.wrapper2
|
||||||
|
#strip
|
||||||
|
|
||||||
#strip
|
#flash
|
||||||
|
= flash_div
|
||||||
|
#location
|
||||||
|
= @location
|
||||||
|
|
||||||
#location
|
#site
|
||||||
= flash_div
|
%div
|
||||||
= @location
|
- if @right_panel.nil?
|
||||||
|
.float_panel_left= @left_panel
|
||||||
#site
|
#innerwrapper_2column
|
||||||
%div
|
.content= @content
|
||||||
- if @right_panel.nil?
|
- else
|
||||||
.float_panel_left= @left_panel
|
.float_panel_left= @left_panel
|
||||||
#innerwrapper_2column
|
.float_panel_right= @right_panel
|
||||||
.content= @content
|
#innerwrapper_3column
|
||||||
- else
|
.content= @content
|
||||||
.float_panel_left= @left_panel
|
%br{'style' => 'clear:both'}
|
||||||
.float_panel_right= @right_panel
|
|
||||||
#innerwrapper_3column
|
|
||||||
.content= @content
|
|
||||||
%br{'style' => 'clear:both'}
|
|
||||||
|
|
||||||
#footer
|
#footer
|
||||||
%p
|
%p
|
||||||
%b Wiki
|
%b Wiki
|
||||||
UFC
|
UFC
|
||||||
%p
|
%p
|
||||||
Powered by Ruby on Rails, PostgreSQL & Linux
|
Desenvolvido em Ruby on Rails
|
||||||
%p
|
%p
|
||||||
Distribuido livremente sob a
|
Distribuido livremente sob a
|
||||||
%a{href: 'https://www.gnu.org/licenses/agpl-3.0.en.html'}
|
%a{href: 'https://www.gnu.org/licenses/agpl-3.0.en.html'}
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
- @title = "#{App.title} - #{h(@course.full_name)}"
|
- @title = "#{App.title} - #{h(@course.full_name)}"
|
||||||
- @location = capture do
|
- @location = capture do
|
||||||
= link_to(App.title, index_url, :accesskey => 'z') + "›"
|
= link_to(App.title, index_url, :accesskey => 'z') + "›"
|
||||||
= link_to("Disciplinas", courses_url) + "›"
|
= link_to("Disciplinas", courses_url) + "›"
|
||||||
= link_to(h(@course.full_name), course_url(@course)) + "›"
|
= link_to(h(@course.full_name), course_url(@course)) + "›"
|
||||||
= link_to("Arquivos", course_attachments_url(@course))
|
= link_to("Arquivos", course_attachments_url(@course))
|
||||||
- if @attachment.id
|
- if @attachment.id
|
||||||
= "›" + link_to(truncate(h(@attachment.file_name)), course_attachment_url)
|
= "›"
|
||||||
|
=link_to(truncate(h(@attachment.file_name)), course_attachment_url)
|
||||||
- @title = @title + " - #{truncate(h(@attachment.file_name))}"
|
- @title = @title + " - #{truncate(h(@attachment.file_name))}"
|
||||||
|
|
||||||
- @left_panel = render 'courses/left_panel'
|
- @left_panel = render 'courses/left_panel'
|
||||||
- @right_panel = render 'courses/right_panel'
|
- @right_panel = render 'courses/right_panel'
|
||||||
- @content = yield
|
- @content = yield
|
||||||
|
|
||||||
= render 'layouts/base'
|
= render 'layouts/base'
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
= link_to(App.title, index_url, :accesskey => 'z') + "›";
|
= link_to(App.title, index_url, :accesskey => 'z') + "›";
|
||||||
= link_to("Disciplinas", courses_url)
|
= link_to("Disciplinas", courses_url)
|
||||||
- if @course and @course.id
|
- if @course and @course.id
|
||||||
= "› " + link_to(h(@course.full_name), course_url)
|
= "› "
|
||||||
|
=link_to(h(@course.full_name), course_url)
|
||||||
- @title = @title + " - #{h(@course.full_name)}"
|
- @title = @title + " - #{h(@course.full_name)}"
|
||||||
- else
|
- else
|
||||||
- @title = @title + " - Disciplinas"
|
- @title = @title + " - Disciplinas"
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
= link_to(App.title, index_url, :accesskey => 'z') + "›";
|
= link_to(App.title, index_url, :accesskey => 'z') + "›";
|
||||||
= link_to("Usuários", users_path)
|
= link_to("Usuários", users_path)
|
||||||
- if @user and @user.id
|
- if @user and @user.id
|
||||||
= "› " + link_to(h(@user.name), user_url(@user))
|
= "› "
|
||||||
|
=link_to(h(@user.name), user_url(@user))
|
||||||
- @title = @title + " - #{h(@user.display_name)}"
|
- @title = @title + " - #{h(@user.display_name)}"
|
||||||
|
|
||||||
- @left_panel = render('widgets/menu_navigation') + render('widgets/menu_user')
|
- @left_panel = render('widgets/menu_navigation') + render('widgets/menu_user')
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
- @title = "#{App.title} - #{h(@course.full_name)}"
|
- @title = "#{App.title} - #{h(@course.full_name)}"
|
||||||
- @location = capture do
|
- @location = capture do
|
||||||
= link_to(App.title, index_url, :accesskey => 'z') + "›"
|
= link_to(App.title, index_url, :accesskey => 'z') + "›"
|
||||||
= link_to("Disciplinas", courses_url) + "›"
|
= link_to("Disciplinas", courses_url) + "›"
|
||||||
= link_to(h(@course.full_name), course_url(@course)) + "›"
|
= link_to(h(@course.full_name), course_url(@course)) + "›"
|
||||||
= link_to("Wiki", course_wiki_url(@course))
|
= link_to("Wiki", course_wiki_url(@course))
|
||||||
- if @wiki_page.title?
|
- if @wiki_page.title?
|
||||||
= "›" + link_to(h(@wiki_page.title), course_wiki_instance_url(@course.to_param, @wiki_page))
|
= "›"
|
||||||
|
=link_to(h(@wiki_page.title), course_wiki_instance_url(@course.to_param, @wiki_page))
|
||||||
- @title = @title + " - #{h(@wiki_page.title)}"
|
- @title = @title + " - #{h(@wiki_page.title)}"
|
||||||
|
|
||||||
- @left_panel = render 'courses/left_panel'
|
- @left_panel = render 'courses/left_panel'
|
||||||
- @content = yield
|
- @content = yield
|
||||||
|
|
||||||
= render 'layouts/base'
|
= render 'layouts/base'
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
= "excluiu " if entry.kind_of?(AttachmentDeleteLogEntry)
|
= "excluiu " if entry.kind_of?(AttachmentDeleteLogEntry)
|
||||||
= "restaurou " if entry.kind_of?(AttachmentRestoreLogEntry)
|
= "restaurou " if entry.kind_of?(AttachmentRestoreLogEntry)
|
||||||
|
|
||||||
= "o anexo " + link_to(h(entry.attachment.file_name), course_attachment_url(entry.course, entry.attachment))
|
= raw "o anexo " + link_to(h(entry.attachment.file_name), course_attachment_url(entry.course, entry.attachment))
|
||||||
|
|||||||
@@ -4,9 +4,11 @@
|
|||||||
= "restaurou " if entry.kind_of?(WikiRestoreLogEntry)
|
= "restaurou " if entry.kind_of?(WikiRestoreLogEntry)
|
||||||
|
|
||||||
- if entry.version
|
- if entry.version
|
||||||
= "a página " + link_to(h(entry.wiki_page.title), course_wiki_instance_url(entry.course, entry.wiki_page.id, :version => entry.version))
|
a página
|
||||||
|
=link_to(h(entry.wiki_page.title), course_wiki_instance_url(entry.course, entry.wiki_page.id, :version => entry.version))
|
||||||
- else
|
- else
|
||||||
= "a página " + link_to(h(entry.wiki_page.title), course_wiki_instance_url(entry.course, entry.wiki_page.id))
|
a página
|
||||||
|
=link_to(h(entry.wiki_page.title), course_wiki_instance_url(entry.course, entry.wiki_page.id))
|
||||||
|
|
||||||
|
|
||||||
- current_version = entry.wiki_page.versions.find_by_version(entry.version)
|
- current_version = entry.wiki_page.versions.find_by_version(entry.version)
|
||||||
@@ -15,12 +17,12 @@
|
|||||||
- if entry.kind_of?(WikiEditLogEntry)
|
- if entry.kind_of?(WikiEditLogEntry)
|
||||||
- unless current_version.nil?
|
- unless current_version.nil?
|
||||||
- if current_version.description and !current_version.description.empty?
|
- if current_version.description and !current_version.description.empty?
|
||||||
= "(<i>#{h(current_version.description)}</i>)"
|
= raw "(<i>#{h(current_version.description)}</i>)"
|
||||||
|
|
||||||
- unless previous_version.nil?
|
- unless previous_version.nil?
|
||||||
= "(" + link_to("diff", diff_course_wiki_instance_url(entry.course, entry.wiki_page.id, :from => previous_version.version, :to => entry.version)) + ")"
|
= raw "(" + link_to("diff", diff_course_wiki_instance_url(entry.course, entry.wiki_page.id, :from => previous_version.version, :to => entry.version)) + ")"
|
||||||
|
|
||||||
= "(" + link_to("edit", edit_course_wiki_instance_url(entry.course, entry.wiki_page.id, :description => "Revertendo para versão #{entry.version}", :version => entry.version)) + ")"
|
= raw "(" + link_to("edit", edit_course_wiki_instance_url(entry.course, entry.wiki_page.id, :description => "Revertendo para versão #{entry.version}", :version => entry.version)) + ")"
|
||||||
|
|
||||||
- unless previous_version.nil?
|
- unless previous_version.nil?
|
||||||
= "(" + link_to("undo", edit_course_wiki_instance_url(entry.course, entry.wiki_page.id, :description => "Revertendo para versão #{previous_version.version}", :version => previous_version.version)) + ")"
|
= raw "(" + link_to("undo", edit_course_wiki_instance_url(entry.course, entry.wiki_page.id, :description => "Revertendo para versão #{previous_version.version}", :version => previous_version.version)) + ")"
|
||||||
|
|||||||
@@ -9,15 +9,15 @@
|
|||||||
%ul.log_entries
|
%ul.log_entries
|
||||||
- @log_entries_by_day.each do |day, entries|
|
- @log_entries_by_day.each do |day, entries|
|
||||||
%h3
|
%h3
|
||||||
=tz(day).strftime("%d de %B de %Y")
|
=tz(day).strftime("%d de %B de %Y")
|
||||||
- entries.each do |entry|
|
- entries.each do |entry|
|
||||||
%li
|
%li
|
||||||
.date
|
.date
|
||||||
= tz(entry.created_at).strftime("%H:%M")
|
= tz(entry.created_at).strftime("%H:%M")
|
||||||
%img.avatar{:src => gravatar_url_for(entry.user.email, 27)}
|
%img.avatar{:src => gravatar_url_for(entry.user.email, 27)}
|
||||||
=link_to truncate(h(entry.user.display_name), :length => 20), user_url(entry.user.id)
|
= link_to truncate(h(entry.user.display_name), :length => 20), user_url(entry.user.id)
|
||||||
= render(:partial => 'log/log_entry', :locals => { :entry => entry })
|
= render(:partial => 'log/log_entry', :locals => { :entry => entry })
|
||||||
%br
|
%br
|
||||||
= "Disciplina " + link_to(h(entry.course.full_name), course_url(entry.course))
|
= raw "Disciplina " + link_to(h(entry.course.full_name), course_url(entry.course))
|
||||||
|
|
||||||
= will_paginate @log_entries
|
= will_paginate @log_entries
|
||||||
|
|||||||
@@ -10,15 +10,20 @@
|
|||||||
%dd= text_field('user', 'name')
|
%dd= text_field('user', 'name')
|
||||||
|
|
||||||
%dt
|
%dt
|
||||||
%label{:for => 'user_description'} Descrição
|
%label{:for => 'user_description'}
|
||||||
|
Descrição
|
||||||
|
=markup_enabled_field
|
||||||
%dd= preserve(text_area('user', 'description', { :rows => 10 }))
|
%dd= preserve(text_area('user', 'description', { :rows => 10 }))
|
||||||
|
|
||||||
%dt
|
%dt
|
||||||
%label Dica:
|
%label Dica:
|
||||||
%p
|
%p
|
||||||
= "Para utilizar um avatar, cadastre-se no site <a href='http://gravatar.com'>Gravatar</a> com o mesmo email utilizado no #{App.title}."
|
Para utilizar um avatar, cadastre-se no site
|
||||||
|
%a{href: 'http://gravatar.com'} Gravatar
|
||||||
|
com o mesmo email utilizado no
|
||||||
|
=App.title
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- if admin?
|
- if admin?
|
||||||
%dt= check_box_tag('user[admin]', 1, @user.admin?) + " Administrador"
|
%dt= check_box_tag('user[admin]', 1, @user.admin?) + " Administrador"
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
%dt
|
%dt
|
||||||
%label{:for => 'user_password'} Senha
|
%label{:for => 'user_password'} Senha
|
||||||
%dd
|
%dd
|
||||||
= password_field('user', 'password', {:value => '', :id => 'password'})
|
= password_field('user', 'password', {:value => '', :id => 'password'})
|
||||||
%span#passmeter
|
%span#passmeter
|
||||||
|
|
||||||
%dt
|
%dt
|
||||||
@@ -40,6 +40,6 @@
|
|||||||
%dl
|
%dl
|
||||||
%dt
|
%dt
|
||||||
%label{:for => 'user_color_pref'} Esquema de cores
|
%label{:for => 'user_color_pref'} Esquema de cores
|
||||||
|
%br
|
||||||
= render :partial => 'widgets/color', :collection => App.color_schemes
|
= render :partial => 'widgets/color', :collection => App.color_schemes
|
||||||
%br.clear
|
%br.clear
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
- @news.each do |n|
|
- @news.each do |n|
|
||||||
%tr
|
%tr
|
||||||
%td.top.aright
|
%td.top.aright
|
||||||
= n.timestamp.strftime("%d de %B")
|
= n.timestamp.strftime("%d de %B")
|
||||||
%td
|
%td
|
||||||
= link_to(h(n.course.full_name), course_url(n.course)) + " ›"
|
= link_to(h(n.course.full_name), course_url(n.course)) + " ›"
|
||||||
= link_to(h(n.title), course_news_instance_url(n.course, n))
|
= link_to(h(n.title), course_news_instance_url(n.course, n))
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
- @events.each do |n|
|
- @events.each do |n|
|
||||||
%tr
|
%tr
|
||||||
%td.aright.top
|
%td.aright.top
|
||||||
= n.time.strftime("%d de %B") #unless n.time == last_time
|
= n.time.strftime("%d de %B") #unless n.time == last_time
|
||||||
- last_time = n.time
|
- last_time = n.time
|
||||||
%td.top
|
%td.top
|
||||||
= n.time.strftime("%H:%M")
|
= n.time.strftime("%H:%M")
|
||||||
@@ -53,4 +53,3 @@
|
|||||||
|
|
||||||
- @current_user.courses.each do |course|
|
- @current_user.courses.each do |course|
|
||||||
%li= link_to(h(course.full_name), course_url(course))
|
%li= link_to(h(course.full_name), course_url(course))
|
||||||
|
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
<h1>Disciplina</h1>
|
<h1>Disciplina</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li><%= link_to "Visão Geral", course_url(@course), :accesskey => 'd' %></li>
|
<li><%= link_to "Visão Geral", course_url(@course), :accesskey => 'd' %></li>
|
||||||
<li><%= link_to "Arquivos", course_attachments_url(@course), :accesskey => 'a' %></li>
|
|
||||||
<li><%= link_to "Calendário", course_events_url(@course), :accesskey => 'c' %></li>
|
|
||||||
<li><%= link_to "Notícias", course_news_url(@course), :accesskey => 'n' %></li>
|
|
||||||
<li><%= link_to "Participantes", course_events_url(@course), :accesskey => 'p' %></li>
|
|
||||||
<li><%= link_to "Páginas Wiki", course_wiki_url(@course), :accesskey => 'w' %></li>
|
<li><%= link_to "Páginas Wiki", course_wiki_url(@course), :accesskey => 'w' %></li>
|
||||||
|
<li><%= link_to "Arquivos", course_attachments_url(@course), :accesskey => 'a' %></li>
|
||||||
|
<!-- <li><%= link_to "Calendário", course_events_url(@course), :accesskey => 'c' %></li> -->
|
||||||
|
<!-- <li><%= link_to "Notícias", course_news_url(@course), :accesskey => 'n' %></li> -->
|
||||||
|
<!-- <li><%= link_to "Participantes", course_events_url(@course), :accesskey => 'p' %></li> -->
|
||||||
<li><%= link_to "Mudanças recentes", course_log_url(@course), :accesskey => 'r' %></li>
|
<li><%= link_to "Mudanças recentes", course_log_url(@course), :accesskey => 'r' %></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -8,14 +8,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<h1>Participantes</h1>
|
<h1>Participantes</h1>
|
||||||
<ul class="widget_users">
|
<ul class="widget_users">
|
||||||
<% @course.users[0..7].each do |user| %>
|
<% @course.users.each do |user| %>
|
||||||
<li>
|
<%= link_to(image_tag(gravatar_url_for(user.email, 26), class: 'avatar'), user_url(user), title: user.display_name)%>
|
||||||
<img class="avatar" src="<%=gravatar_url_for(user.email, 27)%>"/>
|
|
||||||
<%= link_to h(user.display_name), user_url(user) %>
|
|
||||||
</li>
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @course.users.size > 0 %>
|
<% if @course.users.size > 0 %>
|
||||||
<li><%= link_to("Ver todos os participantes", course_news_url(@course)) %></li>
|
<br style='clear: both' />
|
||||||
<% end %>
|
<% end %>
|
||||||
<% if @course.users.empty? %>
|
<% if @course.users.empty? %>
|
||||||
<li class="no_itens">Nenhum participante</li>
|
<li class="no_itens">Nenhum participante</li>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
= action_icon('undo', "Reverter", edit_course_wiki_instance_url(@course, @wiki_page, :description => "Revertendo para versão #{page.version}", :version => page.version)) + " "
|
= raw action_icon('undo', "Reverter", edit_course_wiki_instance_url(@course, @wiki_page, :description => "Revertendo para versão #{page.version}", :version => page.version)) + " "
|
||||||
= link_to tz(page.updated_at).strftime("%d/%m/%y %H:%M:%S"), course_wiki_instance_url(@course, @wiki_page, :version => page.version)
|
= raw link_to tz(page.updated_at).strftime("%d/%m/%y %H:%M:%S"), course_wiki_instance_url(@course, @wiki_page, :version => page.version)
|
||||||
= "por #{link_to h(page.user.display_name), user_path(page.user)}" if page.respond_to?(:user) and !page.user.nil?
|
= raw "por #{link_to h(page.user.display_name), user_path(page.user)}" if page.respond_to?(:user) and !page.user.nil?
|
||||||
|
|
||||||
- if page.description and !page.description.empty?
|
- if page.description and !page.description.empty?
|
||||||
= "(<i>#{h(page.description)}</i>)"
|
= raw "(<i>#{h(page.description)}</i>)"
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
%h4.title= h(@course.full_name)
|
%h4.title= @course.full_name
|
||||||
%h1.title= h(@wiki_page.title)
|
%h1.title= @wiki_page.title
|
||||||
|
|
||||||
%p
|
%p
|
||||||
Comparando versões:
|
Comparando versões:
|
||||||
%ul
|
%ul
|
||||||
%li= render :partial => 'wiki/history', :locals => { :page => @to }
|
%li= render :partial => 'wiki/history', :locals => { :page => @to }
|
||||||
%li= render :partial => 'wiki/history', :locals => { :page => @from }
|
%li= render :partial => 'wiki/history', :locals => { :page => @from }
|
||||||
|
|
||||||
= link_to "Comparar outras versões", versions_course_wiki_instance_url(@course, @wiki_page, :from => @from.version, :to => @to.version)
|
= link_to "Comparar outras versões", versions_course_wiki_instance_url(@course, @wiki_page, :from => @from.version, :to => @to.version)
|
||||||
= format_diff h(@diff)
|
= raw format_diff h(@diff)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
= javascript_include_tag 'wiki'
|
= javascript_include_tag 'wiki'
|
||||||
|
|
||||||
%h4.title= h(@course.full_name)
|
%h4.title= @course.full_name
|
||||||
%h1.title= "Editar #{h(@wiki_page.title)}"
|
%h1.title= "Editar #{(@wiki_page.title)}"
|
||||||
|
|
||||||
%p
|
%p
|
||||||
= form_tag course_wiki_instance_url(@course, @wiki_page.id), :method => :put do
|
= form_tag course_wiki_instance_url(@course, @wiki_page.id), :method => :put do
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
%li
|
%li
|
||||||
= link_to(w.title, course_wiki_instance_url(@course.to_param, w.to_param))
|
= link_to(w.title, course_wiki_instance_url(@course.to_param, w.to_param))
|
||||||
- if w.front_page
|
- if w.front_page
|
||||||
%i{:class => 'fa fa-home'}
|
%i{class: 'fa fa-home', title: 'Exibido na página inicial do curso'}
|
||||||
|
|
||||||
- else
|
- else
|
||||||
.box
|
.box
|
||||||
|
|||||||
@@ -12,12 +12,12 @@
|
|||||||
{:confirm => 'Tem certeza que deseja excluir?', :method => :delete,
|
{:confirm => 'Tem certeza que deseja excluir?', :method => :delete,
|
||||||
:accesskey => '-'}
|
:accesskey => '-'}
|
||||||
|
|
||||||
%h4.title= h(@course.full_name)
|
%h4.title= @course.full_name
|
||||||
%h1.title= h(@wiki_page.title)
|
%h1.title= html_escape(@wiki_page.title)
|
||||||
#contents{:style => "display: none"}
|
#contents{:style => "display: none"}
|
||||||
%h1 Índice
|
%h1 Índice
|
||||||
#wiki_text
|
#wiki_text
|
||||||
= @wiki_page.content.format_wiki
|
= @wiki_page.content.format_wiki rescue "<p class='wiki-error'>Invalid wiki syntax</p>".html_safe
|
||||||
|
|
||||||
%script
|
%script
|
||||||
= "enumerate_headers();"
|
= "enumerate_headers();"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
== radios_from = #{h(@history_from)};
|
== radios_from = #{h(@history_from)};
|
||||||
|
|
||||||
= form_tag diff_course_wiki_instance_url(@course, @wiki_page), :method => :get do
|
= form_tag diff_course_wiki_instance_url(@course, @wiki_page), :method => :get do
|
||||||
%button{:type => "submit"}= "Comparar as versões selecionadas"
|
%button{:type => "submit"} Comparar as versões selecionadas
|
||||||
.box
|
.box
|
||||||
%table
|
%table
|
||||||
%tr
|
%tr
|
||||||
@@ -24,12 +24,12 @@
|
|||||||
%input{:type => "radio", :name => "to", :value => entry.version, :onclick => "history_to(#{entry.version})"}
|
%input{:type => "radio", :name => "to", :value => entry.version, :onclick => "history_to(#{entry.version})"}
|
||||||
%td.narrow
|
%td.narrow
|
||||||
%input{:type => "radio", :name => "from", :value => entry.version, :onclick => %"history_from(#{entry.version})"}
|
%input{:type => "radio", :name => "from", :value => entry.version, :onclick => %"history_from(#{entry.version})"}
|
||||||
%td= link_to(tz(entry.updated_at).strftime("%d/%m/%y %H:%M:%S"), course_wiki_instance_url(@course, @wiki_page, :version => entry.version))
|
%td= link_to(tz(entry.updated_at).strftime("%d/%m/%y %H:%M:%S").html_safe, course_wiki_instance_url(@course, @wiki_page, :version => entry.version))
|
||||||
%td= link_to truncate(h(User.with_deleted.find(entry.user_id).display_name), :length => 20), user_path(User.with_deleted.find(entry.user_id))
|
%td= link_to truncate(h(User.with_deleted.find(entry.user_id).display_name), :length => 20), user_path(User.with_deleted.find(entry.user_id))
|
||||||
%td
|
%td
|
||||||
= entry.description
|
= entry.description
|
||||||
- if (entry.version > @wiki_page.versions.minimum(:version))
|
- if (entry.version > @wiki_page.versions.minimum(:version))
|
||||||
= "(" + link_to("diff", diff_course_wiki_instance_url(@course, @wiki_page, :from => entry.version - 1, :to => entry.version)) + ")"
|
= raw "(" + link_to("diff", diff_course_wiki_instance_url(@course, @wiki_page, :from => entry.version - 1, :to => entry.version)) + ")"
|
||||||
= "(" + link_to("edit", edit_course_wiki_instance_url(@course, @wiki_page, :description => "Revertendo para versão #{entry.version}", :version => entry.version)) + ")"
|
= raw "(" + link_to("edit", edit_course_wiki_instance_url(@course, @wiki_page, :description => "Revertendo para versão #{entry.version}", :version => entry.version)) + ")"
|
||||||
|
|
||||||
/= will_paginate @versions
|
/= will_paginate @versions
|
||||||
|
|||||||
@@ -85,5 +85,5 @@ App = WikiUFC::Application.config
|
|||||||
|
|
||||||
require "haml"
|
require "haml"
|
||||||
require "haml/template"
|
require "haml/template"
|
||||||
Haml::Template.options[:escape_attrs] = false
|
Haml::Template.options[:escape_attrs] = true
|
||||||
Haml::Template.options[:escape_html] = false
|
Haml::Template.options[:escape_html] = true
|
||||||
|
|||||||
@@ -1,75 +1,19 @@
|
|||||||
class Fixnum
|
class Fixnum
|
||||||
def is_numeric?
|
def is_numeric?
|
||||||
true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
class String
|
|
||||||
def is_numeric?
|
|
||||||
Float self rescue false
|
|
||||||
end
|
|
||||||
|
|
||||||
#def html_escape
|
|
||||||
# ERB::Util::html_escape(self)
|
|
||||||
#end
|
|
||||||
|
|
||||||
#%w[auto_link excerpt highlight sanitize simple_format strip_tags truncate word_wrap].each do |method|
|
|
||||||
# eval "def #{method}(*args); ActionController::Base.helpers.#{method}(self, *args); end"
|
|
||||||
#end
|
|
||||||
|
|
||||||
def pretty_url
|
|
||||||
self.mb_chars.normalize(:kd).
|
|
||||||
gsub(/[^\x00-\x7F]/n,'').
|
|
||||||
gsub(/[^a-z._0-9 -]/i,"").
|
|
||||||
gsub(/ +/,"_").
|
|
||||||
downcase.to_s
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
#class Array
|
|
||||||
# def add_condition! (condition, conjunction = 'AND')
|
|
||||||
# if String === condition
|
|
||||||
# add_condition!([condition])
|
|
||||||
# elsif Hash === condition
|
|
||||||
# add_condition!([condition.keys.map { |attr| "#{attr}=?" }.join(' AND ')] + condition.values)
|
|
||||||
# elsif Array === condition
|
|
||||||
# self[0] = "(#{self[0]}) #{conjunction} (#{condition.shift})" unless empty?
|
|
||||||
# (self << condition).flatten!
|
|
||||||
# else
|
|
||||||
# raise "don't know how to handle this condition type"
|
|
||||||
# end
|
|
||||||
# self
|
|
||||||
# end
|
|
||||||
#end
|
|
||||||
|
|
||||||
#module ActiveRecord
|
|
||||||
# module Acts
|
|
||||||
# module Versioned
|
|
||||||
# module ClassMethods
|
|
||||||
# def acts_as_paranoid_versioned
|
|
||||||
# # protect the versioned model
|
|
||||||
# self.versioned_class.class_eval do
|
|
||||||
# def self.delete_all(conditions = nil); return; end
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
#end
|
|
||||||
|
|
||||||
# disable XSS protection
|
|
||||||
module CustomHtmlSafe
|
|
||||||
def html_safe?
|
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class ActionView::OutputBuffer
|
|
||||||
include CustomHtmlSafe
|
|
||||||
end
|
|
||||||
class ActionView::SafeBuffer
|
|
||||||
include CustomHtmlSafe
|
|
||||||
end
|
|
||||||
class String
|
class String
|
||||||
include CustomHtmlSafe
|
def is_numeric?
|
||||||
|
Float self rescue false
|
||||||
|
end
|
||||||
|
|
||||||
|
def pretty_url
|
||||||
|
mb_chars.normalize(:kd)
|
||||||
|
.gsub(/[^\x00-\x7F]/n, '')
|
||||||
|
.gsub(/[^a-z._0-9 -]/i, "")
|
||||||
|
.gsub(/ +/, "_")
|
||||||
|
.downcase.to_s
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
55
vendor/gems/bluecloth/lib/bluecloth.rb
vendored
55
vendor/gems/bluecloth/lib/bluecloth.rb
vendored
@@ -3,9 +3,9 @@
|
|||||||
#
|
#
|
||||||
# Bluecloth is a Ruby implementation of Markdown, a text-to-HTML conversion
|
# Bluecloth is a Ruby implementation of Markdown, a text-to-HTML conversion
|
||||||
# tool.
|
# tool.
|
||||||
#
|
#
|
||||||
# == Synopsis
|
# == Synopsis
|
||||||
#
|
#
|
||||||
# doc = BlueCloth::new "
|
# doc = BlueCloth::new "
|
||||||
# ## Test document ##
|
# ## Test document ##
|
||||||
#
|
#
|
||||||
@@ -13,11 +13,11 @@
|
|||||||
# "
|
# "
|
||||||
#
|
#
|
||||||
# puts doc.to_html
|
# puts doc.to_html
|
||||||
#
|
#
|
||||||
# == Authors
|
# == Authors
|
||||||
#
|
#
|
||||||
# * Michael Granger <ged@FaerieMUD.org>
|
# * Michael Granger <ged@FaerieMUD.org>
|
||||||
#
|
#
|
||||||
# == Contributors
|
# == Contributors
|
||||||
#
|
#
|
||||||
# * Martin Chase <stillflame@FaerieMUD.org> - Peer review, helpful suggestions
|
# * Martin Chase <stillflame@FaerieMUD.org> - Peer review, helpful suggestions
|
||||||
@@ -27,21 +27,21 @@
|
|||||||
#
|
#
|
||||||
# Original version:
|
# Original version:
|
||||||
# Copyright (c) 2003-2004 John Gruber
|
# Copyright (c) 2003-2004 John Gruber
|
||||||
# <http://daringfireball.net/>
|
# <http://daringfireball.net/>
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Ruby port:
|
# Ruby port:
|
||||||
# Copyright (c) 2004 The FaerieMUD Consortium.
|
# Copyright (c) 2004 The FaerieMUD Consortium.
|
||||||
#
|
#
|
||||||
# BlueCloth is free software; you can redistribute it and/or modify it under the
|
# BlueCloth is free software; you can redistribute it and/or modify it under the
|
||||||
# terms of the GNU General Public License as published by the Free Software
|
# terms of the GNU General Public License as published by the Free Software
|
||||||
# Foundation; either version 2 of the License, or (at your option) any later
|
# Foundation; either version 2 of the License, or (at your option) any later
|
||||||
# version.
|
# version.
|
||||||
#
|
#
|
||||||
# BlueCloth is distributed in the hope that it will be useful, but WITHOUT ANY
|
# BlueCloth is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# == To-do
|
# == To-do
|
||||||
#
|
#
|
||||||
# * Refactor some of the larger uglier methods that have to do their own
|
# * Refactor some of the larger uglier methods that have to do their own
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
# == Version
|
# == Version
|
||||||
#
|
#
|
||||||
# $Id: bluecloth.rb 69 2004-08-25 05:27:15Z ged $
|
# $Id: bluecloth.rb 69 2004-08-25 05:27:15Z ged $
|
||||||
#
|
#
|
||||||
|
|
||||||
require 'digest/md5'
|
require 'digest/md5'
|
||||||
require 'logger'
|
require 'logger'
|
||||||
@@ -124,7 +124,7 @@ class BlueCloth < String
|
|||||||
span strike strong sub sup table tbody td tfoot th thead tr tt u ul }
|
span strike strong sub sup table tbody td tfoot th thead tr tt u ul }
|
||||||
|
|
||||||
HTMLAttrs = {
|
HTMLAttrs = {
|
||||||
'a' => %w{href title},
|
'a' => %w{href title},
|
||||||
'img' => %w{src width height alt title class},
|
'img' => %w{src width height alt title class},
|
||||||
'div' => %w{class},
|
'div' => %w{class},
|
||||||
'table' => %w{border}
|
'table' => %w{border}
|
||||||
@@ -132,7 +132,7 @@ class BlueCloth < String
|
|||||||
|
|
||||||
HTMLBlackList = %w{
|
HTMLBlackList = %w{
|
||||||
script object applet embed
|
script object applet embed
|
||||||
}
|
}
|
||||||
|
|
||||||
HTMLValueBlackList = %w{
|
HTMLValueBlackList = %w{
|
||||||
javascript: vbscript: mocha: livescript:
|
javascript: vbscript: mocha: livescript:
|
||||||
@@ -236,7 +236,7 @@ class BlueCloth < String
|
|||||||
|
|
||||||
return text
|
return text
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
### Convert tabs in +str+ to spaces.
|
### Convert tabs in +str+ to spaces.
|
||||||
def detab( tabwidth=TabWidth )
|
def detab( tabwidth=TabWidth )
|
||||||
@@ -374,7 +374,7 @@ class BlueCloth < String
|
|||||||
### tokens.
|
### tokens.
|
||||||
def hide_html_blocks( str, rs )
|
def hide_html_blocks( str, rs )
|
||||||
@log.debug "Hiding HTML blocks in %p" % str
|
@log.debug "Hiding HTML blocks in %p" % str
|
||||||
|
|
||||||
# Tokenizer proc to pass to gsub
|
# Tokenizer proc to pass to gsub
|
||||||
tokenize = lambda {|match|
|
tokenize = lambda {|match|
|
||||||
key = Digest::MD5::hexdigest( match )
|
key = Digest::MD5::hexdigest( match )
|
||||||
@@ -408,7 +408,7 @@ class BlueCloth < String
|
|||||||
|
|
||||||
def hide_latex_blocks( str, rs )
|
def hide_latex_blocks( str, rs )
|
||||||
@log.debug "Hiding Latex blocks in %p" % str
|
@log.debug "Hiding Latex blocks in %p" % str
|
||||||
|
|
||||||
def tokenize(match, rs)
|
def tokenize(match, rs)
|
||||||
key = Digest::MD5::hexdigest( match )
|
key = Digest::MD5::hexdigest( match )
|
||||||
rs.literal_blocks[ key ] = match
|
rs.literal_blocks[ key ] = match
|
||||||
@@ -520,7 +520,7 @@ class BlueCloth < String
|
|||||||
def encode_backslash_escapes( str )
|
def encode_backslash_escapes( str )
|
||||||
# Make a copy with any double-escaped backslashes encoded
|
# Make a copy with any double-escaped backslashes encoded
|
||||||
text = str.gsub( /\\\\/, EscapeTable['\\'][:md5] )
|
text = str.gsub( /\\\\/, EscapeTable['\\'][:md5] )
|
||||||
|
|
||||||
EscapeTable.each_pair {|char, esc|
|
EscapeTable.each_pair {|char, esc|
|
||||||
next if char == '\\'
|
next if char == '\\'
|
||||||
text.gsub!( esc[:re], esc[:md5] )
|
text.gsub!( esc[:re], esc[:md5] )
|
||||||
@@ -668,7 +668,7 @@ class BlueCloth < String
|
|||||||
str.gsub( BlockQuoteRegexp ) {|quote|
|
str.gsub( BlockQuoteRegexp ) {|quote|
|
||||||
@log.debug "Making blockquote from %p" % quote
|
@log.debug "Making blockquote from %p" % quote
|
||||||
|
|
||||||
quote.gsub!( /^ *> ?/, '' ) # Trim one level of quoting
|
quote.gsub!( /^ *> ?/, '' ) # Trim one level of quoting
|
||||||
quote.gsub!( /^ +$/, '' ) # Trim whitespace-only lines
|
quote.gsub!( /^ +$/, '' ) # Trim whitespace-only lines
|
||||||
|
|
||||||
indent = " " * TabWidth
|
indent = " " * TabWidth
|
||||||
@@ -763,7 +763,7 @@ class BlueCloth < String
|
|||||||
# Setext-style headers:
|
# Setext-style headers:
|
||||||
# Header 1
|
# Header 1
|
||||||
# ========
|
# ========
|
||||||
#
|
#
|
||||||
# Header 2
|
# Header 2
|
||||||
# --------
|
# --------
|
||||||
#
|
#
|
||||||
@@ -835,7 +835,7 @@ class BlueCloth < String
|
|||||||
[ ]* # Zero or more spaces
|
[ ]* # Zero or more spaces
|
||||||
<?(.+?)>? # URI = $1
|
<?(.+?)>? # URI = $1
|
||||||
[ ]* # Zero or more spaces
|
[ ]* # Zero or more spaces
|
||||||
(?: #
|
(?: #
|
||||||
([\"\']) # Opening quote char = $2
|
([\"\']) # Opening quote char = $2
|
||||||
(.*?) # Title = $3
|
(.*?) # Title = $3
|
||||||
\2 # Matching quote char
|
\2 # Matching quote char
|
||||||
@@ -852,7 +852,7 @@ class BlueCloth < String
|
|||||||
|
|
||||||
# Scan the whole string
|
# Scan the whole string
|
||||||
until @scanner.empty?
|
until @scanner.empty?
|
||||||
|
|
||||||
if @scanner.scan( /\[/ )
|
if @scanner.scan( /\[/ )
|
||||||
link = ''; linkid = ''
|
link = ''; linkid = ''
|
||||||
depth = 1
|
depth = 1
|
||||||
@@ -960,7 +960,7 @@ class BlueCloth < String
|
|||||||
gsub( ItalicRegexp, %{<em>\\2</em>} )
|
gsub( ItalicRegexp, %{<em>\\2</em>} )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
### Transform backticked spans into <code> spans.
|
### Transform backticked spans into <code> spans.
|
||||||
def transform_code_spans( str, rs )
|
def transform_code_spans( str, rs )
|
||||||
@log.debug " Transforming code spans"
|
@log.debug " Transforming code spans"
|
||||||
@@ -1025,7 +1025,7 @@ class BlueCloth < String
|
|||||||
\([ ]*
|
\([ ]*
|
||||||
<?(\S+?)>? # source url = $3
|
<?(\S+?)>? # source url = $3
|
||||||
[ ]*
|
[ ]*
|
||||||
(?: #
|
(?: #
|
||||||
(["']) # quote char = $4
|
(["']) # quote char = $4
|
||||||
(.*?) # title = $5
|
(.*?) # title = $5
|
||||||
\4 # matching quote
|
\4 # matching quote
|
||||||
@@ -1113,7 +1113,7 @@ class BlueCloth < String
|
|||||||
gsub( "\n", ' ').
|
gsub( "\n", ' ').
|
||||||
gsub( CodeEscapeRegexp ) {|match| EscapeTable[match][:md5]}
|
gsub( CodeEscapeRegexp ) {|match| EscapeTable[match][:md5]}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#################################################################
|
#################################################################
|
||||||
@@ -1172,9 +1172,9 @@ class BlueCloth < String
|
|||||||
|
|
||||||
# Scan either an opener or a closer
|
# Scan either an opener or a closer
|
||||||
chunk = @scanner.scan( HTMLTagPart ) or
|
chunk = @scanner.scan( HTMLTagPart ) or
|
||||||
raise "Malformed tag at character %d: %p" %
|
raise "Malformed tag at character %d: %p" %
|
||||||
[ tagstart, token + @scanner.rest ]
|
[ tagstart, token + @scanner.rest ]
|
||||||
|
|
||||||
@log.debug " Found another part of the tag at depth %d: %p" % [ depth, chunk ]
|
@log.debug " Found another part of the tag at depth %d: %p" % [ depth, chunk ]
|
||||||
|
|
||||||
token += chunk
|
token += chunk
|
||||||
@@ -1216,12 +1216,11 @@ class BlueCloth < String
|
|||||||
gsub( %r{<(?![a-z/?\$!])}i, "<" )
|
gsub( %r{<(?![a-z/?\$!])}i, "<" )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
### Return one level of line-leading tabs or spaces from a copy of +str+ and
|
### Return one level of line-leading tabs or spaces from a copy of +str+ and
|
||||||
### return it.
|
### return it.
|
||||||
def outdent( str )
|
def outdent( str )
|
||||||
str.gsub( /^(\t|[ ]{1,#{TabWidth}})/, '')
|
str.gsub( /^(\t|[ ]{1,#{TabWidth}})/, '')
|
||||||
end
|
end
|
||||||
|
|
||||||
end # class BlueCloth
|
|
||||||
|
|
||||||
|
end # class BlueCloth
|
||||||
|
|||||||
Reference in New Issue
Block a user