def content(): """Helper method that returns just the content. This method was added so that the text could be reused in the other contexts. :returns: A message object without brand element. :rtype: safe.messaging.message.Message """ message = m.Message() message.add( m.Paragraph( tr('You can find updated documentation and suggested workflows ' 'on our main ' 'documentation pages: <a href="https://docs.cadasta.org/en/' '11-qgis-plugin.html">QGIS chapter</a>. (requires internet ' 'access to view)'))) message.add( m.Paragraph( tr('There are three windows that will help you ' 'to manage your project\'s data.'))) bullets = m.BulletedList() bullets.add(m.Text(m.ImportantText(tr('Download Project')))) bullets.add(m.Text(m.ImportantText(tr('Create Project')))) bullets.add(m.Text(m.ImportantText(tr('Update Project')))) message.add(bullets) message.add( m.Paragraph( tr('Use the <b>User Settings</b> window to log in to your account ' 'and get started!' ''))) return message
def show_cadasta_about(self): """Show usage info to the user.""" header = html_header() footer = html_footer() string = header # create brand message = m.Message() message.add(m.Brand()) string += message.to_html() message = about() string += message.to_html() message = overview() string += message.to_html() message = version() string += message.to_html() message = license_about() string += message.to_html() string += footer self.help_web_view.setHtml(string)
def cadasta_help(): """Help message for Cadasta. :returns: A message object containing helpful information. :rtype: messaging.message.Message """ message = m.Message() message.add(heading()) message.add(content()) return message
def version(): """License about for Cadasta. :returns: A message object containing helpful information. :rtype: messaging.message.Message """ message = m.Message() message.add(heading()) message.add(content()) return message
def about(): """About message. :returns: A message object containing helpful information. :rtype: messaging.message.Message """ message = m.Message() message.add(heading()) message.add(content()) return message
def content(): """Helper method that returns just the content. This method was added so that the text could be reused in the other contexts. :returns: A message object without brand element. :rtype: safe.messaging.message.Message """ message = m.Message() message.add(m.Paragraph(get_plugin_version())) return message
def content(): """Helper method that returns just the content. This method was added so that the text could be reused in the other contexts. :returns: A message object without brand element. :rtype: safe.messaging.message.Message """ license = open(get_license_path(), 'r+') message = m.Message() message.add(m.Paragraph(license.read())) return message
def content(): """Helper method that returns just the content. This method was added so that the text could be reused in the other contexts. :returns: A message object without brand element. :rtype: safe.messaging.message.Message """ message = m.Message() message.add( m.Paragraph(tr('The plugin integrates with the cadasta.org platform'))) message.add(m.Paragraph(tr('developed by kartoza.com'))) return message
def content(): """Helper method that returns just the content. This method was added so that the text could be reused in the other contexts. :returns: A message object without brand element. :rtype: safe.messaging.message.Message """ message = m.Message() message.add(m.Paragraph(tr( 'Options will help you redefine url of Cadasta that is used as ' 'source. And also it create a credential to be used on submit ' 'new or updated projects.'))) message.add(m.Paragraph(tr( 'There are 3 input that all of that are required.'))) bullets = m.BulletedList() bullets.add(m.Text( m.ImportantText(tr('Cadasta URL')), tr('- overwrite current url as cadasta source.' 'default is https://platform-staging-api.cadasta.org/') )) bullets.add(m.Text( m.ImportantText(tr('Cadasta Username')), tr('- username that will be used for other request, e.g: create ' 'project') )) bullets.add(m.Text( m.ImportantText(tr('Cadasta Password')) )) message.add(bullets) message.add(m.Paragraph(tr( 'Fill out the form with your username and password. Click \'Connect\' ' 'button ' 'to login. If that is successful click the \'Save\' button to save ' 'the settings.'))) message.add(m.ImportantText(tr('Note that your password is not saved.'))) return message
def show_cadasta_help(self): """Show usage info to the user.""" header = html_header() footer = html_footer() string = header # create brand message = m.Message() message.add(m.Brand()) string += message.to_html() # create content sequentially # 1. Download Project # 2. Create Project # 3. Update Project message = cadasta_help() string += message.to_html() string += footer self.help_web_view.setHtml(string)