<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -59,10 +59,9 @@ sub _edit_tmpl_param {
 	
 	my @tmpl_loop;	
 	require MT::Template;
-	my $iter = MT::Template-&gt;load_iter({ blog_id =&gt; $app-&gt;param('blog_id') }, 
+	my $iter = MT::Template-&gt;load_iter({ blog_id =&gt; [0, $app-&gt;param('blog_id')] }, 
 	                                        { sort =&gt; 'name', direction =&gt; 'ascend' });
-	while (my $tmpl = $iter-&gt;()) {
-	    
+	while (my $tmpl = $iter-&gt;()) {   
 		push @tmpl_loop, {
 			id =&gt; $tmpl-&gt;id,
 			blog_id =&gt; $tmpl-&gt;blog_id,</diff>
      <filename>plugins/TemplateShelf/TemplateShelf.pl</filename>
    </modified>
    <modified>
      <diff>@@ -32,8 +32,10 @@
 		#template-shelf li p { margin: 0;}
 
 		#template-shelf li.selected { background: #FFFFDF;}
-		#template-shelf tr img { visibility: hidden; }
-		#template-shelf tr.hover img { visibility: visible; }
+		#template-shelf tr img.open-dialog { visibility: hidden; }
+		#template-shelf tr.hover img.open-dialog { visibility: visible; }
+		
+		#template-shelf .global a { color: #7F8833 !important; }
 		
 		.dialog-4 #container, .dialog-4 #content { overflow: visible; }
 		.dialog-4 #title-field #title { width: 100%; }
@@ -70,7 +72,7 @@
 		    filterTemplates('&lt;mt:var name=&quot;template_group&quot;&gt;');
 		}
 		
-		function filterTemplates(key) {
+		function filterTemplates(key, system) {
 			document.getElementById('template-listing-table').getElementsByTagName('tbody')[0].innerHTML = '';
 			
 			var type = '';
@@ -79,7 +81,8 @@
 			
 			for (var i = 0; i &lt; tmplLoop.length; i++) {
 				var tmpl = tmplLoop[i];
-				if(!key || type.match(tmpl.type))
+				if((!key || type.match(tmpl.type)) &amp;&amp; 
+				                    ((system &amp;&amp; tmpl.blog_id == 0) || !system))
 					createRow(tmpl);
 			}
 			
@@ -95,14 +98,17 @@
 		
 		function createRow(tmpl) {
 			// I'm going to be messy here, do I need to create all of this through the DOM?
+			if(tmpl.blog_id == 0)
+			    rowClass = 'global ' + rowClass;
+			
 			var html = '&lt;tr class=&quot;' + rowClass + '&quot; mt:focus-hover=&quot;1&quot;&gt;';
 			// html += '&lt;td class=&quot;cb&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;id&quot; class=&quot;select&quot; value=&quot;' + tmpl.id + '&quot; /&gt;&lt;/td&gt;';
-			html += '&lt;td class=&quot;template-name&quot;&gt;&lt;a href=&quot;&lt;mt:var name=&quot;script_url&quot;&gt;?__mode=view&amp;amp;_type=template&amp;amp;blog_id=&lt;mt:var name=&quot;blog_id&quot;&gt;&amp;amp;id=' + tmpl.id + '&quot;&gt;' + tmpl.name + '&lt;/a&gt;&lt;/td&gt;';				// 
-			html += '&lt;td&gt;&lt;a href=&quot;#&quot; onclick=&quot;return openDialog(this.form, \'view\', \'_type=template&amp;amp;blog_id=&lt;mt:var name=&quot;blog_id&quot;&gt;&amp;amp;id=' + tmpl.id + '&amp;amp;dialog=1\')&quot;&gt;&lt;img src=&quot;&lt;mt:var name=&quot;static_uri&quot;&gt;plugins/TemplateShelf/images/shape_move_backwards.png&quot; style=&quot;float:right;&quot; /&gt;&lt;/a&gt;&lt;/td&gt;';
+			html += '&lt;td class=&quot;template-name&quot;&gt;&lt;a href=&quot;&lt;mt:var name=&quot;script_url&quot;&gt;?__mode=view&amp;amp;_type=template&amp;amp;blog_id=&lt;mt:var name=&quot;blog_id&quot;&gt;&amp;amp;id=' + tmpl.id + '&quot;&gt;' + tmpl.name + '&lt;/a&gt;&lt;/td&gt;';
+			html += '&lt;td&gt;&lt;a href=&quot;#&quot; onclick=&quot;return openDialog(this.form, \'view\', \'_type=template&amp;amp;blog_id=' + tmpl.blog_id + '&amp;amp;id=' + tmpl.id + '&amp;amp;dialog=1\')&quot;&gt;&lt;img src=&quot;&lt;mt:var name=&quot;static_uri&quot;&gt;plugins/TemplateShelf/images/shape_move_backwards.png&quot; style=&quot;float:right;&quot; class=&quot;open-dialog&quot; /&gt;&lt;/a&gt;&lt;/td&gt;';
 			html += '&lt;/tr&gt;';
 			document.getElementById('template-listing-table').getElementsByTagName('tbody')[0].innerHTML += html;
 			
-			if(rowClass == 'odd')
+			if(rowClass.match('odd'))
 				rowClass = 'even'
 			else
 				rowClass = 'odd';			</diff>
      <filename>plugins/TemplateShelf/tmpl/template_shelf.tmpl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>dc8e30fac3f114df2e9db8e879a1848b3838c217</id>
    </parent>
  </parents>
  <author>
    <name>Arvind Satyanarayan</name>
    <email>arvind.2111@gmail.com</email>
  </author>
  <url>http://github.com/arvind/movabletype-templateshelf/commit/213cf340e5b8f2c02110c632dac8c2ac47da8d13</url>
  <id>213cf340e5b8f2c02110c632dac8c2ac47da8d13</id>
  <committed-date>2009-06-26T06:02:21-07:00</committed-date>
  <authored-date>2009-06-26T06:02:21-07:00</authored-date>
  <message>Differentiate global templates with green links</message>
  <tree>92b0aec5a51c8641cf9ef5b0dbc291b2aaa77c0c</tree>
  <committer>
    <name>Arvind Satyanarayan</name>
    <email>arvind.2111@gmail.com</email>
  </committer>
</commit>
