From 077442d454e215b7d454e6a47cbe92fff18a9d2a Mon Sep 17 00:00:00 2001
From: Rafael Reggiani Manzo
Date: Sun, 25 Mar 2012 15:59:13 -0300
Subject: [PATCH] Source tree visualization github-like
---
plugins/mezuro/public/images/file.png | Bin 0 -> 534 bytes
plugins/mezuro/public/images/folder.png | Bin 0 -> 3393 bytes
plugins/mezuro/public/style.css | 29 ++++++++++++++++++++++++++++-
plugins/mezuro/views/content_viewer/_source_tree.rhtml | 38 +++++++++++++++++++++++---------------
4 files changed, 51 insertions(+), 16 deletions(-)
create mode 100644 plugins/mezuro/public/images/file.png
create mode 100644 plugins/mezuro/public/images/folder.png
diff --git a/plugins/mezuro/public/images/file.png b/plugins/mezuro/public/images/file.png
new file mode 100644
index 0000000..e50c87f
Binary files /dev/null and b/plugins/mezuro/public/images/file.png differ
diff --git a/plugins/mezuro/public/images/folder.png b/plugins/mezuro/public/images/folder.png
new file mode 100644
index 0000000..30f0d5d
Binary files /dev/null and b/plugins/mezuro/public/images/folder.png differ
diff --git a/plugins/mezuro/public/style.css b/plugins/mezuro/public/style.css
index ed1e524..59b9007 100644
--- a/plugins/mezuro/public/style.css
+++ b/plugins/mezuro/public/style.css
@@ -1,3 +1,30 @@
.link {
cursor: pointer;
-}
\ No newline at end of file
+}
+
+.source-tree{
+ background: #e7e7e7;
+ border: groove 1px #666;
+}
+
+.icon {
+ width: 20px;
+}
+
+.source-tree-text{
+ font-family: Arial, Impact;
+ font-size: 12px;
+ border-left: solid 1px #666;
+}
+
+a:link,active,visited .ancestor{
+ font-family: Arial, Impact;
+ color: #5E5400;
+}
+
+.path{
+ font-family: Arial, Impact;
+ font-size: 14px;
+ font-style: underline;
+ display: inline;
+}
diff --git a/plugins/mezuro/views/content_viewer/_source_tree.rhtml b/plugins/mezuro/views/content_viewer/_source_tree.rhtml
index b7f858b..ec9b6d7 100644
--- a/plugins/mezuro/views/content_viewer/_source_tree.rhtml
+++ b/plugins/mezuro/views/content_viewer/_source_tree.rhtml
@@ -2,28 +2,36 @@
<% module_name = source_tree.module.name %>
<% module_label = "#{module_name} (#{source_tree.module.granularity})" %>
-<% if module_name != project_name %>
-
- <%= project_name %>
-
-<% end %>
+
+ <% if module_name != project_name %>
+
+ <%= project_name %>
+
+ <% end %>
+
<% split_link = source_tree.module.ancestor_names %>
<% split_link.each do |link| %>
-
+ /
<%= link.split(".").last %>
-<% end %>
-
+ <% end %>
+
+
<% if source_tree.children %>
-
+
<% end %>
--
libgit2 0.21.2