app/models/web.rb in Pimki-1.0.092 vs app/models/web.rb in Pimki-1.1.092

- old
+ new

@@ -3,11 +3,11 @@ require "page_set" require "wiki_words" require "zip/zip" class Web - attr_accessor :pages, :name, :address, :password, :menu_type, :menu_content, :rendered_menu, :menu_limit + attr_accessor :pages, :name, :address, :password, :menu_type, :menu_content, :rendered_menu, :menu_limit, :menu_category attr_accessor :markup, :color, :safe_mode, :additional_style, :published, :brackets_only, :count_pages @@BLIKI_TEMPLATE = "Try a weekly worksheet:\n\n| / | *Morning* | *Afternoon* |\n" + "| *Mon* | - | - |\n| *Tue* | - | - |\n| *Wed* | - | - |\n" + "| *Thu* | - | - |\n| *Fri* | - | - |\n" @@ -101,13 +101,14 @@ File.open(dotFile, "w") do |file| # Graph properties: file.puts "digraph G {" - file.puts 'size = "9,11";' - file.puts 'concentrate = true;' - file.puts 'node [fontsize=8,fontname="Tahoma"];' + file.puts 'size="8,8";' + file.puts 'ratio=fill;' + file.puts 'concentrate=true;' + file.puts 'node [fontsize=10,fontname="Tahoma"];' file.puts 'edge [len=1.5];' # Page Special nodes properties: file.puts "HomePage [color=\"##{color}\",style=bold];" @@ -131,11 +132,11 @@ end # find missing pages: if missing missing.each do |wanted| - file.puts "#{wanted} [URL=\"/#{@address}/show/#{wanted}\", fontsize=8,style=filled,color=grey];" + file.puts "#{wanted} [URL=\"/#{@address}/show/#{wanted}\", fontsize=10,style=filled,color=grey];" end pages.values.each do |page| missing.each do |wanted| if page.content =~ /#{wanted}/ file.puts "#{page.name} -> #{wanted};" @@ -160,13 +161,14 @@ File.open(dotFile, "w") do |file| # Graph properties: file.puts "digraph G {" - file.puts 'size = "9,11";' - file.puts 'concentrate = true;' - file.puts 'node [fontsize=8,fontname="Tahoma"];' + file.puts 'size="8,8";' + file.puts 'ratio=fill;' + file.puts 'concentrate=true;' + file.puts 'node [fontsize=10,fontname="Tahoma"];' file.puts 'edge [len=1.5];' # Links and node properties: auths = authors # avoid repeated selects auths.each do |auth| @@ -197,18 +199,19 @@ pngFile = File.expand_path("#{WikiService.storage_path}/map.png") File.open(dotFile, "w") do |file| # Graph properties: file.puts "digraph G {" - file.puts 'size = "9,11";' - file.puts 'concentrate = true;' - file.puts 'node [fontsize=8,fontname="Tahoma"];' + file.puts 'size="8,8";' + file.puts 'ratio=fill;' + file.puts 'concentrate=true;' + file.puts 'node [fontsize=10,fontname="Tahoma"];' file.puts 'edge [len=1.5];' # Page Special nodes properties: file.puts "HomePage [color=\"##{color}\",style=bold];" categories.each do |category| - file.puts "#{category} [style=filled,color=grey];" + file.puts "#{category} [fontsize=20,style=filled,color=grey,comment=\"#{category}\"];" end # Links and node properties: nodes = pages.values auths = authors # avoid repeated selects \ No newline at end of file