Skip to content

Instantly share code, notes, and snippets.

Redmine customizations.

Show line number on issues table.

Redmine 3.4.5

--- app/views/issues/_list.html.erb.org	2018-04-07 21:30:07.000000000 +0900
+++ app/views/issues/_list.html.erb	2018-04-17 23:12:29.835981873 +0900
@@ -7,6 +7,9 @@
 <table class="list issues odd-even <%= query.css_classes %>">
@mi-yo
mi-yo / OmniMarkupPreviewer.patch
Created February 14, 2016 07:30
Table css settings of Sublime Text OmniMarkupPreviewer plugin. https://github.com/timonwong/OmniMarkupPreviewer
--- public\github.css
+++ public\github-custom.css
@@ -539,9 +539,8 @@
.markdown-body table {
display: block;
width: 100%;
- overflow: auto;
word-break: normal;
- word-break: keep-all;
+ word-break: break-all;
@mi-yo
mi-yo / redmine_unescape_inline_attachment_filename.patch
Created November 15, 2015 13:35
Inline image does not work with multibyte filename and plus sign. https://www.redmine.org/issues/10189
--- app/models/attachment.rb.org Sun Jul 6 21:44:07 2014
+++ app/models/attachment.rb Sun Nov 15 22:22:52 2015
@@ -255,7 +255,7 @@
def self.latest_attach(attachments, filename)
attachments.sort_by(&:created_on).reverse.detect {
- |att| att.filename.downcase == filename.downcase
+ |att| att.filename.downcase == CGI.unescape(filename.downcase.gsub(/\+/,'%2B'))
}
end
@mi-yo
mi-yo / CppUTest_sample.md
Created March 1, 2015 23:29
CppUTest_sample

C++開発環境

msysGit

Git for Windows https://msysgit.github.io/

Git fo Windowsがあればgitは使えるが、その開発環境一式であるmsysGitを入れれば

@mi-yo
mi-yo / markdown2html.rb
Created September 7, 2014 06:54
markdown2html
require 'redcarpet'
require 'rouge'
require 'pathname'
HEADER = <<-EOS
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<style type="text/css">
We couldn’t find that file to show.
We couldn’t find that file to show.
--- stylesheets/application.css.org 2014-06-13 00:37:48 +0900
+++ stylesheets/application.css 2014-07-05 18:09:00 +0900
@@ -321,6 +321,16 @@
/***** Wiki *****/
+div.wiki code {
+ background-color: #f8f8f8;
+ border: 1px solid #ddd;
+ white-space: nowrap;
--- stylesheets/application.css.org 2014-04-09 06:36:20 +0900
+++ stylesheets/application.css 2014-06-30 00:32:13 +0900
@@ -221,7 +221,9 @@
div.wiki ul.toc { padding: 10px; }
div.wiki img { max-width: 100%; }
div.wiki table img { width: 100%; }
+div.wiki code { background-color: #f8f8f8; border: 1px solid #ddd; white-space: nowrap; padding: 1px 4px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }
div.wiki pre { margin: 15px 0; background-color: #f8f8f8; border: 1px solid #ddd; font-size: 13px; line-height: 19px; overflow: auto; padding: 6px 10px; -webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px; }
+div.wiki pre code { background: none; border: none; padding: 0; white-space: pre-wrap; }
@mi-yo
mi-yo / redmine_gantts_show_assignee.patch
Last active August 29, 2015 14:03
Redmine 2.5.1 gantts show assignee.
--- app/views/gantts/show.html.erb.org 2014-03-30 01:56:38 +0900
+++ app/views/gantts/show.html.erb 2014-06-29 22:41:28 +0900
@@ -146,6 +146,61 @@
<% end %>
<% end %>
</td>
+<%
+ assignee_width = 80
+%>
+<td style="width:<%= assignee_width %>px; padding:0px;">