[Turn off line numbering]1: arg obj, what; 2: var top, middle, bottom, desc, alert, nalert, line; 3: 4: middle = (bottom = []); 5: top = ["<h1>" + ._make_object_href(obj) + "</h1>"]; 6: 7: // CORENOTE: merge this with a central location (likely $directories) 8: alert = "<p><font size=\"+1\" color=\"#" + ($cml_color.get_color("red"))[1] + "\"><b>"; 9: nalert = "</b></font>"; 10: top += ["<table>"]; 11: top += ["<tr><td><b>Perms</b>:</td><td>" + obj.flags().prefix("+").join() + "</td></tr>", "<tr><td><b>Size</b>:</td><td>" + obj.size().to_english() + " bytes (on disk)</td></tr>", "<tr><td><b>Manager</b>:</td><td>" + ._make_object_href(obj.manager()) + "</td></tr>", ._show_header_objs(obj.writers('literal), "Writer"), ._show_header_objs(obj.parents(), "Parent")]; 12: if (obj.has_ancestor($located)) 13: top += ["<tr><td><b>Location</b>:</td><td>" + ._make_object_href(obj.location()) + "</td></tr>"]; 14: if (obj.help_node()) 15: top += ["<tr><td><b>Associated Help</b>:</td><td><a href=\"/bin/help?node=" + obj.help_node() + "\">" + obj.help_node() + "</a></td></tr>"]; 16: top += ["<tr><td><b>Credit</b>:</td><td>" + join(obj.credit(), "<br>") + "</td></tr>"]; 17: top += ["</table><p><hr size=1 noshade><p>"]; 18: if (obj.has_ancestor($described)) { 19: if (what['desc]) { 20: bottom += ["<p><b>Description</b>:<blockquote><pre>"]; 21: desc = obj.prose(); 22: switch (type(desc)) { 23: case 'frob: 24: for line in (desc.uncompile()) 25: bottom += line.wrap_lines(79, " "); 26: case 'list: 27: bottom += desc; 28: case 'string: 29: bottom += [desc]; 30: } 31: bottom += ["</pre></blockquote>"]; 32: middle += [._make_show_object_href("Hide Description", obj, what, 'desc, 0)]; 33: } else { 34: middle += [._make_show_object_href("Show Description", obj, what, 'desc, 1)]; 35: } 36: top += ["</td></tr>"]; 37: } 38: if (what['methods]) { 39: if (!obj.has_flag('methods, this())) 40: bottom += [alert + "** No permission to List Methods **" + nalert]; 41: else 42: bottom += ["<p><b>Methods:</b><blockquote><pre>"] + ._show_methods(obj) + ["</pre></blockquote>"]; 43: middle += [._make_show_object_href("Hide Methods", obj, what, 'methods, 0)]; 44: } else { 45: middle += [._make_show_object_href("List Methods", obj, what, 'methods, 1)]; 46: } 47: if (what['vars]) { 48: if (!obj.has_flag('variables, this())) 49: bottom += [alert + "** No permission to Show Variables **" + nalert]; 50: else 51: bottom += ["<p><b>Variables:</b><blockquote><pre>"] + ._show_variables(obj) + ["</pre></blockquote>"]; 52: middle += [._make_show_object_href("Hide Variables", obj, what, 'vars, 0)]; 53: } else { 54: middle += [._make_show_object_href("Show Variables", obj, what, 'vars, 1)]; 55: } 56: return top + middle + ["<p>"] + bottom + ["<p>"];
// Brad Roberts
// Bruce Mitchener, Jr.
// Created 16-May-1997 as a part of ColdCore, see: @help Credit